Added resize cursor. Fixed colmodes. Fixed warning.

This commit is contained in:
Kris Maglione 2007-04-14 02:50:31 -04:00
parent aafc92f220
commit 172ac9ce07
4 changed files with 6 additions and 3 deletions

View File

@ -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
);

View File

@ -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 };

View File

@ -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);

View File

@ -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),