mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 03:20:37 +00:00
For resize, get new fram origin in event location field
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13160 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
85c795331a
commit
6af0d271a6
7 changed files with 42 additions and 25 deletions
|
@ -248,6 +248,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
if ([encoding isEqualToString: @"0"])
|
||||
return NSGB2312StringEncoding;
|
||||
}
|
||||
else if ([registry isEqualToString: @"big5"])
|
||||
{
|
||||
if ([encoding isEqualToString: @"0"])
|
||||
return NSBIG5StringEncoding;
|
||||
}
|
||||
|
||||
return NSASCIIStringEncoding;
|
||||
}
|
||||
|
|
|
@ -732,8 +732,6 @@ static NSNotificationCenter *nc = nil;
|
|||
backing: (NSBackingStoreType)bufferingType
|
||||
defer: (BOOL)flag
|
||||
{
|
||||
NSDebugLog(@"NSWindow -initWithContentRect: \n");
|
||||
|
||||
return [self initWithContentRect: contentRect
|
||||
styleMask: aStyle
|
||||
backing: bufferingType
|
||||
|
@ -771,11 +769,10 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
NSRect cframe;
|
||||
|
||||
NSDebugLog(@"NSWindow default initializer\n");
|
||||
if (!NSApp)
|
||||
NSLog(@"No application!\n");
|
||||
|
||||
NSDebugLog(@"NSWindow start of init\n");
|
||||
NSDebugLLog(@"NSWindow", @"NSWindow start of init\n");
|
||||
if (!windowmaps)
|
||||
windowmaps = NSCreateMapTable(NSIntMapKeyCallBacks,
|
||||
NSNonRetainedObjectMapValueCallBacks, 20);
|
||||
|
@ -824,7 +821,7 @@ static NSNotificationCenter *nc = nil;
|
|||
else
|
||||
NSDebugLLog(@"NSWindow", @"Defering NSWindow creation\n");
|
||||
|
||||
NSDebugLog(@"NSWindow end of init\n");
|
||||
NSDebugLLog(@"NSWindow", @"NSWindow end of init\n");
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -2642,6 +2639,9 @@ resetCursorRectsForView(NSView *theView)
|
|||
// Quietly discard an unused mouse down.
|
||||
}
|
||||
|
||||
/** Handles mouse and other events sent to the received by NSApplication.
|
||||
Do not invoke this method directly.
|
||||
*/
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
{
|
||||
NSView *v;
|
||||
|
@ -2840,6 +2840,9 @@ resetCursorRectsForView(NSView *theView)
|
|||
case GSAppKitWindowResized:
|
||||
_frame.size.width = (float)[theEvent data1];
|
||||
_frame.size.height = (float)[theEvent data2];
|
||||
/* Resize events always move the frame origin. The new origin
|
||||
is stored in the event location field */
|
||||
_frame.origin = [theEvent locationInWindow];
|
||||
if (_autosaveName != nil)
|
||||
{
|
||||
[self saveFrameUsingName: _autosaveName];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue