From 32cebb13057b20ba38c2a5bc6985cb5f0340dd15 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 29 Sep 2013 18:39:01 +0200 Subject: [PATCH] wmaker: Removed notion of 'Default' mouse cursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A default cursor would make sense if we were talking about an API, where we would propose a 'I-don't-know' choice to devs, but here we're talking about WindowMaker's internal, where we're supposed to provide a consistent interface to the user, so picking a cursor is not an option (and 'Normal' is actually a decent looking choice anyway). Suggested-by: Rodolfo García Peñas --- src/WindowMaker.h | 5 +---- src/moveres.c | 6 +++--- src/screen.c | 2 +- src/wcore.c | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 6e4c0c94..2f4226bf 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -122,10 +122,7 @@ typedef enum { WCUR_EMPTY, /* Count of the number of cursors defined */ - WCUR_LAST, - - /* Alias for the Default cursor */ - WCUR_DEFAULT = WCUR_NORMAL + WCUR_LAST } w_cursor; /* geometry displays */ diff --git a/src/moveres.c b/src/moveres.c index 7e7cf5a6..86cb88e3 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1240,7 +1240,7 @@ int wKeyboardMoveResizeWindow(WWindow * wwin) XGrabServer(dpy); XGrabPointer(dpy, scr->root_win, True, PointerMotionMask | ButtonReleaseMask | ButtonPressMask, GrabModeAsync, - GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime); + GrabModeAsync, None, wPreferences.cursor[WCUR_NORMAL], CurrentTime); @@ -2151,7 +2151,7 @@ void wSelectWindows(WScreen * scr, XEvent * ev) if (XGrabPointer(dpy, scr->root_win, False, ButtonMotionMask | ButtonReleaseMask | ButtonPressMask, GrabModeAsync, - GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime) != Success) { + GrabModeAsync, None, wPreferences.cursor[WCUR_NORMAL], CurrentTime) != Success) { return; } XGrabServer(dpy); @@ -2213,7 +2213,7 @@ void InteractivePlaceWindow(WWindow * wwin, int *x_ret, int *y_ret, unsigned wid int junk; if (XGrabPointer(dpy, root, True, PointerMotionMask | ButtonPressMask, - GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime) != Success) { + GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_NORMAL], CurrentTime) != Success) { *x_ret = 0; *y_ret = 0; return; diff --git a/src/screen.c b/src/screen.c index 721680e2..b5f52d95 100644 --- a/src/screen.c +++ b/src/screen.c @@ -463,7 +463,7 @@ static void createInternalWindows(WScreen * scr) attribs.override_redirect = True; attribs.background_pixmap = None; attribs.background_pixel = scr->white_pixel; - attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; + attribs.cursor = wPreferences.cursor[WCUR_NORMAL]; vmask |= CWColormap; attribs.colormap = scr->w_colormap; scr->dock_shadow = diff --git a/src/wcore.c b/src/wcore.c index 37cf59ac..4b79fdcf 100644 --- a/src/wcore.c +++ b/src/wcore.c @@ -49,7 +49,7 @@ WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int h vmask = CWBorderPixel | CWCursor | CWEventMask | CWOverrideRedirect | CWColormap; attribs.override_redirect = True; - attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; + attribs.cursor = wPreferences.cursor[WCUR_NORMAL]; attribs.background_pixmap = None; attribs.background_pixel = screen->black_pixel; attribs.border_pixel = border_pixel; @@ -100,7 +100,7 @@ WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y, int width, int heigh core = wmalloc(sizeof(WCoreWindow)); vmask = CWBorderPixel | CWCursor | CWEventMask | CWColormap; - attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; + attribs.cursor = wPreferences.cursor[WCUR_NORMAL]; attribs.background_pixmap = None; attribs.background_pixel = parent->screen_ptr->black_pixel; attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask |