From 4bce3e3805212653a0637ee7ccafdb613e40d442 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Sun, 13 Sep 2009 18:28:42 +0200 Subject: [PATCH] Make left/right maximization work again The patch "Clean up maximization and un-maximization logic" introduced a regression wrt to the left/half maximization feature, due to a C operator order precedence issue. --- src/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event.c b/src/event.c index 0834aa91..023e896e 100644 --- a/src/event.c +++ b/src/event.c @@ -1466,7 +1466,7 @@ static void handleKeyPress(XEvent * event) if (ISMAPPED(wwin) && ISFOCUSED(wwin) && IS_RESIZABLE(wwin)) { CloseWindowMenu(scr); - if (wwin->flags.maximized == MAX_VERTICAL | MAX_LEFTHALF) + if (wwin->flags.maximized == (MAX_VERTICAL | MAX_LEFTHALF)) wUnmaximizeWindow(wwin); else wMaximizeWindow(wwin, MAX_VERTICAL | MAX_LEFTHALF | MAX_KEYBOARD); @@ -1476,7 +1476,7 @@ static void handleKeyPress(XEvent * event) if (ISMAPPED(wwin) && ISFOCUSED(wwin) && IS_RESIZABLE(wwin)) { CloseWindowMenu(scr); - if (wwin->flags.maximized == MAX_VERTICAL | MAX_RIGHTHALF) + if (wwin->flags.maximized == (MAX_VERTICAL | MAX_RIGHTHALF)) wUnmaximizeWindow(wwin); else wMaximizeWindow(wwin, MAX_VERTICAL | MAX_RIGHTHALF | MAX_KEYBOARD);