From 2f19847b98f8c29ae2209aae020eafe17e98bc51 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 26 Apr 2002 18:27:39 +0000 Subject: fixed bug in workspace warping --- src/Window.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index c29cf72..03d3f04 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.46 2002/04/17 07:24:59 fluxgen Exp $ +// $Id: Window.cc,v 1.47 2002/04/26 18:27:39 fluxgen Exp $ #include "Window.hh" @@ -3348,12 +3348,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) { int cur_id = screen->getCurrentWorkspaceID(); int new_id = cur_id; const int warpPad = screen->getEdgeSnapThreshold(); - if (me->x_root >= int(screen->getWidth()) - warpPad && + if (me->x_root >= int(screen->getWidth()) - warpPad - 1 && frame.x < int(me->x_root - frame.grab_x - screen->getBorderWidth())) { + //warp right new_id = (cur_id + 1) % screen->getCount(); dx = -me->x_root; } else if (me->x_root <= warpPad && frame.x > int(me->x_root - frame.grab_x - screen->getBorderWidth())) { + //warp left new_id = (cur_id - 1 + screen->getCount()) % screen->getCount(); dx = screen->getWidth() - me->x_root; } -- cgit v0.11.2