diff options
| author | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 08:43:19 +0200 |
|---|---|---|
| committer | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 08:43:19 +0200 |
| commit | 95766d6241a401b3665ac1ad528b90c55e7b6810 (patch) | |
| tree | 09789c6cf44cbb37dba40bbe4ba3c771d9b904ef /event.c | |
| parent | removed viewnext/viewprev (diff) | |
| download | dwm-95766d6241a401b3665ac1ad528b90c55e7b6810.tar.gz dwm-95766d6241a401b3665ac1ad528b90c55e7b6810.zip | |
applied Sanders LD and resize patches
Diffstat (limited to '')
| -rw-r--r-- | event.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -58,6 +58,7 @@ static void | |||
| 58 | resizemouse(Client *c) | 58 | resizemouse(Client *c) |
| 59 | { | 59 | { |
| 60 | int ocx, ocy; | 60 | int ocx, ocy; |
| 61 | int nw, nh; | ||
| 61 | Corner sticky; | 62 | Corner sticky; |
| 62 | XEvent ev; | 63 | XEvent ev; |
| 63 | 64 | ||
| @@ -76,8 +77,10 @@ resizemouse(Client *c) | |||
| 76 | break; | 77 | break; |
| 77 | case MotionNotify: | 78 | case MotionNotify: |
| 78 | XSync(dpy, False); | 79 | XSync(dpy, False); |
| 79 | c->w = abs(ocx - ev.xmotion.x); | 80 | if((nw = abs(ocx - ev.xmotion.x))) |
| 80 | c->h = abs(ocy - ev.xmotion.y); | 81 | c->w = abs(ocx - ev.xmotion.x); |
| 82 | if((nh = abs(ocy - ev.xmotion.y))) | ||
| 83 | c->h = abs(ocy - ev.xmotion.y); | ||
| 81 | c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; | 84 | c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; |
| 82 | c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; | 85 | c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; |
| 83 | if(ocx <= ev.xmotion.x) | 86 | if(ocx <= ev.xmotion.x) |
