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

wmaker: Add keyboard shortcuts for keeping window on top or at bottom.

This closes Debian bug #306808 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306808
This commit is contained in:
Doug Torrance
2016-01-19 23:21:45 -05:00
committed by Carlos R. Mafra
parent 65802d3402
commit 563cda28d3
4 changed files with 29 additions and 0 deletions

View File

@@ -89,6 +89,8 @@ static const struct {
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") },
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") },
{ "MaximusKey", N_("Maximus: Tiled maximization ") },
{ "KeepOnTopKey", N_("Toggle window on top status") },
{ "KeepAtBottomKey",N_("Toggle window at bottom status") },
{ "OmnipresentKey", N_("Toggle window omnipresent status") },
{ "RaiseKey", N_("Raise active window") },
{ "LowerKey", N_("Lower active window") },

View File

@@ -684,6 +684,10 @@ WDefaultEntry optionList[] = {
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"MaximusKey", "None", (void*)WKBD_MAXIMUS,
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"KeepOnTopKey", "None", (void *)WKBD_KEEP_ON_TOP,
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"KeepAtBottomKey", "None", (void *)WKBD_KEEP_AT_BOTTOM,
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"OmnipresentKey", "None", (void *)WKBD_OMNIPRESENT,
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"RaiseKey", "\"Meta+Up\"", (void *)WKBD_RAISE,

View File

@@ -1564,6 +1564,27 @@ static void handleKeyPress(XEvent * event)
handleMaximize(wwin, MAX_MAXIMUS | MAX_KEYBOARD);
}
break;
case WKBD_KEEP_ON_TOP:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr);
if (wwin->frame->core->stacking->window_level != WMFloatingLevel)
ChangeStackingLevel(wwin->frame->core, WMFloatingLevel);
else
ChangeStackingLevel(wwin->frame->core, WMNormalLevel);
}
break;
case WKBD_KEEP_AT_BOTTOM:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr);
if (wwin->frame->core->stacking->window_level != WMSunkenLevel)
ChangeStackingLevel(wwin->frame->core, WMSunkenLevel);
else
ChangeStackingLevel(wwin->frame->core, WMNormalLevel);
}
break;
case WKBD_OMNIPRESENT:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr);

View File

@@ -63,6 +63,8 @@ enum {
WKBD_RBCMAXIMIZE,
WKBD_MAXIMUS,
WKBD_SELECT,
WKBD_KEEP_ON_TOP,
WKBD_KEEP_AT_BOTTOM,
WKBD_OMNIPRESENT,
WKBD_RAISE,
WKBD_LOWER,