Changeset 106

Show
Ignore:
Timestamp:
05/02/07 15:24:36 (2 years ago)
Author:
pmac
Message:

Fixed OSX startup problems. (window creep, mouse-y off-by-one)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main-crb.c

    r105 r106  
    246246        GlyphInfo *ginfo; 
    247247         
    248         Rect r;                 // Absolute bounds of window. 
     248        Rect wr;                // Absolute bounds of window (for save/restore) 
     249        Rect r;                 // Canvas bounds of window (for mouse addressing &c)  
    249250        CGRect bounds;  // Relative bounds of border-clipped canvas. 
    250251 
     
    925926         
    926927        SizeWindow(td->w, td->size_wid, td->size_hgt, 0); 
     928        /* Get absolute bounds of window */ 
     929        GetWindowBounds((WindowRef)td->w, kWindowGlobalPortRgn, &td->wr); 
     930 
    927931        // Cheat a little -- can't use the active view to redraw its own border. 
    928932        CGContextRef tmpCtx; 
     
    20752079{ 
    20762080        CFStringRef cf_key; 
    2077         CFPropertyListRef cf_value
     2081        CFPropertyListRef cf_value = 0
    20782082 
    20792083        /* allocate and initialise the key */ 
     
    22012205                save_pref_short(format("term%d.cols", i), td->cols); 
    22022206                save_pref_short(format("term%d.rows", i), td->rows); 
    2203                 save_pref_short(format("term%d.left", i), td->r.left); 
    2204                 save_pref_short(format("term%d.top", i), td->r.top); 
     2207                save_pref_short(format("term%d.left", i), td->wr.left); 
     2208                save_pref_short(format("term%d.top", i), td->wr.top); 
    22052209 
    22062210                /* Integer font sizes only */ 
     
    22462250        } 
    22472251 
    2248 #if 0 
    22492252 
    22502253        /* Check version */ 
     
    22542257                (pref_extra != VERSION_EXTRA)) 
    22552258        { 
     2259#if 1 // For 3.0.8 : pref file change! 
    22562260                /* Message */ 
    22572261                mac_warning( 
     
    22612265                /* Ignore */ 
    22622266                return; 
    2263         } 
    2264  
     2267#else 
     2268                mac_warning(format("Preference file has changed.  If you have display problems, delete %s and restart", )); 
    22652269#endif 
     2270        } 
     2271 
    22662272 
    22672273        /* HACK - Check for broken preferences */ 
     
    28912897        Rect tmpR; 
    28922898        GetWindowBounds((WindowRef)td->w, kWindowContentRgn, &tmpR); 
     2899        GetWindowBounds((WindowRef)td->w, kWindowGlobalPortRgn, &td->wr); 
    28932900        td->r = tmpR; 
    28942901        if(td->r.top < 40) td->r.top = 40;