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 588065 - Adds demands-attention signal to the window class
Adds demands-attention signal to the window class
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-08 12:36 UTC by Jon Nettleton
Modified: 2009-11-17 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window demands-attention signal. (2.30 KB, patch)
2009-07-08 12:37 UTC, Jon Nettleton
needs-work Details | Review
demands-attention as a boolean property (3.62 KB, patch)
2009-10-28 16:00 UTC, Tomas Frydrych
none Details | Review
demands-attention as a boolean property (4.00 KB, patch)
2009-10-29 18:52 UTC, Tomas Frydrych
committed Details | Review

Description Jon Nettleton 2009-07-08 12:36:25 UTC
This patch adds the signal demands-attention to the window class.  I am using this in my breadcrumbs branch to implement window attention notification to the user.  I attempted to use Wnck, however javascript did not like something about window.get_xwindow().
Comment 1 Jon Nettleton 2009-07-08 12:37:07 UTC
Created attachment 138031 [details] [review]
window demands-attention signal.
Comment 2 Owen Taylor 2009-07-08 16:26:42 UTC
Should be done as boolean property with notification.

(Very similar to the decorated property)
Comment 3 Owen Taylor 2009-07-28 20:03:43 UTC
Are you planning to do a new version of this patch?
Comment 4 Jon Nettleton 2009-07-28 22:27:33 UTC
For now I have landed this code in my github account and branch.  http://github.com/linux4kix/mutter/commit/9da537c1b2e699fe582b48d1d4cffbfc8ea724bb

Feel free to close this bug, as the functionality is not geared for gnome-shell inclusive code right now.

Thanks.
Comment 5 Tomas Frydrych 2009-08-01 12:23:17 UTC
I would not mind adding all of these properties, but if we do, I think we would want g_object_notify() for all off them, and remove the current "focus" signal.
Comment 6 Colin Walters 2009-08-01 18:02:57 UTC
(In reply to comment #5)
> I would not mind adding all of these properties, but if we do, I think we would
> want g_object_notify() for all off them

All of the previously existing GObject properties like icon, etc too?  Makes sense probably, though I'm not sure of the scope of the work.

Note with the patch to MetaDisplay from bug 590320 we could maybe remove the HAS_FOCUS property from MetaWindow and think of the property really as of the Display, even though most of the logic is inside window.c.
Comment 7 Tomas Frydrych 2009-08-01 18:17:13 UTC
(In reply to comment #6)
> Note with the patch to MetaDisplay from bug 590320 we could maybe remove the
> HAS_FOCUS property from MetaWindow and think of the property really as of the
> Display, even though most of the logic is inside window.c.

I would like to have both of these; the display property allows you to track who has focus, while the window one whether a given window has focus or not (i.e., if you want to know when a window looses focus, you need the per-window property, but trying to track who has focus using the per-window property is pain).
Comment 8 Tomas Frydrych 2009-10-28 16:00:33 UTC
Created attachment 146429 [details] [review]
demands-attention as a boolean property

Implement demands-attention as a boolean property rather than a signal.
Comment 9 Tomas Frydrych 2009-10-28 16:18:11 UTC
Comment on attachment 146429 [details] [review]
demands-attention as a boolean property

Never mind, I missed a place in window-props.c where this is also getting set, updated patch forthcoming.
Comment 10 Tomas Frydrych 2009-10-28 16:22:31 UTC
Comment on attachment 146429 [details] [review]
demands-attention as a boolean property

I take that back, the change in window-props.c can only happen during window creation, so I don't think we need notification there.
Comment 11 Tomas Frydrych 2009-10-29 18:52:18 UTC
Created attachment 146520 [details] [review]
demands-attention as a boolean property

Forgot to update meta_window_get_property so we can query the value, the update patch fixes this.
Comment 12 Owen Taylor 2009-11-10 16:00:00 UTC
Review of attachment 146520 [details] [review]:

Looks good

::: src/core/window.c
@@ +304,3 @@
+                                   g_param_spec_boolean ("demands-attention",
+                                                         "Demands Attention",
+                                                         "Whether window demands attention",

Maybe "Whether the window has _NET_WM_STATE_DEMANDS_ATTENTION set"
Comment 13 Tomas Frydrych 2009-11-17 10:08:21 UTC
Comment on attachment 146520 [details] [review]
demands-attention as a boolean property

Committed as 2a14deab0c616064c7130f74245be0496b56d4e4.