summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Window.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 741892a..a778c01 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.74 2002/08/30 16:07:17 fluxgen Exp $ 25// $Id: Window.cc,v 1.75 2002/08/31 10:52:30 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -3263,8 +3263,12 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
3263 else if (dby > 0 && dby < screen->getEdgeSnapThreshold()) 3263 else if (dby > 0 && dby < screen->getEdgeSnapThreshold())
3264 dy = dbby - frame.snap_h; 3264 dy = dbby - frame.snap_h;
3265 } 3265 }
3266 // Warp to next or previous workspace? 3266 // Warp to next or previous workspace?, must have moved sideways some
3267 if (screen->isWorkspaceWarping()) { 3267 int moved_x=me->x_root - frame.resize_x;
3268 // save last event point
3269 frame.resize_x = me->x_root;
3270 frame.resize_y = me->y_root;
3271 if (moved_x && screen->isWorkspaceWarping()) {
3268 int cur_id = screen->getCurrentWorkspaceID(); 3272 int cur_id = screen->getCurrentWorkspaceID();
3269 int new_id = cur_id; 3273 int new_id = cur_id;
3270 const int warpPad = screen->getEdgeSnapThreshold(); 3274 const int warpPad = screen->getEdgeSnapThreshold();
@@ -3277,13 +3281,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
3277 frame.x > int(me->x_root - frame.grab_x - screen->getBorderWidth())) { 3281 frame.x > int(me->x_root - frame.grab_x - screen->getBorderWidth())) {
3278 //warp left 3282 //warp left
3279 new_id = (cur_id - 1 + screen->getCount()) % screen->getCount(); 3283 new_id = (cur_id - 1 + screen->getCount()) % screen->getCount();
3280 dx = screen->getWidth() - me->x_root; 3284 dx = screen->getWidth() - me->x_root-1;
3281 } 3285 }
3282 if (new_id != cur_id) { 3286 if (new_id != cur_id) {
3283 XWarpPointer(display, None, None, 0, 0, 0, 0, dx, 0); 3287 XWarpPointer(display, None, None, 0, 0, 0, 0, dx, 0);
3284 3288
3285 screen->changeWorkspaceID(new_id); 3289 screen->changeWorkspaceID(new_id);
3286 3290
3291 frame.resize_x = me->x_root+dx;
3287 if (!screen->doOpaqueMove()) { 3292 if (!screen->doOpaqueMove()) {
3288 dx += frame.move_x; // for rectangle in correct position 3293 dx += frame.move_x; // for rectangle in correct position
3289 } else { 3294 } else {