aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-27 12:31:43 (GMT)
committerfluxgen <fluxgen>2003-04-27 12:31:43 (GMT)
commitecf483e0c64d4123e16298464260af5ab6ed3c55 (patch)
tree78be588aee3c5c17266131f312071e416feb04a9
parent2fb9e90627c613db822ca077d55dce14f5fe672a (diff)
downloadfluxbox-ecf483e0c64d4123e16298464260af5ab6ed3c55.zip
fluxbox-ecf483e0c64d4123e16298464260af5ab6ed3c55.tar.bz2
fixed workspace warp bug
-rw-r--r--src/Window.cc41
1 files changed, 25 insertions, 16 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 0e256d1..5c40cc0 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.151 2003/04/27 04:28:03 rathnor Exp $ 25// $Id: Window.cc,v 1.152 2003/04/27 12:31:43 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -2321,15 +2321,21 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2321 doSnapping(dx, dy); 2321 doSnapping(dx, dy);
2322 2322
2323 if (! screen.doOpaqueMove()) { 2323 if (! screen.doOpaqueMove()) {
2324 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(), 2324 XDrawRectangle(display, screen.getRootWindow(),
2325 screen.rootTheme().opGC(),
2325 last_move_x, last_move_y, 2326 last_move_x, last_move_y,
2326 m_frame.width() + 2*frame().window().borderWidth()-1, 2327 m_frame.width() +
2327 m_frame.height() + 2*frame().window().borderWidth()-1); 2328 2*frame().window().borderWidth() - 1,
2329 m_frame.height() +
2330 2*frame().window().borderWidth() - 1);
2328 2331
2329 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(), 2332 XDrawRectangle(display, screen.getRootWindow(),
2333 screen.rootTheme().opGC(),
2330 dx, dy, 2334 dx, dy,
2331 m_frame.width() + 2*frame().window().borderWidth()-1, 2335 m_frame.width() +
2332 m_frame.height() + 2*frame().window().borderWidth()-1); 2336 2*frame().window().borderWidth()-1,
2337 m_frame.height() +
2338 2*frame().window().borderWidth()-1);
2333 last_move_x = dx; 2339 last_move_x = dx;
2334 last_move_y = dy; 2340 last_move_y = dy;
2335 } else { 2341 } else {
@@ -2350,7 +2356,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2350 startResizing(me.window, me.x, me.y, left); 2356 startResizing(me.window, me.x, me.y, left);
2351 } else if (resizing) { 2357 } else if (resizing) {
2352 // draw over old rect 2358 // draw over old rect
2353 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(), 2359 XDrawRectangle(display, screen.getRootWindow(),
2360 screen.rootTheme().opGC(),
2354 last_resize_x, last_resize_y, 2361 last_resize_x, last_resize_y,
2355 last_resize_w - 1 + 2 * m_frame.window().borderWidth(), 2362 last_resize_w - 1 + 2 * m_frame.window().borderWidth(),
2356 last_resize_h - 1 + 2 * m_frame.window().borderWidth()); 2363 last_resize_h - 1 + 2 * m_frame.window().borderWidth());
@@ -2378,7 +2385,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2378 } 2385 }
2379 2386
2380 // draw resize rectangle 2387 // draw resize rectangle
2381 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(), 2388 XDrawRectangle(display, screen.getRootWindow(),
2389 screen.rootTheme().opGC(),
2382 last_resize_x, last_resize_y, 2390 last_resize_x, last_resize_y,
2383 last_resize_w - 1 + 2 * m_frame.window().borderWidth(), 2391 last_resize_w - 1 + 2 * m_frame.window().borderWidth(),
2384 last_resize_h - 1 + 2 * m_frame.window().borderWidth()); 2392 last_resize_h - 1 + 2 * m_frame.window().borderWidth());
@@ -2469,7 +2477,6 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2469 ev.window == m_client->window()) { 2477 ev.window == m_client->window()) {
2470 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus()) 2478 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus())
2471 && !isFocused()) { 2479 && !isFocused()) {
2472
2473 2480
2474 // check that there aren't any subsequent leave notify events in the 2481 // check that there aren't any subsequent leave notify events in the
2475 // X event queue 2482 // X event queue
@@ -2481,7 +2488,6 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2481 2488
2482 if ((!sa.leave || sa.inferior) && setInputFocus()) 2489 if ((!sa.leave || sa.inferior) && setInputFocus())
2483 installColormap(True); 2490 installColormap(True);
2484
2485 2491
2486 } 2492 }
2487 } 2493 }
@@ -2647,15 +2653,18 @@ void FluxboxWindow::stopMoving() {
2647 2653
2648 2654
2649 if (! screen.doOpaqueMove()) { 2655 if (! screen.doOpaqueMove()) {
2650 XDrawRectangle(FbTk::App::instance()->display(), screen.getRootWindow(), screen.rootTheme().opGC(), 2656 XDrawRectangle(FbTk::App::instance()->display(),
2657 screen.getRootWindow(), screen.rootTheme().opGC(),
2651 last_move_x, last_move_y, 2658 last_move_x, last_move_y,
2652 frame().width() + 2*frame().window().borderWidth()-1, 2659 frame().width() + 2*frame().window().borderWidth() - 1,
2653 frame().height() + 2*frame().window().borderWidth()-1); 2660 frame().height() + 2*frame().window().borderWidth() - 1);
2661
2654 moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height()); 2662 moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height());
2663
2655 if (workspace_number != getScreen().getCurrentWorkspaceID()) { 2664 if (workspace_number != getScreen().getCurrentWorkspaceID()) {
2656 screen.reassociateWindow(this, getScreen().getCurrentWorkspaceID(), true); 2665 deiconify(true, false);
2657 m_frame.show();
2658 } 2666 }
2667
2659 fluxbox->ungrab(); 2668 fluxbox->ungrab();
2660 } else 2669 } else
2661 moveResize(m_frame.x(), m_frame.y(), m_frame.width(), m_frame.height()); 2670 moveResize(m_frame.x(), m_frame.y(), m_frame.width(), m_frame.height());