aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 1f2d184..d761016 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2578,6 +2578,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2578 const int warp_pad = screen().getEdgeSnapThreshold(); 2578 const int warp_pad = screen().getEdgeSnapThreshold();
2579 const int workspaces = screen().numberOfWorkspaces(); 2579 const int workspaces = screen().numberOfWorkspaces();
2580 const bool is_warping = screen().isWorkspaceWarping(); 2580 const bool is_warping = screen().isWorkspaceWarping();
2581 const bool is_warping_horzntal = screen().isWorkspaceWarpingHorizontal();
2581 const bool is_warping_vertical = screen().isWorkspaceWarpingVertical(); 2582 const bool is_warping_vertical = screen().isWorkspaceWarpingVertical();
2582 2583
2583 if ((moved_x || moved_y) && is_warping) { 2584 if ((moved_x || moved_y) && is_warping) {
@@ -2590,12 +2591,13 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2590 int bt_top = int(screen().height()) - warp_pad - 1; 2591 int bt_top = int(screen().height()) - warp_pad - 1;
2591 int bt_bottom = warp_pad; 2592 int bt_bottom = warp_pad;
2592 2593
2593 if (moved_x) { 2594 if (moved_x && is_warping_horzntal) {
2595 const int warp_offset = screen().getWorkspaceWarpingHorizontalOffset();
2594 if (me.x_root >= bt_right && moved_x > 0) { //warp right 2596 if (me.x_root >= bt_right && moved_x > 0) { //warp right
2595 new_id = (cur_id + 1) % workspaces; 2597 new_id = (cur_id + warp_offset) % workspaces;
2596 m_last_resize_x = 0; 2598 m_last_resize_x = 0;
2597 } else if (me.x_root <= bt_left && moved_x < 0) { //warp left 2599 } else if (me.x_root <= bt_left && moved_x < 0) { //warp left
2598 new_id = (cur_id + -1) % workspaces; 2600 new_id = (cur_id + workspaces - warp_offset) % workspaces;
2599 m_last_resize_x = screen().width() - 1; 2601 m_last_resize_x = screen().width() - 1;
2600 } 2602 }
2601 } 2603 }