Keyboard shortcut to raise the dock
authorBrad Jorsch <anomie@users.sourceforge.net>
Wed, 6 Jan 2010 17:50:36 +0000 (6 12:50 -0500)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 7 Jan 2010 11:16:17 +0000 (7 12:16 +0100)
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 ]

WPrefs.app/KeyboardShortcuts.c
WindowMaker/Defaults/WindowMaker.in
src/defaults.c
src/event.c
src/keybind.h

index 2c44b8c..11e2574 100644 (file)
@@ -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"));
index 045d2a4..7bca457 100644 (file)
   ClipLowerKey = None;
   ClipRaiseKey = None;
   ConstrainWindowSize = NO;
+  DockRaiseLowerKey = None;
   ClipRaiseLowerKey = None;
   TitleJustify = center;
   WindowTitleFont = "Sans:bold:pixelsize=12";
index 3611a7d..f32c440 100644 (file)
@@ -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,
index b2aeab3..d1c9ef0 100644 (file)
@@ -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) {
index 2daca8d..7c36695 100644 (file)
@@ -50,6 +50,9 @@ enum {
        /* window, menu */
        WKBD_CLOSE,
 
+       /* Dock */
+       WKBD_DOCKRAISELOWER,
+
        /* Clip */
        WKBD_CLIPLOWER,
        WKBD_CLIPRAISE,