[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messag
From: |
Philippe Roussel |
Subject: |
Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1 |
Date: |
Mon, 30 Apr 2012 19:39:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
Le 30/04/2012 18:16, Philippe Roussel a écrit :
> Le 30/04/2012 17:03, Fred Kiefer a écrit :
>> Not handling move and reparenting events when the window is not visible
>> sounds like a great idea to me. The only problem is that we would need
>> to test this with each and every window manager that we support :-(
>>
>> A saver solution might be to just not save the window frame in the event
>> handling code of NSWindow, when the window isn't visible. Could you
>> please test this and report back the results?
>> It definitely isn't a complete solutions, as the stored frame will be
>> wrong as long as the window isn't visible, but we could get away with a
>> lot less testing.
>
> I will test this tonight and report back.
The following minimal patch/hack works for me without any visible bad
consequences.
I'm still having problems when closing and reopening the preferences
panel without exiting the application (sometimes the panel wrongly
appears in the top left corner and with a bad size) but it doesn't seem
related. I'll try to dig further.
Thanks,
Philippe
--- Source/NSWindow.m (révision 35124)
+++ Source/NSWindow.m (copie de travail)
@@ -4559,10 +4559,12 @@
NSString *key;
id obj;
- defs = [NSUserDefaults standardUserDefaults];
- obj = [self stringWithSavedFrame];
- key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
- [defs setObject: obj forKey: key];
+ if (_f.visible == YES) {
+ defs = [NSUserDefaults standardUserDefaults];
+ obj = [self stringWithSavedFrame];
+ key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
+ [defs setObject: obj forKey: key];
+ }
}
- (BOOL) setFrameAutosaveName: (NSString*)name
- NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Fred Kiefer, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Fred Kiefer, 2012/04/27
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/28
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Fred Kiefer, 2012/04/30
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1, Philippe Roussel, 2012/04/30
- Re: NSWindow receives NSAppKitDefined/GSAppKitWindowMoved strange messages with x = -1,
Philippe Roussel <=