diff options
author | okan | 2009-01-22 19:01:56 +0000 |
---|---|---|
committer | okan | 2009-01-22 19:01:56 +0000 |
commit | 4b2cd3a9e6fb79dc8497bc499aea252775e9029c (patch) | |
tree | d1b2fec118d52796b1a8162630a3ad8f06b551ec /mousefunc.c | |
parent | 9f7c5b89793258b4c7126f036eb1493b0bb9d3fc (diff) | |
download | cwm-4b2cd3a9e6fb79dc8497bc499aea252775e9029c.tar.gz |
now that pwin is gone gone gone, we no longer have to do the bwidth
dance; xevents now able to deal with a border being set (which fixes
those annoying movie-watching apps).
ok todd@, oga@
Diffstat (limited to '')
-rw-r--r-- | mousefunc.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/mousefunc.c b/mousefunc.c index 25ec837..86cef8a 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: mousefunc.c,v 1.6 2009/01/16 15:24:14 okan Exp $ + * $Id: mousefunc.c,v 1.7 2009/01/22 19:01:56 okan Exp $ */ #include "headers.h" @@ -33,8 +33,8 @@ _mousefunc_sweep_calc(struct client_ctx *cc, int x, int y, int mx, int my) { int width = cc->geom.width, height = cc->geom.height; - cc->geom.width = abs(x - mx); - cc->geom.height = abs(y - my); + cc->geom.width = abs(x - mx) - cc->bwidth; + cc->geom.height = abs(y - my) - cc->bwidth; if (cc->size->flags & PResizeInc) { cc->geom.width -= @@ -116,12 +116,7 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg) ev.xmotion.x, ev.xmotion.y)) /* Recompute window output */ _mousefunc_sweep_draw(cc, dx, dy); - - XMoveResizeWindow(X_Dpy, cc->win, - cc->geom.x - cc->bwidth, - cc->geom.y - cc->bwidth, - cc->geom.width + cc->bwidth * 2, - cc->geom.height + cc->bwidth * 2); + client_resize(cc); break; case ButtonRelease: XUnmapWindow(X_Dpy, sc->menuwin); @@ -166,10 +161,7 @@ mousefunc_window_move(struct client_ctx *cc, void *arg) case MotionNotify: cc->geom.x = x + (ev.xmotion.x - mx); cc->geom.y = y + (ev.xmotion.y - my); - - XMoveWindow(X_Dpy, cc->win, - cc->geom.x - cc->bwidth, cc->geom.y - cc->bwidth); - + client_move(cc); break; case ButtonRelease: xu_ptr_ungrab(); |