aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-10-09 00:15:53 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-10-09 00:15:53 (GMT)
commitf3bd8e7565a482dd4af9a26a51d94c36f9ac6704 (patch)
tree2713864a15e2594ca6292a0c3a7e3bcf486caf92 /src/Window.cc
parent706ec5c262dd8b99238d1db4871e6de071cf2624 (diff)
downloadfluxbox-f3bd8e7565a482dd4af9a26a51d94c36f9ac6704.zip
fluxbox-f3bd8e7565a482dd4af9a26a51d94c36f9ac6704.tar.bz2
don't show window on new workspace when warping with outline moving
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc52
1 files changed, 13 insertions, 39 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 8c50f39..e29e761 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2462,6 +2462,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2462 m_last_resize_x = me.x_root; 2462 m_last_resize_x = me.x_root;
2463 m_last_resize_y = me.y_root; 2463 m_last_resize_y = me.y_root;
2464 2464
2465 // undraw rectangle before warping workspaces
2466 if (!screen().doOpaqueMove()) {
2467 parent().drawRectangle(screen().rootTheme()->opGC(),
2468 m_last_move_x, m_last_move_y,
2469 frame().width() + 2*frame().window().borderWidth()-1,
2470 frame().height() + 2*frame().window().borderWidth()-1);
2471 }
2472
2465 if (moved_x && screen().isWorkspaceWarping()) { 2473 if (moved_x && screen().isWorkspaceWarping()) {
2466 unsigned int cur_id = screen().currentWorkspaceID(); 2474 unsigned int cur_id = screen().currentWorkspaceID();
2467 unsigned int new_id = cur_id; 2475 unsigned int new_id = cur_id;
@@ -2492,7 +2500,10 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2492 XWarpPointer(display, None, me.root, 0, 0, 0, 0, 2500 XWarpPointer(display, None, me.root, 0, 0, 0, 0,
2493 m_last_resize_x, m_last_resize_y); 2501 m_last_resize_x, m_last_resize_y);
2494 2502
2495 screen().sendToWorkspace(new_id, this, true); 2503 if (screen().doOpaqueMove())
2504 screen().sendToWorkspace(new_id, this, true);
2505 else
2506 screen().changeWorkspaceID(new_id, false);
2496 } 2507 }
2497 } 2508 }
2498 2509
@@ -2505,12 +2516,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2505 // dx = current left side, dy = current top 2516 // dx = current left side, dy = current top
2506 doSnapping(dx, dy); 2517 doSnapping(dx, dy);
2507 2518
2508 if (! screen().doOpaqueMove()) { 2519 if (!screen().doOpaqueMove()) {
2509 parent().drawRectangle(screen().rootTheme()->opGC(),
2510 m_last_move_x, m_last_move_y,
2511 frame().width() + 2*frame().window().borderWidth()-1,
2512 frame().height() + 2*frame().window().borderWidth()-1);
2513
2514 parent().drawRectangle(screen().rootTheme()->opGC(), 2520 parent().drawRectangle(screen().rootTheme()->opGC(),
2515 dx, dy, 2521 dx, dy,
2516 frame().width() + 2*frame().window().borderWidth()-1, 2522 frame().width() + 2*frame().window().borderWidth()-1,
@@ -2874,38 +2880,6 @@ void FluxboxWindow::stopMoving(bool interrupted) {
2874 FbTk::App::instance()->sync(false); //make sure the redraw is made before we continue 2880 FbTk::App::instance()->sync(false); //make sure the redraw is made before we continue
2875} 2881}
2876 2882
2877void FluxboxWindow::pauseMoving() {
2878 if (screen().doOpaqueMove()) {
2879 return;
2880 }
2881
2882 parent().drawRectangle(screen().rootTheme()->opGC(),
2883 m_last_move_x, m_last_move_y,
2884 frame().width() + 2*frame().window().borderWidth()-1,
2885 frame().height() + 2*frame().window().borderWidth()-1);
2886
2887}
2888
2889
2890void FluxboxWindow::resumeMoving() {
2891 if (screen().doOpaqueMove()) {
2892 return;
2893 }
2894
2895 if (m_workspace_number == screen().currentWorkspaceID()) {
2896 frame().show();
2897 focus();
2898 }
2899
2900 FbTk::App::instance()->sync(false);
2901
2902 parent().drawRectangle(screen().rootTheme()->opGC(),
2903 m_last_move_x, m_last_move_y,
2904 frame().width() + 2*frame().window().borderWidth()-1,
2905 frame().height() + 2*frame().window().borderWidth()-1);
2906
2907}
2908
2909/** 2883/**
2910 * Helper function that snaps a window to another window 2884 * Helper function that snaps a window to another window
2911 * We snap if we're closer than the x/ylimits. 2885 * We snap if we're closer than the x/ylimits.