Support the ICCCM urgency hint. (#61858, Havoc Pennington)
2005-06-17 Matthias Clasen <mclasen@redhat.com> Support the ICCCM urgency hint. (#61858, Havoc Pennington) * gtk/gtk.symbols: * gtk/gtkwindow.[hc]: Add a GtkWindow::urgency-hint property with getter and setter. * gdk/gdk.symbols: * gdk/gdkwindow.h: * gdk/x11/gdkwindow-x11.c (gdk_window_set_urgency_hint): Add a setter for the urgency hint. * gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store urgency hint here. * gdk/x11/gdkwindow-x11.c (update_wm_hints): Set the urgency hint in the WM_HINTS property when appropriate.
This commit is contained in:
committed by
Matthias Clasen
parent
015b3c5671
commit
23fabedc9d
@ -1270,6 +1270,9 @@ update_wm_hints (GdkWindow *window,
|
||||
}
|
||||
else
|
||||
wm_hints.window_group = GDK_DISPLAY_X11 (display)->leader_window;
|
||||
|
||||
if (toplevel->urgency_hint)
|
||||
wm_hints.flags |= XUrgencyHint;
|
||||
|
||||
XSetWMHints (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
@ -2342,6 +2345,34 @@ gdk_window_set_skip_pager_hint (GdkWindow *window,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_window_set_urgency_hint:
|
||||
* @window: a toplevel #GdkWindow
|
||||
* @urgent: %TRUE if the window is urgent
|
||||
*
|
||||
* Toggles whether a window needs the user's
|
||||
* urgent attention.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
void
|
||||
gdk_window_set_urgency_hint (GdkWindow *window,
|
||||
gboolean urgent)
|
||||
{
|
||||
GdkToplevelX11 *toplevel;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
toplevel = _gdk_x11_window_get_toplevel (window);
|
||||
toplevel->urgency_hint = urgent;
|
||||
|
||||
update_wm_hints (window, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_window_set_geometry_hints:
|
||||
* @window: a toplevel #GdkWindow
|
||||
|
||||
@ -111,6 +111,7 @@ struct _GdkToplevelX11
|
||||
/* Set if we are requesting these hints */
|
||||
guint skip_taskbar_hint : 1;
|
||||
guint skip_pager_hint : 1;
|
||||
guint urgency_hint : 1;
|
||||
|
||||
guint on_all_desktops : 1; /* _NET_WM_STICKY == 0xFFFFFFFF */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user