aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Window.cc22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 767aff5..51a7ee9 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -537,18 +537,17 @@ void FluxboxWindow::init() {
537 m_focused = false; 537 m_focused = false;
538 } 538 }
539 539
540 // maximization won't work if we think the window is fullscreen 540 if (fullscreen) {
541 bool tmp_fullscreen = fullscreen; 541 fullscreen = false;
542 fullscreen = false; 542 setFullscreen(true);
543 }
544
543 if (maximized) { 545 if (maximized) {
544 int tmp = maximized; 546 int tmp = maximized;
545 maximized = MAX_NONE; 547 maximized = MAX_NONE;
546 setMaximizedState(tmp); 548 setMaximizedState(tmp);
547 } 549 }
548 550
549 if (tmp_fullscreen)
550 setFullscreen(true);
551
552 551
553 struct timeval now; 552 struct timeval now;
554 gettimeofday(&now, NULL); 553 gettimeofday(&now, NULL);
@@ -1596,8 +1595,8 @@ void FluxboxWindow::setFullscreen(bool flag) {
1596*/ 1595*/
1597void FluxboxWindow::maximize(int type) { 1596void FluxboxWindow::maximize(int type) {
1598 1597
1599 // doesn't make sense to maximize 1598 // nothing to do
1600 if (isFullscreen() || type == MAX_NONE) 1599 if (type == MAX_NONE)
1601 return; 1600 return;
1602 1601
1603 int new_max = maximized; 1602 int new_max = maximized;
@@ -1618,15 +1617,12 @@ void FluxboxWindow::maximize(int type) {
1618 1617
1619void FluxboxWindow::setMaximizedState(int type) { 1618void FluxboxWindow::setMaximizedState(int type) {
1620 1619
1621 if (!m_initialized) { 1620 if (!m_initialized || isFullscreen() || type == maximized) {
1622 // this will interfere with the window getting placed, so we delay it 1621 // this will interfere with window placement, so we delay it
1623 maximized = type; 1622 maximized = type;
1624 return; 1623 return;
1625 } 1624 }
1626 1625
1627 if (isFullscreen() || type == maximized)
1628 return;
1629
1630 if (isShaded()) 1626 if (isShaded())
1631 shade(); 1627 shade();
1632 1628