all repos — fluxbox @ f32fdc29d28dce26f87e9f10f32e9399686766d8

custom fork of the fluxbox windowmanager

have fullscreen and maximization code call applySizeHints directly
Mark Tiefenbruck mark@fluxbox.org
commit

f32fdc29d28dce26f87e9f10f32e9399686766d8

parent

e5c61a72799485d6751000a127163bd6390d44ba

3 files changed, 11 insertions(+), 28 deletions(-)

jump to
M src/FbWinFrame.hhsrc/FbWinFrame.hh

@@ -209,7 +209,7 @@ const SizeHints &sizeHints() const { return m_size_hints; }

void setSizeHints(const SizeHints &hint) { m_size_hints = hint; } void applySizeHints(unsigned int &width, unsigned int &height, - bool maximizing) const; + bool maximizing = false) const; void displaySize(unsigned int width, unsigned int height) const; void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; }
M src/Window.ccsrc/Window.cc

@@ -1524,8 +1524,6 @@ // be xinerama aware

frame().moveResize(screen().getHeadX(head), screen().getHeadY(head), screen().getHeadWidth(head), screen().getHeadHeight(head)); sendConfigureNotify(); - m_last_resize_x = frame().x(); - m_last_resize_y = frame().y(); fullscreen = true;

@@ -1548,14 +1546,9 @@ setDecorationMask(m_old_decoration_mask);

// ensure we apply the sizehints here, otherwise some // apps (eg xterm) end up a little bit .. crappy (visually) - m_last_resize_x = m_old_pos_x; - m_last_resize_y = m_old_pos_y; - m_last_resize_w = m_old_width; - m_last_resize_h = m_old_height; - m_resize_corner = NOCORNER; - fixsize(); + frame().applySizeHints(m_old_width, m_old_height); - moveResize(m_last_resize_x, m_last_resize_y, m_last_resize_w, m_last_resize_h); + moveResize(m_old_pos_x, m_old_pos_y, m_old_width, m_old_height); moveToLayer(m_old_layernum); m_old_layernum = ::Layer::NORMAL;

@@ -1624,10 +1617,8 @@ if (isResizing())

stopResizing(); int head = screen().getHead(frame().window()); - int new_x = frame().x(), - new_y = frame().y(), - new_w = frame().width(), - new_h = frame().height(); + int new_x = frame().x(), new_y = frame().y(); + unsigned int new_w = frame().width(), new_h = frame().height(); // These evaluate whether we need to TOGGLE the value for that field // Why? If maximize is only set to zero outside this,

@@ -1679,22 +1670,14 @@ }

// ensure we apply the sizehints here, otherwise some // apps (eg xterm) end up a little bit .. crappy (visually) - m_last_resize_x = new_x; - m_last_resize_y = new_y; - m_last_resize_w = new_w; - m_last_resize_h = new_h; // frankly, that xterm bug was pretty obscure, and it's really annoying not // being able to maximize my terminals, so we make an option // but we do fix size hints when restoring the window to normal size - if (!screen().getMaxIgnoreIncrement() || !maximized) { - ResizeDirection old_resize_corner = m_resize_corner; - m_resize_corner = NOCORNER; - fixsize(maximized ? true : false); - m_resize_corner = old_resize_corner; - } + if (!screen().getMaxIgnoreIncrement() || !maximized) + frame().applySizeHints(new_w, new_h, maximized ? true : false); - moveResize(m_last_resize_x, m_last_resize_y, m_last_resize_w, m_last_resize_h); + moveResize(new_x, new_y, new_w, new_h); // notify listeners that we changed state stateSig().notify();

@@ -3715,8 +3698,8 @@ }

int FluxboxWindow::initialState() const { return m_client->initial_state; } -void FluxboxWindow::fixsize(bool maximizing) { - frame().applySizeHints(m_last_resize_w, m_last_resize_h, maximizing); +void FluxboxWindow::fixsize() { + frame().applySizeHints(m_last_resize_w, m_last_resize_h); // move X if necessary if (m_resize_corner == LEFTTOP || m_resize_corner == LEFTBOTTOM ||
M src/Window.hhsrc/Window.hh

@@ -538,7 +538,7 @@

// modifies left and top if snap is necessary void doSnapping(int &left, int &top); // user_w/h return the values that should be shown to the user - void fixsize(bool maximizing = false); + void fixsize(); void moveResizeClient(WinClient &client, int x, int y, unsigned int width, unsigned int height); /// sends configurenotify to all clients void sendConfigureNotify();