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:
committed by
Carlos R. Mafra
parent
328251c68a
commit
6924454836
26
src/event.c
26
src/event.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user