GNOME Bugzilla – Bug 588065
Adds demands-attention signal to the window class
Last modified: 2009-11-17 10:10:15 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().
Created attachment 138031 [details] [review] window demands-attention signal.
Should be done as boolean property with notification. (Very similar to the decorated property)
Are you planning to do a new version of this patch?
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.
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.
(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.
(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).
Created attachment 146429 [details] [review] demands-attention as a boolean property Implement demands-attention as a boolean property rather than a signal.
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 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.
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.
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 on attachment 146520 [details] [review] demands-attention as a boolean property Committed as 2a14deab0c616064c7130f74245be0496b56d4e4.