discuss-gnustep
[Top][All Lists]
Advanced

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

Re: modal dialogs


From: Adrian Robert
Subject: Re: modal dialogs
Date: Wed, 17 Aug 2005 17:29:16 -0400


On Aug 17, 2005, at 5:00 PM, Marc Brünink wrote:

Hi List,

we're running GNUstep on a Windows machine. Probably everyone know that ;-) We've an application which opens modal dialogs (NSAlertPanel, NSOpenPanel, ...). If such a dialog pops up and the user clicks on the main window of the application everything is doomed because the panel window disappears. Either the panel window is minimized or (more probably) the main window is ordered front wrongfully.

However: this is damn bad. Does anyone have a clue how to fix this?

Hi,

Previously to about 5 months ago, event loop code in NSApplication would redisplay a modal window every iteration (i.e., every few milliseconds), which would have eliminated this problem. However that led to other issues and the code was changed to only put it up once, and let the rest of the interaction be handled by the window manager. I assume this differs from other apps on Windows and that the desired behavior is:

1) ignore clicks on other app windows once the dialog is put up

2) if the user selects another app, then selects the given app again, raise the dialog window no matter how the app was activated (e.g., by a click on the main window)

I think (2) could be accomplished by checking for an active modal window whenever an activate app message is received, and ordering that window front. (The activate-app message is currently handled in NSApplication I believe.) (1) I'm not 100% sure about, because I don't understand well how window-raise and window-click events are passed through to the app and what is handled foremost by the window manager on different platforms. However we do want to avoid going back to the old hack of just re-raising the modal window every iteration through the event loop, which wrongly interfered with the use of other applications.





reply via email to

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