all repos — openbox @ f4d29bb737631dfd085646283b7620ef863303bf

openbox fork - make it a bit more like ryudo

make sure that the only time Click-to-place kicks in is when initially placing/mapping the window
Dana Jansens danakj@orodu.net
commit

f4d29bb737631dfd085646283b7620ef863303bf

parent

5705ea361305e03bd557896b449f0672005f9159

2 files changed, 6 insertions(+), 5 deletions(-)

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

@@ -1452,7 +1452,7 @@ }

} -void OpenboxWindow::deiconify(Bool reassoc, Bool raise) { +void OpenboxWindow::deiconify(bool reassoc, bool raise, bool initial) { if (flags.iconic || reassoc) screen->reassociateWindow(this, -1, False); else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID())

@@ -1470,8 +1470,8 @@ XMapWindow(display, frame.window);

// if we're using the click to place placement type, then immediately // after the window is mapped, we need to start interactively moving it - if (screen->placementPolicy() == BScreen::ClickMousePlacement && - place_window && !(flags.iconic || reassoc)) { + if (initial && place_window && + screen->placementPolicy() == BScreen::ClickMousePlacement) { // if the last window wasn't placed yet, or we're just moving a window // already, finish off that move cleanly OpenboxWindow *w = openbox.getFocusedWindow();

@@ -2243,7 +2243,8 @@ case NormalState:

case InactiveState: case ZoomState: default: - deiconify(False); + deiconify(False, True, True); // specify that we're initializing the + // window break; }
M src/Window.hsrc/Window.h

@@ -321,7 +321,7 @@ Bool setInputFocus();

void setFocusFlag(Bool); void iconify(); - void deiconify(Bool reassoc = True, Bool raise = True); + void deiconify(bool reassoc = true, bool raise = true, bool initial = false); void close(); void withdraw(); void maximize(unsigned int button);