1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

wmaker: Removed notion of 'Default' mouse cursor

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 <kix@kix.es>
This commit is contained in:
Christophe CURIS
2013-09-29 18:39:01 +02:00
committed by Carlos R. Mafra
parent b48b3370e2
commit 32cebb1305
4 changed files with 7 additions and 10 deletions

View File

@@ -122,10 +122,7 @@ typedef enum {
WCUR_EMPTY, WCUR_EMPTY,
/* Count of the number of cursors defined */ /* Count of the number of cursors defined */
WCUR_LAST, WCUR_LAST
/* Alias for the Default cursor */
WCUR_DEFAULT = WCUR_NORMAL
} w_cursor; } w_cursor;
/* geometry displays */ /* geometry displays */

View File

@@ -1240,7 +1240,7 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
XGrabServer(dpy); XGrabServer(dpy);
XGrabPointer(dpy, scr->root_win, True, PointerMotionMask XGrabPointer(dpy, scr->root_win, True, PointerMotionMask
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync, | 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 if (XGrabPointer(dpy, scr->root_win, False, ButtonMotionMask
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync, | ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime) != Success) { GrabModeAsync, None, wPreferences.cursor[WCUR_NORMAL], CurrentTime) != Success) {
return; return;
} }
XGrabServer(dpy); XGrabServer(dpy);
@@ -2213,7 +2213,7 @@ void InteractivePlaceWindow(WWindow * wwin, int *x_ret, int *y_ret, unsigned wid
int junk; int junk;
if (XGrabPointer(dpy, root, True, PointerMotionMask | ButtonPressMask, 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; *x_ret = 0;
*y_ret = 0; *y_ret = 0;
return; return;

View File

@@ -463,7 +463,7 @@ static void createInternalWindows(WScreen * scr)
attribs.override_redirect = True; attribs.override_redirect = True;
attribs.background_pixmap = None; attribs.background_pixmap = None;
attribs.background_pixel = scr->white_pixel; attribs.background_pixel = scr->white_pixel;
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; attribs.cursor = wPreferences.cursor[WCUR_NORMAL];
vmask |= CWColormap; vmask |= CWColormap;
attribs.colormap = scr->w_colormap; attribs.colormap = scr->w_colormap;
scr->dock_shadow = scr->dock_shadow =

View File

@@ -49,7 +49,7 @@ WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int h
vmask = CWBorderPixel | CWCursor | CWEventMask | CWOverrideRedirect | CWColormap; vmask = CWBorderPixel | CWCursor | CWEventMask | CWOverrideRedirect | CWColormap;
attribs.override_redirect = True; attribs.override_redirect = True;
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; attribs.cursor = wPreferences.cursor[WCUR_NORMAL];
attribs.background_pixmap = None; attribs.background_pixmap = None;
attribs.background_pixel = screen->black_pixel; attribs.background_pixel = screen->black_pixel;
attribs.border_pixel = border_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)); core = wmalloc(sizeof(WCoreWindow));
vmask = CWBorderPixel | CWCursor | CWEventMask | CWColormap; vmask = CWBorderPixel | CWCursor | CWEventMask | CWColormap;
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT]; attribs.cursor = wPreferences.cursor[WCUR_NORMAL];
attribs.background_pixmap = None; attribs.background_pixmap = None;
attribs.background_pixel = parent->screen_ptr->black_pixel; attribs.background_pixel = parent->screen_ptr->black_pixel;
attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask |