From: Brad Jorsch Date: Wed, 6 Jan 2010 17:50:36 +0000 (-0500) Subject: Keyboard shortcut to raise the dock X-Git-Tag: wmaker-0.94.0-crm~4 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/b6689a0108fd06ba4d7bf22b789b3de531c2ad70?hp=7ef8178d2a19cee4ecc861fbcbeb2bef12f1b6e7 Keyboard shortcut to raise the dock This patch adds the DockRaiseLowerKey shortcut, which raises/lowers the dock depending on whether the dock is lowered/raised. [crmafra: Reformatted Brad's patch against git repo and removed the DockRaiseKey and DockLowerKey shortcuts ] --- diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 2c44b8cf..11e25749 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -116,6 +116,7 @@ static char *keyOptions[] = { "VirtualEdgeUpKey", "VirtualEdgeDownKey", #endif + "DockRaiseLowerKey", "ClipRaiseKey", "ClipLowerKey", #ifndef XKB_MODELOCK @@ -522,6 +523,7 @@ static void createPanel(Panel * p) WMAddListItem(panel->actLs, _("Move VirtualDesktop to next top edge")); WMAddListItem(panel->actLs, _("Move VirtualDesktop to next bottom edge")); #endif + WMAddListItem(panel->actLs, _("Raise/Lower Dock")); WMAddListItem(panel->actLs, _("Raise Clip")); WMAddListItem(panel->actLs, _("Lower Clip")); WMAddListItem(panel->actLs, _("Raise/Lower Clip")); diff --git a/WindowMaker/Defaults/WindowMaker.in b/WindowMaker/Defaults/WindowMaker.in index 045d2a44..7bca457c 100644 --- a/WindowMaker/Defaults/WindowMaker.in +++ b/WindowMaker/Defaults/WindowMaker.in @@ -102,6 +102,7 @@ ClipLowerKey = None; ClipRaiseKey = None; ConstrainWindowSize = NO; + DockRaiseLowerKey = None; ClipRaiseLowerKey = None; TitleJustify = center; WindowTitleFont = "Sans:bold:pixelsize=12"; diff --git a/src/defaults.c b/src/defaults.c index 3611a7df..f32c4401 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -559,6 +559,8 @@ WDefaultEntry optionList[] = { NULL, getKeybind, setKeyGrab}, {"WindowMenuKey", "None", (void *)WKBD_WINDOWMENU, NULL, getKeybind, setKeyGrab}, + {"DockRaiseLowerKey", "None", (void*)WKBD_DOCKRAISELOWER, + NULL, getKeybind, setKeyGrab}, {"ClipLowerKey", "None", (void *)WKBD_CLIPLOWER, NULL, getKeybind, setKeyGrab}, {"ClipRaiseKey", "None", (void *)WKBD_CLIPRAISE, diff --git a/src/event.c b/src/event.c index b2aeab38..d1c9ef0c 100644 --- a/src/event.c +++ b/src/event.c @@ -1690,6 +1690,10 @@ static void handleKeyPress(XEvent * event) if (!wPreferences.flags.noclip) wDockRaiseLower(scr->workspaces[scr->current_workspace]->clip); break; + case WKBD_DOCKRAISELOWER: + if (!wPreferences.flags.nodock) + wDockRaiseLower(scr->dock); + break; #ifdef KEEP_XKB_LOCK_STATUS case WKBD_TOGGLE: if (wPreferences.modelock) { diff --git a/src/keybind.h b/src/keybind.h index 2daca8d6..7c366957 100644 --- a/src/keybind.h +++ b/src/keybind.h @@ -50,6 +50,9 @@ enum { /* window, menu */ WKBD_CLOSE, + /* Dock */ + WKBD_DOCKRAISELOWER, + /* Clip */ WKBD_CLIPLOWER, WKBD_CLIPRAISE,