After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166713 - Set "Demands attention" hint on parent windows when transient windows aren't focused
Set "Demands attention" hint on parent windows when transient windows aren't ...
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: tasklist
2.9.x
Other Linux
: High normal
: 2.10.x
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks: 149028
 
 
Reported: 2005-02-08 20:41 UTC by Crispin Flowerday (not receiving bugmail)
Modified: 2005-02-12 17:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
testcase (1.75 KB, text/plain)
2005-02-08 21:02 UTC, Crispin Flowerday (not receiving bugmail)
  Details
add wnck_window_or_transient_demands_attention() and use it (5.68 KB, patch)
2005-02-11 18:16 UTC, Elijah Newren
none Details | Review

Description Crispin Flowerday (not receiving bugmail) 2005-02-08 20:41:52 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...)
Comment 1 Crispin Flowerday (not receiving bugmail) 2005-02-08 21:02:20 UTC
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.
Comment 2 Elijah Newren 2005-02-09 01:26:45 UTC
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?
Comment 3 Havoc Pennington 2005-02-09 02:53:38 UTC
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.
Comment 4 Crispin Flowerday (not receiving bugmail) 2005-02-10 23:13:08 UTC
Agree, this is a libwnck thing, not metacity.
Comment 5 Elijah Newren 2005-02-11 18:16:20 UTC
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...)
Comment 6 Elijah Newren 2005-02-12 03:10:02 UTC
Havoc, Mark, Vincent: I think the patch is fairly obvious, but I'd like a sanity
check from one of you, if possible.  Thanks.
Comment 7 Vincent Untz 2005-02-12 08:41:21 UTC
Elijah: it looks okay to me.
Comment 8 Elijah Newren 2005-02-12 17:54:43 UTC
committed.