diff options
-rw-r--r-- | src/Window.cc | 6 |
1 files 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 @@ | |||
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.46 2002/04/17 07:24:59 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.47 2002/04/26 18:27:39 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -3348,12 +3348,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) { | |||
3348 | int cur_id = screen->getCurrentWorkspaceID(); | 3348 | int cur_id = screen->getCurrentWorkspaceID(); |
3349 | int new_id = cur_id; | 3349 | int new_id = cur_id; |
3350 | const int warpPad = screen->getEdgeSnapThreshold(); | 3350 | const int warpPad = screen->getEdgeSnapThreshold(); |
3351 | if (me->x_root >= int(screen->getWidth()) - warpPad && | 3351 | if (me->x_root >= int(screen->getWidth()) - warpPad - 1 && |
3352 | frame.x < int(me->x_root - frame.grab_x - screen->getBorderWidth())) { | 3352 | frame.x < int(me->x_root - frame.grab_x - screen->getBorderWidth())) { |
3353 | //warp right | ||
3353 | new_id = (cur_id + 1) % screen->getCount(); | 3354 | new_id = (cur_id + 1) % screen->getCount(); |
3354 | dx = -me->x_root; | 3355 | dx = -me->x_root; |
3355 | } else if (me->x_root <= warpPad && | 3356 | } else if (me->x_root <= warpPad && |
3356 | frame.x > int(me->x_root - frame.grab_x - screen->getBorderWidth())) { | 3357 | frame.x > int(me->x_root - frame.grab_x - screen->getBorderWidth())) { |
3358 | //warp left | ||
3357 | new_id = (cur_id - 1 + screen->getCount()) % screen->getCount(); | 3359 | new_id = (cur_id - 1 + screen->getCount()) % screen->getCount(); |
3358 | dx = screen->getWidth() - me->x_root; | 3360 | dx = screen->getWidth() - me->x_root; |
3359 | } | 3361 | } |