aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Window.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 3ad5088..f1bf1e9 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -506,6 +506,25 @@ void FluxboxWindow::init() {
506 506
507 fluxbox.attachSignals(*this); 507 fluxbox.attachSignals(*this);
508 508
509 if (!m_state.fullscreen) {
510 unsigned int new_width = 0, new_height = 0;
511 if (m_client->width() >= screen().width()) {
512 m_state.maximized |= WindowState::MAX_HORZ;
513 new_width = 2 * screen().width() / 3;
514 }
515 if (m_client->height() >= screen().height()) {
516 m_state.maximized |= WindowState::MAX_VERT;
517 new_height = 2 * screen().height() / 3;
518 }
519 if (new_width || new_height) {
520 const int maximized = m_state.maximized;
521 m_state.maximized = WindowState::MAX_NONE;
522 resize(new_width ? new_width : width(), new_height ? new_height : height());
523 m_placed = false;
524 m_state.maximized = maximized;
525 }
526 }
527
509 // this window is managed, we are now allowed to modify actual state 528 // this window is managed, we are now allowed to modify actual state
510 m_initialized = true; 529 m_initialized = true;
511 530