|
[PATCH 10/11] [RFC] resize window till workspace border: msg#00023window-managers.icewm.devel
this is just a proof of concept: in alt+f8 mode, you can use the kaypad arrows to size the window to workspace borders. +---------------------+ | | | +---+ | | | | | | +---+ | | | | | +---------------------+ alt+f8 KP_Left enter +---------------------+ | | | +-----------------+| | | || | +-----------------+| | | | | +---------------------+ + only up/left/doen/right works + up-left etc. are mssing + next step to resize to next window border (remember Ctrl+Alt+Shift+...)) bert wesarg --- diff -urp old/src/movesize.cc new/src/movesize.cc --- old/src/movesize.cc 2006-11-12 19:20:22.208975915 +0100 +++ new/src/movesize.cc 2006-11-12 19:29:13.772929067 +0100 @@ -254,13 +254,16 @@ int YFrameWindow::handleResizeKeys(const KeySym k = XKeycodeToKeysym(xapp->display(), key.keycode, 0); int m = KEY_MODMASK(key.state); int factor = 1; + int mx, my, Mx, My; + + manager->getWorkArea(this, &mx, &my, &Mx, &My, getScreen()); if (m & ShiftMask) factor = 4; if (m & ControlMask) factor<<= 4; - if (k == XK_Left || k == XK_KP_Left) { + if (k == XK_Left) { if (grabX == 0) { grabX = -1; } else if (grabX == 1) { @@ -269,7 +272,7 @@ int YFrameWindow::handleResizeKeys(const newWidth += incX * factor; newX -= incX * factor; } - } else if (k == XK_Right || k == XK_KP_Right) { + } else if (k == XK_Right) { if (grabX == 0) { grabX = 1; } else if (grabX == 1) { @@ -278,7 +281,7 @@ int YFrameWindow::handleResizeKeys(const newWidth -= incX * factor; newX += incX * factor; } - } else if (k == XK_Up || k == XK_KP_Up) { + } else if (k == XK_Up) { if (grabY == 0) { grabY = -1; } else if (grabY == 1) { @@ -287,7 +290,7 @@ int YFrameWindow::handleResizeKeys(const newHeight += incY * factor; newY -= incY * factor; } - } else if (k == XK_Down || k == XK_KP_Down) { + } else if (k == XK_Down) { if (grabY == 0) { grabY = 1; } else if (grabY == 1) { @@ -296,6 +299,51 @@ int YFrameWindow::handleResizeKeys(const newHeight -= incY * factor; newY += incY * factor; } + } else if (k == XK_KP_Left || k == XK_KP_4) { + if (grabX == 0) { + grabX = -1; + } else if (grabX == 1) { + } else if (grabX == -1) { + newWidth += newX - mx - (considerHorizBorder ? 0 : borderX()); + newX = mx - (considerHorizBorder ? 0 : borderX()); + } + } else if (k == XK_KP_Right || k == XK_KP_6) { + if (grabX == 0) { + grabX = 1; + } else if (grabX == 1) { + newWidth = Mx - mx - newX + (considerHorizBorder ? 0 : borderX()); + } else if (grabX == -1) { + } + } else if (k == XK_KP_Up || k == XK_KP_8) { + if (grabX == 0) { + grabX = -1; + } else if (grabX == 1) { + } else if (grabX == -1) { + newHeight += newY - my - (considerVertBorder ? 0 : borderY()); + newY = my - (considerVertBorder ? 0 : borderY()); + } + } else if (k == XK_KP_Down || k == XK_KP_2) { + if (grabX == 0) { + grabX = 1; + } else if (grabX == 1) { + newHeight = My - my - newY + (considerVertBorder ? 0 : borderY()); + } else if (grabX == -1) { + } +/* + } else if (k == XK_KP_Home || k == XK_KP_7) { + newX = mx - (considerHorizBorder ? 0 : borderX()); + newY = my - (considerVertBorder ? 0 : borderY()); + } else if (k == XK_KP_End || k == XK_KP_1) { + newX = mx - (considerHorizBorder ? 0 : borderX()); + newY = My - height() + (considerVertBorder ? 0 : borderY()); + } else if (k == XK_KP_Prior || k == XK_KP_9) { + newWidth = Mx - mx - newX + (considerHorizBorder ? 0 : borderX()); + newX = Mx - width() + (considerHorizBorder ? 0 : borderX()); + newY = my - (considerVertBorder ? 0 : borderY()); + } else if (k == XK_KP_Next || k == XK_KP_3) { + newX = Mx - width() + (considerHorizBorder ? 0 : borderX()); + newY = My - height() + (considerVertBorder ? 0 : borderY()); +*/ } else if (k == XK_Return || k == XK_KP_Enter) return -1; else if (k == XK_Escape) { ------------------------------------------------------------------------- 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 9/11] improve cpu applet for multi cpu systems: 00023, Bert Wesarg |
|---|---|
| Next by Date: | [PATCH 11/11] [RFC] improve quickswitch window to change workspace: 00023, Bert Wesarg |
| Previous by Thread: | [PATCH 9/11] improve cpu applet for multi cpu systemsi: 00023, Bert Wesarg |
| Next by Thread: | [PATCH 11/11] [RFC] improve quickswitch window to change workspace: 00023, Bert Wesarg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |