summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-04-26 18:27:39 (GMT)
committerfluxgen <fluxgen>2002-04-26 18:27:39 (GMT)
commit2f19847b98f8c29ae2209aae020eafe17e98bc51 (patch)
tree34fd5a6051b7aaed9151b52ae506975ea3dd1a44 /src
parentdb81115d91dfbcacf246e32f2d257eeb1fc03322 (diff)
downloadfluxbox_lack-2f19847b98f8c29ae2209aae020eafe17e98bc51.zip
fluxbox_lack-2f19847b98f8c29ae2209aae020eafe17e98bc51.tar.bz2
fixed bug in workspace warping
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc6
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 }