|
[PATCH 7/11] keybindings to change layer of window up/down: msg#00020window-managers.icewm.devel
this adds keybindings to change the layer of the focused window default is: 'Ctrl+Alt+Page_Up' to raise layer 'Ctrl+Alt+Page_Down' to lower layer bert wesarg --- diff -urp old/src/bindkey.h new/src/bindkey.h --- old/src/bindkey.h 2006-09-10 18:12:10.000000000 +0200 +++ new/src/bindkey.h 2006-11-12 19:20:22.207975576 +0100 @@ -36,6 +36,8 @@ #define defgKeyWinSnapMoveW XK_KP_Left, kfCtrl+kfAlt+kfShift, "Ctrl+Alt+Shift+KP_4" #define defgKeyWinSnapMoveNW XK_KP_Home, kfCtrl+kfAlt+kfShift, "Ctrl+Alt+Shift+KP_7" #define defgKeyWinSmartPlace XK_KP_Begin, kfCtrl+kfAlt+kfShift, "Ctrl+Alt+Shift+KP_5" +#define defgKeyWinLayerRaise XK_Page_Up, kfCtrl+kfAlt, "Ctrl+Alt+Page_Up" +#define defgKeyWinLayerLower XK_Page_Down, kfCtrl+kfAlt, "Ctrl+Alt+Page_Down" #define defgKeySysSwitchNext XK_Tab, kfAlt, "Alt+Tab" #define defgKeySysSwitchLast XK_Tab, kfAlt+kfShift, "Alt+Shift+Tab" #define defgKeySysWinNext XK_Escape, kfAlt, "Alt+Esc" @@ -152,6 +154,8 @@ DEF_WMKEY(gKeyWinSnapMoveSW); DEF_WMKEY(gKeyWinSnapMoveW); DEF_WMKEY(gKeyWinSnapMoveNW); DEF_WMKEY(gKeyWinSmartPlace); +DEF_WMKEY(gKeyWinLayerRaise); +DEF_WMKEY(gKeyWinLayerLower); DEF_WMKEY(gKeyWinMenu); DEF_WMKEY(gKeySysSwitchNext); DEF_WMKEY(gKeySysSwitchLast); diff -urp old/src/default.h new/src/default.h --- old/src/default.h 2006-11-12 17:47:29.960143573 +0100 +++ new/src/default.h 2006-11-12 19:20:22.208975915 +0100 @@ -401,6 +401,8 @@ cfoption icewm_preferences[] = { OKV("KeyWinSnapMoveW", gKeyWinSnapMoveW, "Move the window left until its bounce to an other window border"), OKV("KeyWinSnapMoveNW", gKeyWinSnapMoveNW, "Move the window up/left until its bounce to an other window border"), OKV("KeyWinSmartPlace", gKeyWinSmartPlace, "Smart window placement (minimal overlap)"), + OKV("KeyWinLayerRaise", gKeyWinLayerRaise, "Raise the window one layer"), + OKV("KeyWinLayerLower", gKeyWinLayerLower, "Lower the window one layer"), OKV("KeySysSwitchNext", gKeySysSwitchNext, ""), OKV("KeySysSwitchLast", gKeySysSwitchLast, ""), OKV("KeySysWinNext", gKeySysWinNext, ""), diff -urp old/src/movesize.cc new/src/movesize.cc --- old/src/movesize.cc 2006-09-10 18:12:11.000000000 +0200 +++ new/src/movesize.cc 2006-11-12 19:20:22.208975915 +0100 @@ -822,6 +822,10 @@ bool YFrameWindow::handleKey(const XKeyE setCurrentPositionOuter(newX, newY); } } + } else if (IS_WMKEY(k, vm, gKeyWinLayerRaise)) { + wmSetLayer(fWinRequestedLayer + 2); + } else if (IS_WMKEY(k, vm, gKeyWinLayerLower)) { + wmSetLayer(fWinRequestedLayer - 2); } else if (isIconic() || isRollup()) { if (k == XK_Return || k == XK_KP_Enter) { wmRestore(); diff -urp old/src/wmaction.cc new/src/wmaction.cc --- old/src/wmaction.cc 2006-09-10 18:12:11.000000000 +0200 +++ new/src/wmaction.cc 2006-11-12 19:20:22.209976253 +0100 @@ -18,6 +18,8 @@ YAction *actionHide(0); YAction *actionShow(0); YAction *actionRaise(0); YAction *actionLower(0); +YAction *actionLayerRaise(0); +YAction *actionLayerLower(0); YAction *actionDepth(0); YAction *actionMove(0); YAction *actionSize(0); @@ -67,6 +69,8 @@ void initActions() { actionShow = new YAction(); actionRaise = new YAction(); actionLower = new YAction(); + actionLayerRaise = new YAction(); + actionLayerLower = new YAction(); actionDepth = new YAction(); actionMove = new YAction(); actionSize = new YAction(); diff -urp old/src/wmaction.h new/src/wmaction.h --- old/src/wmaction.h 2006-09-10 18:12:10.000000000 +0200 +++ new/src/wmaction.h 2006-11-12 19:20:22.209976253 +0100 @@ -25,6 +25,8 @@ extern YAction *actionHide; extern YAction *actionShow; extern YAction *actionRaise; extern YAction *actionLower; +extern YAction *actionLayerRaise; +extern YAction *actionLayerLower; extern YAction *actionDepth; extern YAction *actionMove; extern YAction *actionSize; diff -urp old/src/wmapp.cc new/src/wmapp.cc --- old/src/wmapp.cc 2006-11-12 19:18:47.051733300 +0100 +++ new/src/wmapp.cc 2006-11-12 19:20:22.225981676 +0100 @@ -771,6 +771,9 @@ static void initMenus() { layerMenu->addItem(_("_Normal"), -2, 0, layerActionSet[WinLayerNormal]); layerMenu->addItem(_("_Below"), -2, 0, layerActionSet[WinLayerBelow]); layerMenu->addItem(_("D_esktop"), -2, 0, layerActionSet[WinLayerDesktop]); + layerMenu->addSeparator(); + layerMenu->addItem(_("_Raise Layer"), -2, KEY_NAME(gKeyWinLayerRaise), actionLayerRaise); + layerMenu->addItem(_("_Lower Layer"), -2, KEY_NAME(gKeyWinLayerLower), actionLayerLower); moveMenu = new YMenu(); assert(moveMenu != 0); diff -urp old/src/wmframe.cc new/src/wmframe.cc --- old/src/wmframe.cc 2006-11-08 17:17:57.056395693 +0100 +++ new/src/wmframe.cc 2006-11-12 19:20:22.227982354 +0100 @@ -565,6 +565,8 @@ void YFrameWindow::grabKeys() { GRAB_WMKEY(gKeyWinSnapMoveW); GRAB_WMKEY(gKeyWinSnapMoveNW); GRAB_WMKEY(gKeyWinSmartPlace); + GRAB_WMKEY(gKeyWinLayerRaise); + GRAB_WMKEY(gKeyWinLayerLower); } void YFrameWindow::manage(YFrameClient *client) { @@ -1272,6 +1274,10 @@ void YFrameWindow::actionPerformed(YActi } else if (action == actionToggleTray) { wmToggleTray(); #endif + } else if (action == actionLayerRaise) { + wmSetLayer(fWinRequestedLayer + 2); + } else if (action == actionLayerLower) { + wmSetLayer(fWinRequestedLayer - 2); } else { for (int l(0); l < WinLayerCount; l++) { if (action == layerActionSet[l]) { ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [PATCH 6/11] icesm: wait for the end of the .icewm/shutdown script: 00020, Bert Wesarg |
|---|---|
| Next by Date: | [PATCH 8/11] prevent quick switch to windows in tray: 00020, Bert Wesarg |
| Previous by Thread: | [PATCH 6/11] icesm: wait for the end of the .icewm/shutdown scripti: 00020, Bert Wesarg |
| Next by Thread: | [PATCH 8/11] prevent quick switch to windows in tray: 00020, Bert Wesarg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |