all repos — openbox @ a9bfdcaa06b42e9c0de06042f79d1920361aaa25

openbox fork - make it a bit more like ryudo

making warping work.. hopefully.
fix for leaving !normal windows behind in the window list
Dana Jansens danakj@orodu.net
commit

a9bfdcaa06b42e9c0de06042f79d1920361aaa25

parent

183cf03a4f45196213c9d52d6cfe4b9da00d3e26

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

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

@@ -3119,12 +3119,8 @@ if (! warp)

return; endMove(); + bool focus = flags.focused; // had focus while moving? - if (! flags.stuck) - screen->reassociateWindow(this, dest, False); - screen->changeWorkspaceID(dest); - if (focus) - setInputFocus(); int dest_x = x_root; if (x_root <= 0) {

@@ -3136,19 +3132,25 @@ dx -= screen->getRect().width() - 1;

} /* - We grab the X server here because we are moving the window and then the - mouse cursor. When one moves, it could end up putting the mouse cursor - over another window for a moment. This can cause the warp to iniate a - move on another window. + We grab the X server here so that we dont end up magically grabbing + a different window dring the warp. */ XGrabServer(blackbox->getXDisplay()); + if (! flags.stuck) + screen->reassociateWindow(this, dest, False); + screen->changeWorkspaceID(dest); + configure(dx, dy, frame.rect.width(), frame.rect.height()); + XWarpPointer(blackbox->getXDisplay(), None, screen->getRootWindow(), 0, 0, 0, 0, dest_x, y_root); XUngrabServer(blackbox->getXDisplay()); + + if (focus) + setInputFocus(); beginMove(dest_x, y_root); }
M src/Workspace.ccsrc/Workspace.cc

@@ -85,11 +85,18 @@ if (place) placeWindow(w);

stackingList.push_front(w); - if (w->isNormal()) { + if (! sticky) + w->setWorkspace(id); + + if (! w->isNormal()) { if (! sticky) { - w->setWorkspace(id); - w->setWindowNumber(windowList.size()); + // just give it some number, else bad things happen as it is assumed to + // not be on a workspace + w->setWindowNumber(0); } + } else { + if (! sticky) + w->setWindowNumber(windowList.size()); windowList.push_back(w);

@@ -110,11 +117,6 @@ */

lastfocus = w; } } - } else { - w->setWorkspace(id); - // just give it some number, else bad things happen as it is assumed to not - // be on a workspace - w->setWindowNumber(0); } if (! w->isDesktop())