diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 5830f791..418b2397 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -89,6 +89,7 @@ static const struct { { "LBCMaximizeKey", N_("Maximize active window left bottom corner") }, { "RBCMaximizeKey", N_("Maximize active window right bottom corner") }, { "MaximusKey", N_("Maximus: Tiled maximization ") }, + { "OmnipresentKey", N_("Toggle window omnipresent status") }, { "RaiseKey", N_("Raise active window") }, { "LowerKey", N_("Lower active window") }, { "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") }, diff --git a/src/defaults.c b/src/defaults.c index 6ea935ea..cf344246 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -649,6 +649,8 @@ WDefaultEntry optionList[] = { NULL, getKeybind, setKeyGrab, NULL, NULL}, {"MaximusKey", "None", (void*)WKBD_MAXIMUS, NULL, getKeybind, setKeyGrab, NULL, NULL}, + {"OmnipresentKey", "None", (void *)WKBD_OMNIPRESENT, + NULL, getKeybind, setKeyGrab, NULL, NULL}, {"RaiseKey", "\"Meta+Up\"", (void *)WKBD_RAISE, NULL, getKeybind, setKeyGrab, NULL, NULL}, {"LowerKey", "\"Meta+Down\"", (void *)WKBD_LOWER, diff --git a/src/event.c b/src/event.c index 0d9b9c26..bc590fe5 100644 --- a/src/event.c +++ b/src/event.c @@ -1543,6 +1543,13 @@ static void handleKeyPress(XEvent * event) handleMaximize(wwin, MAX_MAXIMUS | MAX_KEYBOARD); } break; + case WKBD_OMNIPRESENT: + if (ISMAPPED(wwin) && ISFOCUSED(wwin)) { + CloseWindowMenu(scr); + + wWindowSetOmnipresent(wwin, !wwin->flags.omnipresent); + } + break; case WKBD_RAISE: if (ISMAPPED(wwin) && ISFOCUSED(wwin)) { CloseWindowMenu(scr); diff --git a/src/keybind.h b/src/keybind.h index 11f02111..4aaadd47 100644 --- a/src/keybind.h +++ b/src/keybind.h @@ -63,6 +63,7 @@ enum { WKBD_RBCMAXIMIZE, WKBD_MAXIMUS, WKBD_SELECT, + WKBD_OMNIPRESENT, WKBD_RAISE, WKBD_LOWER, WKBD_RAISELOWER,