all repos — openbox @ 18064df19f670589b9387c194b55345c717473db

openbox fork - make it a bit more like ryudo

add capability to stick a window from input, and make close buttons work.
Dana Jansens danakj@orodu.net
commit

18064df19f670589b9387c194b55345c717473db

parent

351a06655bdd7d440780b5bc5b255081c888044b

4 files changed, 26 insertions(+), 7 deletions(-)

jump to
M src/Input.ccsrc/Input.cc

@@ -205,6 +205,18 @@ case Lower:

if (window) window->lower(); return; + case Stick: + if (window && ! window->isStuck()) window->stick(); + return; + + case Unstick: + if (window && window->isStuck()) window->stick(); + return; + + case ToggleStick: + if (window) window->stick(); + return; + case Shade: if (window && ! window->isShaded()) window->shade(); return;
M src/Input.hhsrc/Input.hh

@@ -64,20 +64,26 @@ Raise,

Lower, Shade, Unshade, + Stick, + Unstick, Focus, Iconify, - ToggleMaximizeVert, - ToggleMaximizeHoriz, - ToggleMaximize, - ToggleShade, Close, + ShowWindowMenu, + BeginMove, BeginResizeUL, BeginResizeUR, BeginResizeLL, BeginResizeLR, BeginResizeRelative, // picks a corner based on the mouse cursor's position - ShowWindowMenu, + + ToggleMaximizeVert, + ToggleMaximizeHoriz, + ToggleMaximize, + ToggleShade, + ToggleStick, + NUM_ACTIONS };
M src/Window.ccsrc/Window.cc

@@ -2750,8 +2750,8 @@ ! input->doAction(this, re->button, state,

BInput::IconifyButtonClick)) redrawIconifyButton(False); } else if (frame.close_button == re->window) { - if ((re->x < 0 || re->x >= static_cast<signed>(frame.button_w)) || - (re->y < 0 || re->y >= static_cast<signed>(frame.button_w))) + if (! ((re->x < 0 || re->x >= static_cast<signed>(frame.button_w)) || + (re->y < 0 || re->y >= static_cast<signed>(frame.button_w)))) input->doAction(this, re->button, state, BInput::CloseButtonClick); redrawCloseButton(False); } else if (flags.moving) {
M src/blackbox.hhsrc/blackbox.hh

@@ -202,6 +202,7 @@

inline XAtom *getXAtom(void) { return xatom; } inline BInput *getInput(void) { return input; } + inline BScreen *getFocusedScreen(void) { return active_screen; } inline BlackboxWindow *getFocusedWindow(void) { return focused_window; } inline BlackboxWindow *getChangingWindow(void) { return changing_window; }