summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_wm.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2004-09-16 01:59:40 +0000
committerjsorg71 <jsorg71>2004-09-16 01:59:40 +0000
commit2ed9412912adf4e61dbf64f598e8f439ac4683cf (patch)
tree2d72b63194b0f0b4bfa05da983a50ce3537bb7c7 /xrdp/xrdp_wm.c
parent68e7c74779641a2e56c07fbb9c32326c36081987 (diff)
downloadxrdp-proprietary-2ed9412912adf4e61dbf64f598e8f439ac4683cf.tar.gz
xrdp-proprietary-2ed9412912adf4e61dbf64f598e8f439ac4683cf.zip
don't draw xor box unless when dragging unless mouse moves
Diffstat (limited to 'xrdp/xrdp_wm.c')
-rw-r--r--xrdp/xrdp_wm.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 4488974b..8b06159a 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -819,12 +819,14 @@ int xrdp_wm_mouse_move(struct xrdp_wm* self, int x, int y)
xrdp_painter_begin_update(self->painter);
boxx = self->draggingx - self->draggingdx;
boxy = self->draggingy - self->draggingdy;
- xrdp_wm_xor_pat(self, boxx, boxy, self->draggingcx, self->draggingcy);
+ if (self->draggingxorstate)
+ xrdp_wm_xor_pat(self, boxx, boxy, self->draggingcx, self->draggingcy);
self->draggingx = x;
self->draggingy = y;
boxx = self->draggingx - self->draggingdx;
boxy = self->draggingy - self->draggingdy;
xrdp_wm_xor_pat(self, boxx, boxy, self->draggingcx, self->draggingcy);
+ self->draggingxorstate = 1;
xrdp_painter_end_update(self->painter);
}
b = xrdp_wm_at_pos(self->screen, x, y, 0);
@@ -888,7 +890,9 @@ int xrdp_wm_mouse_click(struct xrdp_wm* self, int x, int y, int but, int down)
oldx = self->dragging_window->left;
oldy = self->dragging_window->top;
/* draw xor box one more time */
- xrdp_wm_xor_pat(self, newx, newy, self->draggingcx, self->draggingcy);
+ if (self->draggingxorstate)
+ xrdp_wm_xor_pat(self, newx, newy, self->draggingcx, self->draggingcy);
+ self->draggingxorstate = 0;
/* move screen to new location */
xrdp_wm_move_window(self, self->dragging_window, newx - oldx, newy - oldy);
self->dragging_window = 0;
@@ -922,8 +926,10 @@ int xrdp_wm_mouse_click(struct xrdp_wm* self, int x, int y, int but, int down)
{
newx = self->draggingx - self->draggingdx;
newy = self->draggingy - self->draggingdy;
- xrdp_wm_xor_pat(self, newx, newy, self->draggingcx,
- self->draggingcy);
+ if (self->draggingxorstate)
+ xrdp_wm_xor_pat(self, newx, newy,
+ self->draggingcx, self->draggingcy);
+ self->draggingxorstate = 0;
}
self->dragging = 1;
self->dragging_window = b;
@@ -935,9 +941,6 @@ int xrdp_wm_mouse_click(struct xrdp_wm* self, int x, int y, int but, int down)
self->draggingdy = y - b->top;
self->draggingcx = b->width;
self->draggingcy = b->height;
- newx = self->draggingx - self->draggingdx;
- newy = self->draggingy - self->draggingdy;
- xrdp_wm_xor_pat(self, newx, newy, self->draggingcx, self->draggingcy);
}
}
}