commit 172ac9ce07d53e9099ea0cedcf7d6231d7d4c9e9
parent aafc92f220922231428241a381c30dc311c3d5dd
Author: Kris Maglione <jg@suckless.org>
Date: Sat, 14 Apr 2007 02:50:31 -0400
Added resize cursor. Fixed colmodes. Fixed warning.
Diffstat:
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c
@@ -33,7 +33,7 @@ str2colmode(const char *str) {
int i;
for(i = 0; i < nelem(modes); i++)
- if(strcasecmp(str, modes[i]))
+ if(!strcasecmp(str, modes[i]))
return i;
return -1;
}
@@ -102,6 +102,7 @@ get_div(Divide **dp) {
wa.override_redirect = True;
wa.background_pixmap = ParentRelative;
+ wa.cursor = cursor[CurDHArrow];
wa.event_mask =
SubstructureRedirectMask
| ExposureMask
@@ -118,7 +119,7 @@ get_div(Divide **dp) {
/* depth */ DefaultDepth(blz.dpy, blz.screen),
/* class */ CopyFromParent,
/* visual */ DefaultVisual(blz.dpy, blz.screen),
- /* valuemask */ CWOverrideRedirect | CWEventMask | CWBackPixmap,
+ /* valuemask */ CWOverrideRedirect | CWEventMask | CWBackPixmap | CWCursor,
/* attributes */&wa
);
diff --git a/cmd/wmii/dat.h b/cmd/wmii/dat.h
@@ -79,7 +79,7 @@ enum { Coldefault, Colstack, Colmax };
/* Cursor */
enum { CurNormal, CurNECorner, CurNWCorner, CurSECorner, CurSWCorner,
- CurMove, CurInput, CurInvisible, CurLast };
+ CurDHArrow, CurMove, CurInput, CurInvisible, CurLast };
enum { NCOL = 16 };
enum { WM_PROTOCOL_DELWIN = 1 };
diff --git a/cmd/wmii/fns.h b/cmd/wmii/fns.h
@@ -132,6 +132,7 @@ void init_lock_keys();
ulong mod_key_of_str(char *val);
/* mouse.c */
+void mouse_resizecol(Divide *d);
void do_mouse_resize(Client *c, Bool grabbox, BlitzAlign align);
void grab_mouse(Window w, ulong mod, ulong button);
void ungrab_mouse(Window w, ulong mod, uint button);
diff --git a/cmd/wmii/main.c b/cmd/wmii/main.c
@@ -219,6 +219,7 @@ init_cursors() {
create_cursor(CurSECorner, XC_bottom_right_corner);
create_cursor(CurSWCorner, XC_bottom_left_corner);
create_cursor(CurMove, XC_fleur);
+ create_cursor(CurDHArrow, XC_sb_h_double_arrow);
create_cursor(CurInput, XC_xterm);
XAllocNamedColor(blz.dpy, DefaultColormap(blz.dpy, blz.screen),