mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Patch from Matthias to add support for the _NET_WM_USER_TIME_WINDOW EWMH
2007-03-31 Elijah Newren <newren gmail com> * gdk/x11/gdkwindow-x11.c (setup_toplevel_window, gdk_x11_window_set_user_time): Patch from Matthias to add support for the _NET_WM_USER_TIME_WINDOW EWMH protocol; see #354213. WARNING: This patch will make metacity <= 2.18.0 freeze on workspace switch. This is due to a weird problem that should only affect window managers using gdk in-process for decoration drawing and which make an unsafe assumption relating to doing so (i.e. it should only affect metacity). Upgrade your version of metacity if you hit this bug. svn path=/trunk/; revision=17574
This commit is contained in:
parent
edb9f10aad
commit
9384ea655c
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2007-03-31 Elijah Newren <newren gmail com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (setup_toplevel_window,
|
||||
gdk_x11_window_set_user_time):
|
||||
Patch from Matthias to add support for the
|
||||
_NET_WM_USER_TIME_WINDOW EWMH protocol; see #354213.
|
||||
|
||||
WARNING: This patch will make metacity <= 2.18.0 freeze on
|
||||
workspace switch. This is due to a weird problem that should only
|
||||
affect window managers using gdk in-process for decoration drawing
|
||||
and which make an unsafe assumption relating to doing so (i.e. it
|
||||
should only affect metacity). Upgrade your version of metacity if
|
||||
you hit this bug.
|
||||
|
||||
2007-03-29 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Don't close menus on clicks on their border area (bug #423761).
|
||||
|
@ -614,6 +614,12 @@ setup_toplevel_window (GdkWindow *window,
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(guchar *) &GDK_DISPLAY_X11 (screen_x11->display)->leader_window, 1);
|
||||
|
||||
if (toplevel->focus_window != None)
|
||||
XChangeProperty (xdisplay, xid,
|
||||
gdk_x11_get_xatom_by_name_for_display (screen_x11->display, "_NET_WM_USER_TIME_WINDOW"),
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(guchar *) &toplevel->focus_window, 1);
|
||||
|
||||
if (!obj->focus_on_map)
|
||||
gdk_x11_window_set_user_time (window, 0);
|
||||
else if (GDK_DISPLAY_X11 (screen_x11->display)->user_time != 0)
|
||||
@ -4256,6 +4262,7 @@ gdk_x11_window_set_user_time (GdkWindow *window,
|
||||
GdkDisplayX11 *display_x11;
|
||||
GdkToplevelX11 *toplevel;
|
||||
glong timestamp_long = (glong)timestamp;
|
||||
Window xid;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@ -4266,7 +4273,20 @@ gdk_x11_window_set_user_time (GdkWindow *window,
|
||||
display_x11 = GDK_DISPLAY_X11 (display);
|
||||
toplevel = _gdk_x11_window_get_toplevel (window);
|
||||
|
||||
XChangeProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
|
||||
if (!toplevel)
|
||||
{
|
||||
g_warning ("gdk_window_set_user_time called on non-toplevel\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (toplevel->focus_window != None &&
|
||||
gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
|
||||
gdk_atom_intern_static_string ("_NET_WM_USER_TIME_WINDOW")))
|
||||
xid = toplevel->focus_window;
|
||||
else
|
||||
xid = GDK_WINDOW_XID (window);
|
||||
|
||||
XChangeProperty (GDK_DISPLAY_XDISPLAY (display), xid,
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_USER_TIME"),
|
||||
XA_CARDINAL, 32, PropModeReplace,
|
||||
(guchar *)×tamp_long, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user