1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

Left Half / Right Half Maximize

This adds Left Half / Right Half Maximize capability to WindowMaker.
It allows you to maximize a window to only the left or right half
of your screen.

It is useful on widescreen displays where one might to bring up
two different windows side-by-side.
This commit is contained in:
Johann Haarhoff
2009-08-28 21:31:26 +02:00
committed by Carlos R. Mafra
parent 328251c68a
commit 6924454836
7 changed files with 94 additions and 46 deletions

View File

@@ -1471,6 +1471,32 @@ static void handleKeyPress(XEvent * event)
}
}
break;
case WKBD_LHMAXIMIZE:
if (ISMAPPED(wwin) && ISFOCUSED(wwin) && IS_RESIZABLE(wwin)) {
int newdir = (MAX_VERTICAL|MAX_LEFTHALF);
CloseWindowMenu(scr);
if (wwin->flags.maximized == newdir) {
wUnmaximizeWindow(wwin);
} else {
wMaximizeWindow(wwin, newdir|MAX_KEYBOARD);
}
}
break;
case WKBD_RHMAXIMIZE:
if (ISMAPPED(wwin) && ISFOCUSED(wwin) && IS_RESIZABLE(wwin)) {
int newdir = (MAX_VERTICAL|MAX_RIGHTHALF);
CloseWindowMenu(scr);
if (wwin->flags.maximized == newdir) {
wUnmaximizeWindow(wwin);
} else {
wMaximizeWindow(wwin, newdir|MAX_KEYBOARD);
}
}
break;
case WKBD_RAISE:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr);