all repos — fluxbox @ 42ace977752c4e2dc9e77794d0f9ac73c53437ef

custom fork of the fluxbox windowmanager

allow changing maximization state while window is fullscreen
markt markt
commit

42ace977752c4e2dc9e77794d0f9ac73c53437ef

parent

ecead0f5ede328a75103c32398114586e40f5e45

1 files changed, 9 insertions(+), 13 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -537,17 +537,16 @@ if (!allowsFocusFromClient() || Fluxbox::instance()->isStartup())

m_focused = false; } - // maximization won't work if we think the window is fullscreen - bool tmp_fullscreen = fullscreen; - fullscreen = false; + if (fullscreen) { + fullscreen = false; + setFullscreen(true); + } + if (maximized) { int tmp = maximized; maximized = MAX_NONE; setMaximizedState(tmp); } - - if (tmp_fullscreen) - setFullscreen(true); struct timeval now;

@@ -1596,8 +1595,8 @@ Maximize window both horizontal and vertical

*/ void FluxboxWindow::maximize(int type) { - // doesn't make sense to maximize - if (isFullscreen() || type == MAX_NONE) + // nothing to do + if (type == MAX_NONE) return; int new_max = maximized;

@@ -1618,14 +1617,11 @@ }

void FluxboxWindow::setMaximizedState(int type) { - if (!m_initialized) { - // this will interfere with the window getting placed, so we delay it + if (!m_initialized || isFullscreen() || type == maximized) { + // this will interfere with window placement, so we delay it maximized = type; return; } - - if (isFullscreen() || type == maximized) - return; if (isShaded()) shade();