summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc48
1 files changed, 30 insertions, 18 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 35794ef..2190c5c 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2824,14 +2824,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2824 m_resize_corner = (me.y < cy) ? RIGHTTOP : RIGHTBOTTOM; 2824 m_resize_corner = (me.y < cy) ? RIGHTTOP : RIGHTBOTTOM;
2825 2825
2826 startResizing(me.window, me.x, me.y); 2826 startResizing(me.window, me.x, me.y);
2827 } else if (resizing) {
2828 // draw over old rect
2829 parent().drawRectangle(screen().rootTheme().opGC(),
2830 m_last_resize_x, m_last_resize_y,
2831 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
2832 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
2833
2834 2827
2828 } else if (resizing) {
2829
2830 int old_resize_x = m_last_resize_x;
2831 int old_resize_y = m_last_resize_y;
2832 int old_resize_w = m_last_resize_w;
2833 int old_resize_h = m_last_resize_h;
2834
2835 // move rectangle 2835 // move rectangle
2836 int gx = 0, gy = 0; 2836 int gx = 0, gy = 0;
2837 2837
@@ -2854,13 +2854,25 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2854 2854
2855 fixsize(&gx, &gy); 2855 fixsize(&gx, &gy);
2856 2856
2857 // draw resize rectangle 2857 if (old_resize_x != m_last_resize_x ||
2858 parent().drawRectangle(screen().rootTheme().opGC(), 2858 old_resize_y != m_last_resize_y ||
2859 m_last_resize_x, m_last_resize_y, 2859 old_resize_w != m_last_resize_w ||
2860 m_last_resize_w - 1 + 2 * frame().window().borderWidth(), 2860 old_resize_h != m_last_resize_h ) {
2861 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
2862 2861
2863 screen().showGeometry(gx, gy); 2862 // draw over old rect
2863 parent().drawRectangle(screen().rootTheme().opGC(),
2864 old_resize_x, old_resize_y,
2865 old_resize_w - 1 + 2 * frame().window().borderWidth(),
2866 old_resize_h - 1 + 2 * frame().window().borderWidth());
2867
2868 // draw resize rectangle
2869 parent().drawRectangle(screen().rootTheme().opGC(),
2870 m_last_resize_x, m_last_resize_y,
2871 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
2872 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
2873
2874 screen().showGeometry(gx, gy);
2875 }
2864 } 2876 }
2865 } else if (functions.tabable && 2877 } else if (functions.tabable &&
2866 (me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) { 2878 (me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) {
@@ -3355,6 +3367,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
3355 3367
3356 3368
3357void FluxboxWindow::startResizing(Window win, int x, int y) { 3369void FluxboxWindow::startResizing(Window win, int x, int y) {
3370
3358 if (s_num_grabs > 0 || isShaded() || isIconic() ) 3371 if (s_num_grabs > 0 || isShaded() || isIconic() )
3359 return; 3372 return;
3360 3373
@@ -3379,18 +3392,17 @@ void FluxboxWindow::startResizing(Window win, int x, int y) {
3379 3392
3380 fixsize(&gx, &gy); 3393 fixsize(&gx, &gy);
3381 3394
3382
3383 screen().showGeometry(gx, gy); 3395 screen().showGeometry(gx, gy);
3384 3396
3385 parent().drawRectangle(screen().rootTheme().opGC(), 3397 parent().drawRectangle(screen().rootTheme().opGC(),
3386 m_last_resize_x, m_last_resize_y, 3398 m_last_resize_x, m_last_resize_y,
3387 m_last_resize_w - 1 + 2 * frame().window().borderWidth(), 3399 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
3388 m_last_resize_h - 1 + 2 * frame().window().borderWidth()); 3400 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
3389} 3401}
3390 3402
3391void FluxboxWindow::stopResizing(bool interrupted) { 3403void FluxboxWindow::stopResizing(bool interrupted) {
3392 resizing = false; 3404 resizing = false;
3393 3405
3394 parent().drawRectangle(screen().rootTheme().opGC(), 3406 parent().drawRectangle(screen().rootTheme().opGC(),
3395 m_last_resize_x, m_last_resize_y, 3407 m_last_resize_x, m_last_resize_y,
3396 m_last_resize_w - 1 + 2 * frame().window().borderWidth(), 3408 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),