[Pkg-wmaker-commits] [wmaker] 09/24: wmaker: Add keyboard shortcuts for keeping window on top or at bottom.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Mar 24 20:09:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmaker.
commit 563cda28d36fad44dc8fe299b0ab2aa2b9dc93bc
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Tue Jan 19 23:21:45 2016 -0500
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
---
WPrefs.app/KeyboardShortcuts.c | 2 ++
src/defaults.c | 4 ++++
src/event.c | 21 +++++++++++++++++++++
src/keybind.h | 2 ++
4 files changed, 29 insertions(+)
diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c
index 6984a91..a9241e9 100644
--- a/WPrefs.app/KeyboardShortcuts.c
+++ b/WPrefs.app/KeyboardShortcuts.c
@@ -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") },
diff --git a/src/defaults.c b/src/defaults.c
index ea02295..2346817 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -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,
diff --git a/src/event.c b/src/event.c
index 800cc87..0b394e7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -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);
diff --git a/src/keybind.h b/src/keybind.h
index 87a5cdc..214fd91 100644
--- a/src/keybind.h
+++ b/src/keybind.h
@@ -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,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git
More information about the Pkg-wmaker-commits
mailing list