all repos — fluxbox @ f3bd8e7565a482dd4af9a26a51d94c36f9ac6704

custom fork of the fluxbox windowmanager

don't show window on new workspace when warping with outline moving
Mark Tiefenbruck mark@fluxbox.org
commit

f3bd8e7565a482dd4af9a26a51d94c36f9ac6704

parent

706ec5c262dd8b99238d1db4871e6de071cf2624

3 files changed, 21 insertions(+), 53 deletions(-)

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

@@ -1113,6 +1113,12 @@ return;

FbTk::App::instance()->sync(false); + FluxboxWindow *focused = FocusControl::focusedFbWindow(); + + if (focused && focused->isMoving() && doOpaqueMove()) + // don't reassociate if not opaque moving + reassociateWindow(focused, id, true); + // set new workspace Workspace *old = currentWorkspace(); m_current_workspace = getWorkspace(id);

@@ -1120,15 +1126,6 @@

// we show new workspace first in order to appear faster currentWorkspace()->showAll(); - FluxboxWindow *focused = FocusControl::focusedFbWindow(); - - if (focused && focused->isMoving()) { - if (doOpaqueMove()) - reassociateWindow(focused, id, true); - // don't reassociate if not opaque moving - focused->pauseMoving(); - } - // reassociate all windows that are stuck to the new workspace Workspace::Windows wins = old->windowList(); Workspace::Windows::iterator it = wins.begin();

@@ -1145,10 +1142,9 @@ if ((*icon_it)->isStuck())

(*icon_it)->setWorkspace(id); } - if (focused && focused->isMoving()) { + if (focused && focused->isMoving() && doOpaqueMove()) focused->focus(); - focused->resumeMoving(); - } else if (revert) + else if (revert) FocusControl::revertFocus(*this); old->hideAll(false);
M src/Window.ccsrc/Window.cc

@@ -2462,6 +2462,14 @@ // save last event point

m_last_resize_x = me.x_root; m_last_resize_y = me.y_root; + // undraw rectangle before warping workspaces + if (!screen().doOpaqueMove()) { + parent().drawRectangle(screen().rootTheme()->opGC(), + m_last_move_x, m_last_move_y, + frame().width() + 2*frame().window().borderWidth()-1, + frame().height() + 2*frame().window().borderWidth()-1); + } + if (moved_x && screen().isWorkspaceWarping()) { unsigned int cur_id = screen().currentWorkspaceID(); unsigned int new_id = cur_id;

@@ -2492,7 +2500,10 @@ // move the pointer to (m_last_resize_x,m_last_resize_y)

XWarpPointer(display, None, me.root, 0, 0, 0, 0, m_last_resize_x, m_last_resize_y); - screen().sendToWorkspace(new_id, this, true); + if (screen().doOpaqueMove()) + screen().sendToWorkspace(new_id, this, true); + else + screen().changeWorkspaceID(new_id, false); } }

@@ -2505,12 +2516,7 @@

// dx = current left side, dy = current top doSnapping(dx, dy); - if (! screen().doOpaqueMove()) { - parent().drawRectangle(screen().rootTheme()->opGC(), - m_last_move_x, m_last_move_y, - frame().width() + 2*frame().window().borderWidth()-1, - frame().height() + 2*frame().window().borderWidth()-1); - + if (!screen().doOpaqueMove()) { parent().drawRectangle(screen().rootTheme()->opGC(), dx, dy, frame().width() + 2*frame().window().borderWidth()-1,

@@ -2872,38 +2878,6 @@ screen().hidePosition();

ungrabPointer(CurrentTime); FbTk::App::instance()->sync(false); //make sure the redraw is made before we continue -} - -void FluxboxWindow::pauseMoving() { - if (screen().doOpaqueMove()) { - return; - } - - parent().drawRectangle(screen().rootTheme()->opGC(), - m_last_move_x, m_last_move_y, - frame().width() + 2*frame().window().borderWidth()-1, - frame().height() + 2*frame().window().borderWidth()-1); - -} - - -void FluxboxWindow::resumeMoving() { - if (screen().doOpaqueMove()) { - return; - } - - if (m_workspace_number == screen().currentWorkspaceID()) { - frame().show(); - focus(); - } - - FbTk::App::instance()->sync(false); - - parent().drawRectangle(screen().rootTheme()->opGC(), - m_last_move_x, m_last_move_y, - frame().width() + 2*frame().window().borderWidth()-1, - frame().height() + 2*frame().window().borderWidth()-1); - } /**
M src/Window.hhsrc/Window.hh

@@ -297,8 +297,6 @@ void popupMenu(int x, int y);

// popup menu on last button press position void popupMenu(); - void pauseMoving(); - void resumeMoving(); /** @name event handlers */