diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2018-07-22 10:58:42 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2018-07-24 11:56:49 +0200 |
commit | 5f7a1f5f91fd0eec91a4a88c669847fd2567a270 (patch) | |
tree | e1f25dfdfe0be1a4c38704076bb2373770aa42a9 | |
parent | 0a5ba680f27a48242d52c590727deb837708da09 (diff) | |
download | xfwm4-5f7a1f5f91fd0eec91a4a88c669847fd2567a270.tar.gz |
client: Check GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
Check that value for GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED has actually
changed before reconfiguring the window.
-rw-r--r-- | src/client.c | 4 | ||||
-rw-r--r-- | src/events.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/client.c b/src/client.c index 3059fb647..d58d7c348 100644 --- a/src/client.c +++ b/src/client.c @@ -4063,6 +4063,7 @@ clientGetGtkHideTitlebar (Client * c) { ScreenInfo *screen_info; DisplayInfo *display_info; + unsigned long old_value; long val; g_return_val_if_fail (c != NULL, FALSE); @@ -4070,13 +4071,14 @@ clientGetGtkHideTitlebar (Client * c) screen_info = c->screen_info; display_info = screen_info->display_info; + old_value = FLAG_TEST (c->flags, CLIENT_FLAG_HIDE_TITLEBAR); FLAG_UNSET (c->flags, CLIENT_FLAG_HIDE_TITLEBAR); if (getHint (display_info, c->window, GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, &val) &&( val != 0)) { FLAG_SET (c->flags, CLIENT_FLAG_HIDE_TITLEBAR); } - return FLAG_TEST (c->flags, CLIENT_FLAG_HIDE_TITLEBAR); + return old_value != FLAG_TEST (c->flags, CLIENT_FLAG_HIDE_TITLEBAR); } #ifdef HAVE_LIBSTARTUP_NOTIFICATION diff --git a/src/events.c b/src/events.c index 9bd921950..f889edf28 100644 --- a/src/events.c +++ b/src/events.c @@ -1846,11 +1846,13 @@ handlePropertyNotify (DisplayInfo *display_info, XPropertyEvent * ev) else if (ev->atom == display_info->atoms[GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED]) { TRACE ("client \"%s\" (0x%lx) has received a GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED notify", c->name, c->window); - clientGetGtkHideTitlebar (c); - if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED)) + if (clientGetGtkHideTitlebar (c)) { - clientUpdateMaximizeSize (c); - clientReconfigure (c, CFG_FORCE_REDRAW); + if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED)) + { + clientUpdateMaximizeSize (c); + clientReconfigure (c, CFG_FORCE_REDRAW); + } } } #ifdef HAVE_STARTUP_NOTIFICATION |