all repos — fluxbox @ 299e098f5f6fc6d33684b3d4e80185c8a7899664

custom fork of the fluxbox windowmanager

handle oversized windows

Clients can still be stupid (feh constrains itself to the root window
...) or lazy (llpp uses the last size - if that was in pivot mode ...)
and create windows which exceed the workspace dimensions, resulting in
both opposing edges being off-screen (for all tested placements)

This applies partial maximization instead and resizes the (restored)
window to soem sane size (size constraints applied)

CCBUG: 688
CCBUG: 984
Thomas Lübking thomas.luebking@gmail.com
commit

299e098f5f6fc6d33684b3d4e80185c8a7899664

parent

4304e667870709f29f0fda9e5fbc56cdd81744cc

1 files changed, 19 insertions(+), 0 deletions(-)

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

@@ -506,6 +506,25 @@ applyDecorations();

fluxbox.attachSignals(*this); + if (!m_state.fullscreen) { + unsigned int new_width = 0, new_height = 0; + if (m_client->width() >= screen().width()) { + m_state.maximized |= WindowState::MAX_HORZ; + new_width = 2 * screen().width() / 3; + } + if (m_client->height() >= screen().height()) { + m_state.maximized |= WindowState::MAX_VERT; + new_height = 2 * screen().height() / 3; + } + if (new_width || new_height) { + const int maximized = m_state.maximized; + m_state.maximized = WindowState::MAX_NONE; + resize(new_width ? new_width : width(), new_height ? new_height : height()); + m_placed = false; + m_state.maximized = maximized; + } + } + // this window is managed, we are now allowed to modify actual state m_initialized = true;