1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

wmaker: Support omnipresent setting toggle from keyboard

This commit is contained in:
Gaspar Chilingarov
2014-11-10 15:28:51 +04:00
committed by Carlos R. Mafra
parent 33855a7a12
commit 7cb948098a
4 changed files with 11 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ static const struct {
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") }, { "LBCMaximizeKey", N_("Maximize active window left bottom corner") },
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") }, { "RBCMaximizeKey", N_("Maximize active window right bottom corner") },
{ "MaximusKey", N_("Maximus: Tiled maximization ") }, { "MaximusKey", N_("Maximus: Tiled maximization ") },
{ "OmnipresentKey", N_("Toggle window omnipresent status") },
{ "RaiseKey", N_("Raise active window") }, { "RaiseKey", N_("Raise active window") },
{ "LowerKey", N_("Lower active window") }, { "LowerKey", N_("Lower active window") },
{ "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") }, { "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") },

View File

@@ -649,6 +649,8 @@ WDefaultEntry optionList[] = {
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"MaximusKey", "None", (void*)WKBD_MAXIMUS, {"MaximusKey", "None", (void*)WKBD_MAXIMUS,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"OmnipresentKey", "None", (void *)WKBD_OMNIPRESENT,
NULL, getKeybind, setKeyGrab, NULL, NULL},
{"RaiseKey", "\"Meta+Up\"", (void *)WKBD_RAISE, {"RaiseKey", "\"Meta+Up\"", (void *)WKBD_RAISE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"LowerKey", "\"Meta+Down\"", (void *)WKBD_LOWER, {"LowerKey", "\"Meta+Down\"", (void *)WKBD_LOWER,

View File

@@ -1543,6 +1543,13 @@ static void handleKeyPress(XEvent * event)
handleMaximize(wwin, MAX_MAXIMUS | MAX_KEYBOARD); handleMaximize(wwin, MAX_MAXIMUS | MAX_KEYBOARD);
} }
break; break;
case WKBD_OMNIPRESENT:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr);
wWindowSetOmnipresent(wwin, !wwin->flags.omnipresent);
}
break;
case WKBD_RAISE: case WKBD_RAISE:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)) { if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {
CloseWindowMenu(scr); CloseWindowMenu(scr);

View File

@@ -63,6 +63,7 @@ enum {
WKBD_RBCMAXIMIZE, WKBD_RBCMAXIMIZE,
WKBD_MAXIMUS, WKBD_MAXIMUS,
WKBD_SELECT, WKBD_SELECT,
WKBD_OMNIPRESENT,
WKBD_RAISE, WKBD_RAISE,
WKBD_LOWER, WKBD_LOWER,
WKBD_RAISELOWER, WKBD_RAISELOWER,