From ab176cf831fcdf5f54b551e36b7e79d02e628d67 Mon Sep 17 00:00:00 2001 From: Thomas Thurman Date: Fri, 17 Mar 2006 03:26:25 +0000 Subject: [PATCH] Always set _NET_WM_STATE when a window is shown or hidden, even if it 2006-03-03 Thomas Thurman Always set _NET_WM_STATE when a window is shown or hidden, even if it wasn't mapped. * src/window.c (meta_window_hide, meta_window_show): call set_net_wm_state unconditionally --- ChangeLog | 8 ++++++++ src/window.c | 34 ++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0213f432f..294952446 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-03 Thomas Thurman + + Always set _NET_WM_STATE when a window is shown or + hidden, even if it wasn't mapped. + + * src/window.c (meta_window_hide, meta_window_show): + call set_net_wm_state unconditionally + 2006-03-16 Elijah Newren Add debugging information for edge resistance diff --git a/src/window.c b/src/window.c index 1db08395c..ca55d4ad6 100644 --- a/src/window.c +++ b/src/window.c @@ -2021,17 +2021,14 @@ meta_window_show (MetaWindow *window) } } - if (did_show) - { - set_net_wm_state (window); + set_net_wm_state (window); - if (window->struts) - { - meta_topic (META_DEBUG_WORKAREA, - "Mapped window %s with struts, so invalidating work areas\n", - window->desc); - invalidate_work_areas (window); - } + if (did_show && window->struts) + { + meta_topic (META_DEBUG_WORKAREA, + "Mapped window %s with struts, so invalidating work areas\n", + window->desc); + invalidate_work_areas (window); } } @@ -2074,17 +2071,14 @@ meta_window_hide (MetaWindow *window) set_wm_state (window, IconicState); } - if (did_hide) - { - set_net_wm_state (window); + set_net_wm_state (window); - if (window->struts) - { - meta_topic (META_DEBUG_WORKAREA, - "Unmapped window %s with struts, so invalidating work areas\n", - window->desc); - invalidate_work_areas (window); - } + if (did_hide && window->struts) + { + meta_topic (META_DEBUG_WORKAREA, + "Unmapped window %s with struts, so invalidating work areas\n", + window->desc); + invalidate_work_areas (window); } }