GNOME Bugzilla – Bug 166713
Set "Demands attention" hint on parent windows when transient windows aren't focused
Last modified: 2005-02-12 17:54:43 UTC
If a window is spawned that is set to have a parent window, and isn't in the taskbar, the parent window should have the "DEMANDS_ATTENTION" hint set, so that the user can see in the window list that a window appeared. From IRC: <crispin> elijah: If a transient window is not focued (due to the user time stuff), shouldn't it's parent window have the needs attention hint set ? <elijah> ah, good point. File a bug and mark it as blocking 149028, please? (Also note that we should double-check that the window has the SKIP_TASKBAR hint set before we do this, because otherwise the demands_attention hint is more appropriate to set on the child...)
Created attachment 37202 [details] testcase My actual case in Galeon comes from using GtkDialog, which appears to use: gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); However from using xprop it looks like this all boils down to setting the SKIP_TASKBAR hint, so I suppose if the window you are wanting to set the attention flag has that set, then set it on it's parent instead.
Okay, so thinking about this some more and looking into it, I'm not so sure it's a good idea: 1) It'd be inconsistent--if a transient window is currently focused we do not show it's parent as having focus. 2) It'd create problems in the future--if we add some way of marking a window itself which demands attention (overlay with a red alpha channel or something in composite? modifying the color of the titlebar, perhaps in a themed way?), then we'll have problems because we marked the wrong window as demanding attention. That said, I do think we need some way of making these windows that are denied focus and which have SKIP_TASKBAR set more obvious (including those that don't have a parent), I'm just not sure how to do that at this point. Hopefully, bug 166524 will at least help some, though. Comments?
Setting the dialog hint should *not* set SKIP_TASKBAR. Metacity should only skip taskbar for dialogs that have a parent. My suggestion on this bug is to set DEMANDS_ATTENTION on the dialog, but libwnck could display bold/flashing if a window *or any of its transients* demands attention. Maybe more fine-tuning of that rule is needed.
Agree, this is a libwnck thing, not metacity.
Created attachment 37361 [details] [review] add wnck_window_or_transient_demands_attention() and use it I also fixed some incorrect documentation or typos (since I was cutting and pasting from those functions and noticed the problem...)
Havoc, Mark, Vincent: I think the patch is fairly obvious, but I'd like a sanity check from one of you, if possible. Thanks.
Elijah: it looks okay to me.
committed.