GNOME Bugzilla – Bug 88926
Keep dialogs without transient parent above entire app
Last modified: 2004-12-22 21:47:04 UTC
Sometimes a dialog is marked as such (transient for root window or _NET_WM_WINDOW_TYPE_DIALOG) but not transient for an application window. Should probably keep these above all windows in the app, just to indulge lame apps.
As such now i could see all dialogs popuping above all windows. Is it that you want the transient dialogs of root windows and dialogs with hints set _NET_WM_WINDOW_TYPE_DIALOG always to be on the top of all windows, like the transient dialogs of application windows. In that case will it not be irritating for another dialog to be on the top of my application window. Or is it something else like the transient dialogs of some applications not coming above the applications. Could you please explain!
A dialog which is not transient for a specific window should be kept above all windows in the window group (MetaGroup object).
Created attachment 11257 [details] [review] Patch should fix the problem
Havoc: when i minimize an app which has a dialog without transient parent, the dialog is not minimized, I hope that is a correct behaviour and please let me know if this patch is fine. Thanks
I'm not sure - maybe we should minimize all dialogs in a group if you minimize any main window in the group? Hard to say.
Havoc: i need to put one more check for the dialog which is not transient, if (!(meta_window_is_ancestor_of_transient(dialog,window))) list = ensure_before (list,dialog, window); Just to take care of the transient windows the non-transient dialog could launch. Will update a patch shortly. Thanks.
Created attachment 11269 [details] [review] Corrected the problem in the previous patch
We also needed to track whether the transient parent was the root window. Patch applied in CVS.
Created attachment 11287 [details] [review] final patch
not sure i understand what's going on here - can someone define a transient window in user terms, i.e. how do I know if a window is transient and how should it behave? for example is the preferences dialog for gnome-cd a transient window? cheers
A transient window has the WM_TRANSIENT_FOR hint set. "xprop | grep TRANSIENT" will show it. This means the window is popped up from the transient parent specified by WM_TRANSIENT_FOR. So e.g. a dialog would be centered over the transient parent. There's sort of an undocumented old convention that if a window is set transient for the root window, it's supposed to be taken as transient for an entire application, not just for a particular window in the application. Also traditionally WM_TRANSIENT_FOR is taken to mean "this window is a dialog," though with the new WM spec we have the _NET_WM_WINDOW_TYPE for that to know more reliably. But absent the _NET_WM_WINDOW_TYPE metacity will take WM_TRANSIENT_FOR to mean a window is a dialog. The patch makes all dialogs that aren't transient for a particular application window stay above their entire application.
cheers havoc - this looks fixed to me so I'm marking it fixed.