]> Pileus Git - wmpus/commitdiff
Allow shift-modkey-mouse1 for resizing
authorAndy Spencer <andy753421@gmail.com>
Mon, 9 Jul 2012 05:02:30 +0000 (05:02 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 9 Jul 2012 05:04:28 +0000 (05:04 +0000)
wm-wmii.c
wmpus.1

index 7814d71d4c695a4fe0ecee0547aa42182983f714..1cc43afc8c5286bec2f4f882454b8d9137d72819 100644 (file)
--- a/wm-wmii.c
+++ b/wm-wmii.c
@@ -722,10 +722,11 @@ int wm_handle_event(win_t *win, event_t ev, mod_t mod, ptr_t ptr)
        if (EV_MOUSE0 <= ev && ev <= EV_MOUSE7) {
                if (ev == EV_MOUSE1 && !mod.MODKEY && !mod.up)
                        return raise_float(win),         0;
        if (EV_MOUSE0 <= ev && ev <= EV_MOUSE7) {
                if (ev == EV_MOUSE1 && !mod.MODKEY && !mod.up)
                        return raise_float(win),         0;
+               if ((ev == EV_MOUSE3 && mod.MODKEY && !mod.up) ||
+                   (ev == EV_MOUSE1 && mod.MODKEY && !mod.up && mod.shift))
+                       return set_move(win,ptr,RESIZE), 1;
                if (ev == EV_MOUSE1 && mod.MODKEY && !mod.up)
                        return set_move(win,ptr,MOVE),   1;
                if (ev == EV_MOUSE1 && mod.MODKEY && !mod.up)
                        return set_move(win,ptr,MOVE),   1;
-               if (ev == EV_MOUSE3 && mod.MODKEY && !mod.up)
-                       return set_move(win,ptr,RESIZE), 1;
                if (move_mode != NONE && mod.up)
                        return set_move(win,ptr,NONE),   1;
                if (ev == EV_MOUSE1 && !mod.up && win->state == ST_SHADE)
                if (move_mode != NONE && mod.up)
                        return set_move(win,ptr,NONE),   1;
                if (ev == EV_MOUSE1 && !mod.up && win->state == ST_SHADE)
@@ -928,7 +929,8 @@ void wm_init(win_t *root)
 
        event_t ev_e[] = {EV_ENTER, EV_FOCUS};
        event_t ev_s[] = {'h', 'j', 'k', 'l', 'c', 'q', ' ',
 
        event_t ev_e[] = {EV_ENTER, EV_FOCUS};
        event_t ev_s[] = {'h', 'j', 'k', 'l', 'c', 'q', ' ',
-               '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
+               '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+               EV_MOUSE1, EV_MOUSE3};
        event_t ev_m[] = {'h', 'j', 'k', 'l', 'd', 's', 'm', 't', 'f', ' ',
                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
                EV_F1, EV_F2, EV_F3, EV_F4,  EV_F5,  EV_F6,
        event_t ev_m[] = {'h', 'j', 'k', 'l', 'd', 's', 'm', 't', 'f', ' ',
                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
                EV_F1, EV_F2, EV_F3, EV_F4,  EV_F5,  EV_F6,
diff --git a/wmpus.1 b/wmpus.1
index c475e115df5eb636d7e9cdd066d9e1ac91842480..a3e191f4935ac12f437aae27fe02b4cc58ab936e 100644 (file)
--- a/wmpus.1
+++ b/wmpus.1
@@ -147,7 +147,7 @@ Click in a floating window brings it to the top
 .B Alt-Button1
 Click and drag moves a floating window under the cursor
 .TP
 .B Alt-Button1
 Click and drag moves a floating window under the cursor
 .TP
-.B Alt-Button3
+.B Alt-Button3, Alt-Shift-Button1
 Click and drag resizes the window under the cursor
 .SH X11 BACKEND
 The X11 backend draws a small 2px border around each window. The border for the
 Click and drag resizes the window under the cursor
 .SH X11 BACKEND
 The X11 backend draws a small 2px border around each window. The border for the