discuss-gnustep
[Top][All Lists]
Advanced

[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: Fri, 27 Apr 2012 23:30:23 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Le 27/04/2012 22:53, Philippe Roussel a écrit :
> Hi Fred,
> 
> Le 27/04/2012 22:33, Fred Kiefer a écrit :
>>
>> Hi Philippe,
>>
>> you code may work around the problem, but I would like to first
>> understand what is causing it. You could add a break point on your new
>> code to see what is causing it. In addition you could add the switches
>> "--GNU-Debug=NSEvent --GNU-Debug=Moving --GNU-Debug=Frame" to your
>> command line to see more debug output. That way we may be able to
>> understand how this nonsensical value get created.
>>
>> It could be that the line
>> n = [self _XFrameToOSFrame: x for: cWin];
>> converts the correct X values into wrong OS values. This would mean that
>> we are using the wrong style offset values. Which window manager are you
>> using? Is this properly supported by our  _checkStyle: code?
>> Here the command line switch "--GNU-Debug=Offset" should give you more
>> information.
> 
> My window manager is Unity on Ubuntu 11.10.

Here's an log with all 4 switches, starting when I click on the close
button of the preferences panel :

> 2012-04-27 23:19:01.090 SimpleAgenda[9713] WM Protocol - WM_DELETE_WINDOW
> 2012-04-27 23:19:01.090 SimpleAgenda[9713] Send NSEvent type: 13 to <NSPanel: 
> 0x878b294>Number: 18 Title: Preferences
> 2012-04-27 23:19:01.093 SimpleAgenda[9713] 4194346 PropertyNotify - 
> '_NET_WM_USER_TIME'
> 2012-04-27 23:19:01.094 SimpleAgenda[9713] 4194545 FocusOut
> 2012-04-27 23:19:01.094 SimpleAgenda[9713] 4194346 FocusIn
> 2012-04-27 23:19:01.094 SimpleAgenda[9713] 0 KeymapNotify
> 2012-04-27 23:19:01.094 SimpleAgenda[9713] 4194545 UnmapNotify
> 2012-04-27 23:19:01.095 SimpleAgenda[9713] 4194545 PropertyNotify - 'WM_STATE'
> 2012-04-27 23:19:01.097 SimpleAgenda[9713] 4194545 ConfigureNotify x:429 
> y:115 w:375 h:237 b:0 T
> 2012-04-27 23:19:01.097 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] X2O 18, 3, {x = 429; y = 115; 
> width = 375; height = 237}, {x = 428; y = 447; width = 377; height = 265}
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] Update win 18:
>    original:{x = 430; y = 142; width = 375; height = 237}
>    new:{x = 429; y = 115; width = 375; height = 237}
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] X2H 18, 3, {x = 429; y = 115; 
> width = 375; height = 237}, {x = 428; y = 88; width = 375; height = 237}
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] Send NSEvent type: 13 to <NSPanel: 
> 0x878b294>Number: 18 Title: Preferences
> 2012-04-27 23:19:01.098 SimpleAgenda[9713] Move event: 18 {x = 428; y = 447}
> 2012-04-27 23:19:01.101 SimpleAgenda[9713] 4194545 ReparentNotify - offset 0 0
> 2012-04-27 23:19:01.102 SimpleAgenda[9713] 4194545 ConfigureNotify x:0 y:0 
> w:375 h:237 b:0 F
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] X2O 18, 3, {x = 0; y = 0; width = 
> 375; height = 237}, {x = -1; y = 562; width = 377; height = 265}
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] Update win 18:
>    original:{x = 429; y = 115; width = 375; height = 237}
>    new:{x = 0; y = 0; width = 375; height = 237}
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] X2H 18, 3, {x = 0; y = 0; width = 
> 375; height = 237}, {x = -1; y = -27; width = 375; height = 237}
> 2012-04-27 23:19:01.104 SimpleAgenda[9713] bug

I've added NSLog(@"bug") in an else branch to my previous hack. At this
point the bogus NSEvent should be sent to the panel and its coordinates
saved as the window geometry, I think.

This is not happening only with SimpleAgenda, I reproduced it with FTP
for example. And this is problem isn't really new, I've been seeing for
some time now.

> 2012-04-27 23:19:01.104 SimpleAgenda[9713] 4194545 ConfigureNotify x:429 
> y:115 w:375 h:237 b:0 F
> 2012-04-27 23:19:01.105 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.105 SimpleAgenda[9713] X2O 18, 3, {x = 429; y = 115; 
> width = 375; height = 237}, {x = 428; y = 447; width = 377; height = 265}
> 2012-04-27 23:19:01.105 SimpleAgenda[9713] Update win 18:
>    original:{x = 0; y = 0; width = 375; height = 237}
>    new:{x = 429; y = 115; width = 375; height = 237}
> 2012-04-27 23:19:01.106 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.106 SimpleAgenda[9713] X2H 18, 3, {x = 429; y = 115; 
> width = 375; height = 237}, {x = 428; y = 88; width = 375; height = 237}
> 2012-04-27 23:19:01.106 SimpleAgenda[9713] Send NSEvent type: 13 to <NSPanel: 
> 0x878b294>Number: 18 Title: Preferences
> 2012-04-27 23:19:01.106 SimpleAgenda[9713] Move event: 18 {x = 428; y = 447}
> 2012-04-27 23:19:01.108 SimpleAgenda[9713] 4194545 PropertyNotify - 
> '_COMPIZ_WINDOW_DECOR_INPUT_FRAME'
> 2012-04-27 23:19:01.108 SimpleAgenda[9713] 4194545 PropertyNotify - 
> '_NET_WM_ALLOWED_ACTIONS'
> 2012-04-27 23:19:01.109 SimpleAgenda[9713] 4194545 ConfigureNotify x:0 y:0 
> w:375 h:237 b:0 F
> 2012-04-27 23:19:01.120 SimpleAgenda[9713] Window 4194545, left 1, right 1, 
> top 27, bottom 1
> 2012-04-27 23:19:01.120 SimpleAgenda[9713] X2O 18, 3, {x = 0; y = 0; width = 
> 375; height = 237}, {x = -1; y = 562; width = 377; height = 265}
> 2012-04-27 23:19:01.120 SimpleAgenda[9713] Update win 18:
>    original:{x = 429; y = 115; width = 375; height = 237}
>    new:{x = 0; y = 0; width = 375; height = 237}
> 2012-04-27 23:19:01.124 SimpleAgenda[9713] Window 4194545, left 0, right 0, 
> top 0, bottom 0
> 2012-04-27 23:19:01.124 SimpleAgenda[9713] X2H 18, 3, {x = 0; y = 0; width = 
> 375; height = 237}, {x = 0; y = 0; width = 375; height = 237}
> 2012-04-27 23:19:01.124 SimpleAgenda[9713] bug

Thanks,
Philippe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]