From 265060f1f7fe1bc8b2b3cc2ee8ff21dc150da474 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 9 Nov 2012 18:50:38 +0100 Subject: [PATCH] Fix a bug when switching fullscreen mode The code assumed that a window gets resized when it enters/leaves the fullscreen mode. This was needed because the code for resizing a window hides and shows the titlebars. However, it is possible for a window to enter/leave fullscreen mode without getting resized, because it already has the correct geometry. In this case, titlebars were not handled correctly. This commit fixes that by forcing a resize to the current geometry when the fullscreen flag is toggled. Signed-off-by: Uli Schlachter --- objects/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/objects/client.c b/objects/client.c index 20b614d1c..9026f9733 100644 --- a/objects/client.c +++ b/objects/client.c @@ -836,6 +836,8 @@ client_set_fullscreen(lua_State *L, int cidx, bool s) c->fullscreen = s; luaA_object_emit_signal(L, abs_cidx, "request::fullscreen", 1); luaA_object_emit_signal(L, abs_cidx, "property::fullscreen", 0); + /* Force a client resize, so that titlebars get shown/hidden */ + client_resize_do(c, c->geometry, true); stack_windows(); } }