From 4bc08709f196e513914e453e2a1117c0823d0a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 23 Jul 2016 23:59:22 +0200 Subject: [PATCH] allow to force moveResize and use on applyState applyState also requires some updates implied by moveResize, notably the reconfigure, the setBackground on the window etcetc. Instead of testing what'd be missing from a moveResize, we just force the latter to apply even when seeming unrequired. This has notable impact when switching fullscreen state for a window with fullscreen dimensions. BUG: 992 --- src/FbWinFrame.cc | 8 ++++---- src/FbWinFrame.hh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 42b81e77..21f174b1 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -272,11 +272,11 @@ void FbWinFrame::resizeForClient(unsigned int width, unsigned int height, moveResizeForClient(0, 0, width, height, win_gravity, client_bw, false, true); } -void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int height, bool move, bool resize) { - if (move && x == window().x() && y == window().y()) +void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int height, bool move, bool resize, bool force) { + if (!force && move && x == window().x() && y == window().y()) move = false; - if (resize && width == FbWinFrame::width() && + if (!force && resize && width == FbWinFrame::width() && height == FbWinFrame::height()) resize = false; @@ -504,7 +504,7 @@ void FbWinFrame::applyState() { new_h = m_screen.getHeadHeight(head); } - moveResize(new_x, new_y, new_w, new_h); + moveResize(new_x, new_y, new_w, new_h, true, true, true); frameExtentSig().emit(); } diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index f8961c82..617b9b91 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -92,7 +92,7 @@ public: // can elect to ignore move or resize (mainly for use of move/resize individual functions void moveResize(int x, int y, unsigned int width, unsigned int height, - bool move = true, bool resize = true); + bool move = true, bool resize = true, bool force = false); // move without transparency or special effects (generally when dragging) void quietMoveResize(int x, int y,