[hackers] [wmii] Only drag from the drag box, and only resize from the border

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 10 17:54:50 2007

changeset: 1829:7e8bc3e164d3
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Feb 10 11:53:27 2007 -0500
summary: Only drag from the drag box, and only resize from the border

diff -r 3cbe4b6be10e -r 7e8bc3e164d3 event.c
--- a/event.c Sat Feb 10 03:09:19 2007 -0500
+++ b/event.c Sat Feb 10 11:53:27 2007 -0500
@@ -69,8 +69,11 @@ buttonpress(XEvent *e) {
                         if(ev->button == Button1) {
                                 if(frame_to_top(f))
                                         restack_view(f->view);
- if(!inclient)
+ if(ispointinrect(ev->x, ev->y, &f->grabbox.rect))
                                         do_mouse_resize(f->client, CENTER);
+ else if(!ispointinrect(ev->x, ev->y, &f->titlebar.rect))
+ do_mouse_resize(f->client,
+ quadofcoord(&f->client->rect, ev->x, ev->y));
                                 if(f->client != sel_client())
                                         focus(f->client, True);
                         }
diff -r 3cbe4b6be10e -r 7e8bc3e164d3 frame.c
--- a/frame.c Sat Feb 10 03:09:19 2007 -0500
+++ b/frame.c Sat Feb 10 11:53:27 2007 -0500
@@ -184,6 +184,7 @@ draw_frame(Frame *f) {
         f->titlebar.rect.width = f->rect.width - f->titlebar.rect.x;
         f->titlebar.border = 0;
         draw_tile(&f->tile);
+ f->grabbox.border = 3;
         draw_tile(&f->grabbox);
         draw_label(&f->titlebar, f->client->name);
         /* XXX: Hack */
Received on Sat Feb 10 2007 - 17:54:50 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:08 UTC