[hackers] [wmii] Added resize cursor. Fixed colmodes. Fixed warning.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Apr 14 08:54:22 2007

changeset: 2070:c00b8cb1c7f4
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Apr 14 02:50:31 2007 -0400
summary: Added resize cursor. Fixed colmodes. Fixed warning.

diff -r 69c86c93e307 -r c00b8cb1c7f4 cmd/wmii/column.c
--- a/cmd/wmii/column.c Sat Apr 14 02:35:58 2007 -0400
+++ b/cmd/wmii/column.c Sat Apr 14 02:50:31 2007 -0400
@@ -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 -r 69c86c93e307 -r c00b8cb1c7f4 cmd/wmii/dat.h
--- a/cmd/wmii/dat.h Sat Apr 14 02:35:58 2007 -0400
+++ b/cmd/wmii/dat.h Sat Apr 14 02:50:31 2007 -0400
@@ -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 -r 69c86c93e307 -r c00b8cb1c7f4 cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Sat Apr 14 02:35:58 2007 -0400
+++ b/cmd/wmii/fns.h Sat Apr 14 02:50:31 2007 -0400
@@ -132,6 +132,7 @@ ulong mod_key_of_str(char *val);
 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 -r 69c86c93e307 -r c00b8cb1c7f4 cmd/wmii/main.c
--- a/cmd/wmii/main.c Sat Apr 14 02:35:58 2007 -0400
+++ b/cmd/wmii/main.c Sat Apr 14 02:50:31 2007 -0400
@@ -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),
Received on Sat Apr 14 2007 - 08:54:22 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:38 UTC