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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-11-09 18:50:38 +01:00
parent c18f5f22f9
commit 265060f1f7

View file

@ -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();
}
}