all repos — openbox @ 17fbff7d7029924be0b0be538af02c074dc15270

openbox fork - make it a bit more like ryudo

make the wheel mouse shade anywhere on the titlebar, and not press buttons. thanks woodlbock.
Dana Jansens danakj@orodu.net
commit

17fbff7d7029924be0b0be538af02c074dc15270

parent

0aae72418670c23f3fac604aca62cc8a461704f6

2 files changed, 17 insertions(+), 8 deletions(-)

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

@@ -2739,7 +2739,7 @@ fprintf(stderr, "BlackboxWindow::buttonPressEvent() for 0x%lx\n",

client.window); #endif - if (frame.maximize_button == be->window) { + if (frame.maximize_button == be->window && be->button <= 3) { redrawMaximizeButton(True); } else if (be->button == 1 || (be->button == 3 && be->state == Mod1Mask)) { if (! flags.focused)

@@ -2817,13 +2817,19 @@ }

// mouse wheel up } else if (be->button == 4) { if ((be->window == frame.label || - be->window == frame.title) && + be->window == frame.title || + be->window == frame.maximize_button || + be->window == frame.iconify_button || + be->window == frame.close_button) && ! flags.shaded) shade(); // mouse wheel down } else if (be->button == 5) { if ((be->window == frame.label || - be->window == frame.title) && + be->window == frame.title || + be->window == frame.maximize_button || + be->window == frame.iconify_button || + be->window == frame.close_button) && flags.shaded) shade(); }

@@ -2836,21 +2842,22 @@ fprintf(stderr, "BlackboxWindow::buttonReleaseEvent() for 0x%lx\n",

client.window); #endif - if (re->window == frame.maximize_button) { + if (re->window == frame.maximize_button && + re->button >= 1 && re->button <= 3) { if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) { maximize(re->button); } else { redrawMaximizeButton(flags.maximized); } - } else if (re->window == frame.iconify_button) { + } else if (re->window == frame.iconify_button && re->button == 1) { if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) { iconify(); } else { redrawIconifyButton(False); } - } else if (re->window == frame.close_button) { + } else if (re->window == frame.close_button & re->button == 1) { if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) close();
M src/blackbox.ccsrc/blackbox.cc

@@ -710,9 +710,11 @@

if (win) { if (win->isIconic()) win->deiconify(False, True); + if (win->isShaded()) + win->shade(); if (win->isVisible() && win->setInputFocus()) { - //win->getScreen()->getWorkspace(win->getWorkspaceNumber())-> - // raiseWindow(win); + win->getScreen()->getWorkspace(win->getWorkspaceNumber())-> + raiseWindow(win); win->installColormap(True); } }