From 5cb5c1adff5b1aff526487539efad14feb18daac Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Fri, 7 Apr 2006 19:48:10 +0000 Subject: [PATCH] Hack to fix problem with composite opacity during non-opaque move/resize. SVN revision: 21938 --- src/moveresize.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/moveresize.c b/src/moveresize.c index 5225656a..9c3d53d3 100644 --- a/src/moveresize.c +++ b/src/moveresize.c @@ -98,10 +98,12 @@ ActionMoveStart(EWin * ewin, int grab, char constrained, int nogroup) for (i = 0; i < num; i++) { EwinShapeSet(gwins[i]); - ewin->state.moving = 1; EwinFloatAt(gwins[i], EoGetX(gwins[i]), EoGetY(gwins[i])); if (Mode_mr.mode == 0) - EwinUpdateOpacity(gwins[i]); + { + ewin->state.moving = 1; + EwinUpdateOpacity(gwins[i]); + } } Efree(gwins); @@ -155,9 +157,11 @@ ActionMoveEnd(EWin * ewin) EwinUnfloatAt(ewin, d2, ewin->shape_x - (EoGetX(d2) - EoGetX(d1)), ewin->shape_y - (EoGetY(d2) - EoGetY(d1))); - ewin->state.moving = 0; if (Mode_mr.mode == 0) - EwinUpdateOpacity(ewin); + { + ewin->state.moving = 0; + EwinUpdateOpacity(ewin); + } } Efree(gwins); @@ -271,7 +275,6 @@ ActionResizeStart(EWin * ewin, int grab, int hv) SoundPlay("SOUND_RESIZE_START"); - ewin->state.resizing = 1; if (Conf.movres.mode_resize < 0 || Conf.movres.mode_resize > 4) Conf.movres.mode_resize = 0; if (Conf.movres.mode_resize > 0) @@ -283,6 +286,7 @@ ActionResizeStart(EWin * ewin, int grab, int hv) } else { + ewin->state.resizing = 1; EwinUpdateOpacity(ewin); } @@ -388,13 +392,13 @@ ActionResizeEnd(EWin * ewin) if (!ewin) goto done; - ewin->state.resizing = 0; ewin->state.show_coords = 0; DrawEwinShape(ewin, Conf.movres.mode_resize, ewin->shape_x, ewin->shape_y, ewin->client.w, ewin->client.h, 2); if (Conf.movres.mode_resize == 0) { + ewin->state.resizing = 0; EwinUpdateOpacity(ewin); } else