gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with recent change to w32_activate.m -- PLEASE REVERT


From: Doug Simons
Subject: Problem with recent change to w32_activate.m -- PLEASE REVERT
Date: Fri, 10 Sep 2010 15:54:54 -0600

Hi,

The change made by Eric in r31206 to call [NSApp deactivate] when a WM_ACTIVEAPP message is received reporting that the app lost focus causes trouble. I'll describe what I know about the issue.

In our application, if we have two editor windows open (call them A and B) and minimize the one that has focus (say, B) then Windows apparently sends this message even though the focus switches to window A (within the same instance of the app). Window A then becomes the key window, but when we restore window B by clicking on its tile in the task bar, it now becomes the key window but leaves window A in a broken state such that after clicking in window A you can make text selections there, but all keystrokes in window A are now sent to window B!! Closing window A and reopening that document is the only way to restore it to normal functioning.

I added an NSLog at the point where the new code calls [NSApp deactivate] and found that it was called more than 20 times when I minimized a window. A comment I read online suggests that WM_ACTIVEAPP is sent for every window in the application. Perhaps that includes offscreen windows, because I only had 3 or 4 windows open at the time. Since these messages are also being sent on minimizing a window even when the app remains the active app it seems like this isn't really working the way it should.

On restoring window B, I get the message "Bogus attempt to set key window" (from line 3897 of NSApplication.m) so clearly the application's notion of the key window is getting confused.

I'd like to request that this change be reverted until a better implementation can be found that doesn't have these issues.

Thanks!

Doug

P. S. Eric -- THANK YOU, THANK YOU, THANK YOU for fixing the problem with reverse ordering of windows while in gdb under Windows! Debugging is so much more tolerable now!



reply via email to

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