diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gdk/x11/gdkevents-x11.c | 46 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 9 |
5 files changed, 56 insertions, 26 deletions
@@ -1,3 +1,12 @@ +2005-08-01 Matthias Clasen <mclasen@redhat.com> + + * gdk/x11/gdkevents-x11.c (gdk_check_wm_desktop_changed): Make + tracking the on_all_desktops state work better. + + * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop): + Don't do anything if the window is on all desktops. (#311803, + Elijah Newren) + 2005-08-01 Dom Lachowicz <cinamod@hotmail.com> * modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Part of #168326 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5ea2255f7..a0999c62b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2005-08-01 Matthias Clasen <mclasen@redhat.com> + + * gdk/x11/gdkevents-x11.c (gdk_check_wm_desktop_changed): Make + tracking the on_all_desktops state work better. + + * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop): + Don't do anything if the window is on all desktops. (#311803, + Elijah Newren) + 2005-08-01 Dom Lachowicz <cinamod@hotmail.com> * modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Part of #168326 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5ea2255f7..a0999c62b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2005-08-01 Matthias Clasen <mclasen@redhat.com> + + * gdk/x11/gdkevents-x11.c (gdk_check_wm_desktop_changed): Make + tracking the on_all_desktops state work better. + + * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop): + Don't do anything if the window is on all desktops. (#311803, + Elijah Newren) + 2005-08-01 Dom Lachowicz <cinamod@hotmail.com> * modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Part of #168326 diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index afbfedb97..63a22cbd3 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -409,7 +409,7 @@ do_net_wm_state_changes (GdkWindow *window) } else { - if (toplevel->have_sticky && toplevel->on_all_desktops) + if (toplevel->have_sticky || toplevel->on_all_desktops) gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_STICKY); @@ -459,33 +459,29 @@ gdk_check_wm_desktop_changed (GdkWindow *window) gint format; gulong nitems; gulong bytes_after; + guchar *data; + gulong *desktop; + + type = None; + gdk_error_trap_push (); + XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), + GDK_WINDOW_XID (window), + gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"), + 0, G_MAXLONG, False, XA_CARDINAL, &type, + &format, &nitems, + &bytes_after, &data); + gdk_error_trap_pop (); - if (toplevel->have_sticky) + if (type != None) { - guchar *data; - gulong *desktop; - - type = None; - gdk_error_trap_push (); - XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), - GDK_WINDOW_XID (window), - gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type, - &format, &nitems, - &bytes_after, &data); - gdk_error_trap_pop (); - - if (type != None) - { - desktop = (gulong *)data; - toplevel->on_all_desktops = (*desktop == 0xFFFFFFFF); - XFree (desktop); - } - else - toplevel->on_all_desktops = FALSE; - - do_net_wm_state_changes (window); + desktop = (gulong *)data; + toplevel->on_all_desktops = (*desktop == 0xFFFFFFFF); + XFree (desktop); } + else + toplevel->on_all_desktops = FALSE; + + do_net_wm_state_changes (window); } static void diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index ca82cfc2d..b2ced14ac 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -2027,13 +2027,20 @@ gdk_window_lower (GdkWindow *window) * Moves the window to the correct workspace when running under a * window manager that supports multiple workspaces, as described * in the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended - * Window Manager Hints</ulink>. + * Window Manager Hints</ulink>. Will not do anything if the + * window is already on all workspaces. * * Since: 2.8 */ void gdk_x11_window_move_to_current_desktop (GdkWindow *window) { + GdkToplevelX11 *toplevel; + toplevel = _gdk_x11_window_get_toplevel (window); + + if (toplevel->on_all_desktops) + return; + if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window), gdk_atom_intern ("_NET_WM_DESKTOP", FALSE))) { |