mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
wmaker: Moved global var with list of cursors to the preferences variable
As the cursor choice for each action is actually a user choice, it is logical to put this into the structure, instead of a poorly defined 'extern' in every file.
This commit is contained in:
committed by
Carlos R. Mafra
parent
2c20413831
commit
b48b3370e2
@@ -102,25 +102,31 @@ typedef struct WObjDescriptor {
|
||||
#define PRED_BPIXMAPS 4 /* count of WBUT icons */
|
||||
#endif /* XKB_BUTTON_HINT */
|
||||
|
||||
/* cursors */
|
||||
#define WCUR_DEFAULT 0
|
||||
#define WCUR_NORMAL 0
|
||||
#define WCUR_MOVE 1
|
||||
#define WCUR_RESIZE 2
|
||||
#define WCUR_TOPLEFTRESIZE 3
|
||||
#define WCUR_TOPRIGHTRESIZE 4
|
||||
#define WCUR_BOTTOMLEFTRESIZE 5
|
||||
#define WCUR_BOTTOMRIGHTRESIZE 6
|
||||
#define WCUR_VERTICALRESIZE 7
|
||||
#define WCUR_HORIZONRESIZE 8
|
||||
#define WCUR_WAIT 9
|
||||
#define WCUR_ARROW 10
|
||||
#define WCUR_QUESTION 11
|
||||
#define WCUR_TEXT 12
|
||||
#define WCUR_SELECT 13
|
||||
#define WCUR_ROOT 14
|
||||
#define WCUR_EMPTY 15
|
||||
#define WCUR_LAST 16
|
||||
/* Mouse cursors */
|
||||
typedef enum {
|
||||
WCUR_NORMAL,
|
||||
WCUR_MOVE,
|
||||
WCUR_RESIZE,
|
||||
WCUR_TOPLEFTRESIZE,
|
||||
WCUR_TOPRIGHTRESIZE,
|
||||
WCUR_BOTTOMLEFTRESIZE,
|
||||
WCUR_BOTTOMRIGHTRESIZE,
|
||||
WCUR_VERTICALRESIZE,
|
||||
WCUR_HORIZONRESIZE,
|
||||
WCUR_WAIT,
|
||||
WCUR_ARROW,
|
||||
WCUR_QUESTION,
|
||||
WCUR_TEXT,
|
||||
WCUR_SELECT,
|
||||
WCUR_ROOT,
|
||||
WCUR_EMPTY,
|
||||
|
||||
/* Count of the number of cursors defined */
|
||||
WCUR_LAST,
|
||||
|
||||
/* Alias for the Default cursor */
|
||||
WCUR_DEFAULT = WCUR_NORMAL
|
||||
} w_cursor;
|
||||
|
||||
/* geometry displays */
|
||||
#define WDIS_NEW 0 /* new style */
|
||||
@@ -449,6 +455,10 @@ extern struct WPreferences {
|
||||
#endif
|
||||
unsigned int restarting:2;
|
||||
} flags; /* internal flags */
|
||||
|
||||
/* Map table between w_cursor and actual X id */
|
||||
Cursor cursor[WCUR_LAST];
|
||||
|
||||
} wPreferences;
|
||||
|
||||
/****** Global Variables ******/
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
*/
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
extern XContext wWinContext;
|
||||
|
||||
@@ -852,7 +851,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
|
||||
|| abs(ofs_y - ev.xmotion.y) >= MOVE_THRESHOLD) {
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
grabbed = 1;
|
||||
} else {
|
||||
break;
|
||||
|
||||
@@ -161,7 +161,6 @@ static WDECallbackUpdate updateUsableArea;
|
||||
|
||||
static WDECallbackUpdate setModifierKeyLabels;
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
static WDECallbackConvert getCursor;
|
||||
static WDECallbackUpdate setCursor;
|
||||
|
||||
@@ -3225,11 +3224,11 @@ static int setCursor(WScreen * scr, WDefaultEntry * entry, void *tdata, void *ex
|
||||
Cursor *cursor = tdata;
|
||||
long widx = (long) extra_data;
|
||||
|
||||
if (wCursor[widx] != None) {
|
||||
XFreeCursor(dpy, wCursor[widx]);
|
||||
if (wPreferences.cursor[widx] != None) {
|
||||
XFreeCursor(dpy, wPreferences.cursor[widx]);
|
||||
}
|
||||
|
||||
wCursor[widx] = *cursor;
|
||||
wPreferences.cursor[widx] = *cursor;
|
||||
|
||||
if (widx == WCUR_ROOT && *cursor != None) {
|
||||
XDefineCursor(dpy, scr->root_win, *cursor);
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
#define CLIP_FORWARD 2
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern XContext wWinContext;
|
||||
|
||||
#define MOD_MASK wPreferences.modifier_mask
|
||||
@@ -3699,7 +3698,7 @@ static void handleDockMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
|| abs(ofs_y - ev.xmotion.y) >= MOVE_THRESHOLD) {
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
grabbed = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -80,8 +80,6 @@
|
||||
extern XContext wWinContext;
|
||||
extern XContext wVEdgeContext;
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
extern int wScreenCount;
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
#define CACHE_ICON_PATH "/Library/WindowMaker/CachedPixmaps"
|
||||
#define ICON_BORDER 3
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
static void miniwindowExpose(WObjDescriptor * desc, XEvent * event);
|
||||
static void miniwindowMouseDown(WObjDescriptor * desc, XEvent * event);
|
||||
static void miniwindowDblClick(WObjDescriptor * desc, XEvent * event);
|
||||
@@ -721,7 +719,7 @@ static void set_dockapp_in_icon(WIcon *icon)
|
||||
(attr.all_event_masks & ButtonPressMask))
|
||||
wHackedGrabButton(Button1, MOD_MASK, icon->core->window, True,
|
||||
ButtonPressMask, GrabModeSync, GrabModeAsync,
|
||||
None, wCursor[WCUR_ARROW]);
|
||||
None, wPreferences.cursor[WCUR_ARROW]);
|
||||
}
|
||||
|
||||
/* Get the RImage from the XWindow wm_hints */
|
||||
@@ -862,7 +860,7 @@ static void miniwindowMouseDown(WObjDescriptor * desc, XEvent * event)
|
||||
|| abs(dy - ev.xmotion.y) >= MOVE_THRESHOLD) {
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
grabbed = 1;
|
||||
} else {
|
||||
break;
|
||||
|
||||
@@ -125,9 +125,6 @@ Atom _XA_WINDOWMAKER_ICON_TILE;
|
||||
|
||||
Atom _XA_WM_IGNORE_FOCUS_EVENTS;
|
||||
|
||||
/* cursors */
|
||||
Cursor wCursor[WCUR_LAST];
|
||||
|
||||
#ifdef SHAPE
|
||||
Bool wShapeSupported;
|
||||
int wShapeEventBase;
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
|
||||
/****** Global Variables ******/
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
extern XContext wWinContext;
|
||||
|
||||
#define MOD_MASK wPreferences.modifier_mask
|
||||
@@ -2185,7 +2183,7 @@ static void menuTitleMouseDown(WCoreWindow * sender, void *data, XEvent * event)
|
||||
ButtonMotionMask | ButtonReleaseMask
|
||||
| ButtonPressMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
*/
|
||||
#define HAS_BORDER_WITH_SELECT(w) ((w)->flags.selected || HAS_BORDER(w))
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -564,7 +562,7 @@ static void crossWorkspace(WScreen * scr, WWindow * wwin, int opaque_move, int n
|
||||
if (!opaque_move) {
|
||||
XGrabPointer(dpy, scr->root_win, True, PointerMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
|
||||
GrabModeAsync, None, wCursor[WCUR_MOVE], CurrentTime);
|
||||
GrabModeAsync, None, wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1242,7 +1240,7 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
|
||||
XGrabServer(dpy);
|
||||
XGrabPointer(dpy, scr->root_win, True, PointerMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
|
||||
GrabModeAsync, None, wCursor[WCUR_DEFAULT], CurrentTime);
|
||||
GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime);
|
||||
|
||||
|
||||
|
||||
@@ -1696,7 +1694,7 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev)
|
||||
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
started = 1;
|
||||
XGrabKeyboard(dpy, root, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
@@ -1988,31 +1986,31 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
|
||||
if (res == (UP | LEFT))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_TOPLEFTRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_TOPLEFTRESIZE], CurrentTime);
|
||||
else if (res == (UP | RIGHT))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_TOPRIGHTRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_TOPRIGHTRESIZE], CurrentTime);
|
||||
else if (res == (DOWN | LEFT))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_BOTTOMLEFTRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_BOTTOMLEFTRESIZE], CurrentTime);
|
||||
else if (res == (DOWN | RIGHT))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_BOTTOMRIGHTRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_BOTTOMRIGHTRESIZE], CurrentTime);
|
||||
else if (res == DOWN || res == UP)
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_VERTICALRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_VERTICALRESIZE], CurrentTime);
|
||||
else if (res & (DOWN | UP))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_VERTICALRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_VERTICALRESIZE], CurrentTime);
|
||||
else if (res & (LEFT | RIGHT))
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wCursor[WCUR_HORIZONRESIZE], CurrentTime);
|
||||
wPreferences.cursor[WCUR_HORIZONRESIZE], CurrentTime);
|
||||
|
||||
XGrabKeyboard(dpy, root, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
@@ -2153,7 +2151,7 @@ void wSelectWindows(WScreen * scr, XEvent * ev)
|
||||
|
||||
if (XGrabPointer(dpy, scr->root_win, False, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask, GrabModeAsync,
|
||||
GrabModeAsync, None, wCursor[WCUR_DEFAULT], CurrentTime) != Success) {
|
||||
GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime) != Success) {
|
||||
return;
|
||||
}
|
||||
XGrabServer(dpy);
|
||||
@@ -2215,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, wCursor[WCUR_DEFAULT], CurrentTime) != Success) {
|
||||
GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_DEFAULT], CurrentTime) != Success) {
|
||||
*x_ret = 0;
|
||||
*y_ret = 0;
|
||||
return;
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
#define MAX_SHORTCUT_LENGTH 32
|
||||
|
||||
extern WDDomain *WDRootMenu;
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
static WMenu *readMenuPipe(WScreen * scr, char **file_name);
|
||||
static WMenu *readPLMenuPipe(WScreen * scr, char **file_name);
|
||||
@@ -155,7 +154,7 @@ static void execCommand(WMenu * menu, WMenuEntry * entry)
|
||||
cmdline = ExpandOptions(menu->frame->screen_ptr, (char *)entry->clientdata);
|
||||
|
||||
XGrabPointer(dpy, menu->frame->screen_ptr->root_win, True, 0,
|
||||
GrabModeAsync, GrabModeAsync, None, wCursor[WCUR_WAIT], CurrentTime);
|
||||
GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_WAIT], CurrentTime);
|
||||
XSync(dpy, 0);
|
||||
|
||||
if (cmdline) {
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
|KeyPressMask|KeyReleaseMask)
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern Atom _XA_WINDOWMAKER_STATE;
|
||||
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||
|
||||
@@ -464,7 +463,7 @@ static void createInternalWindows(WScreen * scr)
|
||||
attribs.override_redirect = True;
|
||||
attribs.background_pixmap = None;
|
||||
attribs.background_pixel = scr->white_pixel;
|
||||
attribs.cursor = wCursor[WCUR_DEFAULT];
|
||||
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT];
|
||||
vmask |= CWColormap;
|
||||
attribs.colormap = scr->w_colormap;
|
||||
scr->dock_shadow =
|
||||
@@ -571,7 +570,7 @@ WScreen *wScreenInit(int screen_number)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_ROOT]);
|
||||
XDefineCursor(dpy, scr->root_win, wPreferences.cursor[WCUR_ROOT]);
|
||||
|
||||
/* screen descriptor for raster graphic library */
|
||||
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;
|
||||
|
||||
@@ -130,9 +130,6 @@ extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
extern Atom _XA_GNUSTEP_TITLEBAR_STATE;
|
||||
extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;
|
||||
|
||||
/* cursors */
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
#ifndef HAVE_INOTIFY
|
||||
/* special flags */
|
||||
extern char WDelayedActionSet;
|
||||
@@ -546,21 +543,21 @@ void StartUp(Bool defaultScreenOnly)
|
||||
#endif
|
||||
|
||||
/* cursors */
|
||||
wCursor[WCUR_NORMAL] = None; /* inherit from root */
|
||||
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
||||
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
||||
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
||||
wCursor[WCUR_RESIZE] = XCreateFontCursor(dpy, XC_sizing);
|
||||
wCursor[WCUR_TOPLEFTRESIZE] = XCreateFontCursor(dpy, XC_top_left_corner);
|
||||
wCursor[WCUR_TOPRIGHTRESIZE] = XCreateFontCursor(dpy, XC_top_right_corner);
|
||||
wCursor[WCUR_BOTTOMLEFTRESIZE] = XCreateFontCursor(dpy, XC_bottom_left_corner);
|
||||
wCursor[WCUR_BOTTOMRIGHTRESIZE] = XCreateFontCursor(dpy, XC_bottom_right_corner);
|
||||
wCursor[WCUR_VERTICALRESIZE] = XCreateFontCursor(dpy, XC_sb_v_double_arrow);
|
||||
wCursor[WCUR_HORIZONRESIZE] = XCreateFontCursor(dpy, XC_sb_h_double_arrow);
|
||||
wCursor[WCUR_WAIT] = XCreateFontCursor(dpy, XC_watch);
|
||||
wCursor[WCUR_QUESTION] = XCreateFontCursor(dpy, XC_question_arrow);
|
||||
wCursor[WCUR_TEXT] = XCreateFontCursor(dpy, XC_xterm); /* odd name??? */
|
||||
wCursor[WCUR_SELECT] = XCreateFontCursor(dpy, XC_cross);
|
||||
wPreferences.cursor[WCUR_NORMAL] = None; /* inherit from root */
|
||||
wPreferences.cursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
||||
wPreferences.cursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
||||
wPreferences.cursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
||||
wPreferences.cursor[WCUR_RESIZE] = XCreateFontCursor(dpy, XC_sizing);
|
||||
wPreferences.cursor[WCUR_TOPLEFTRESIZE] = XCreateFontCursor(dpy, XC_top_left_corner);
|
||||
wPreferences.cursor[WCUR_TOPRIGHTRESIZE] = XCreateFontCursor(dpy, XC_top_right_corner);
|
||||
wPreferences.cursor[WCUR_BOTTOMLEFTRESIZE] = XCreateFontCursor(dpy, XC_bottom_left_corner);
|
||||
wPreferences.cursor[WCUR_BOTTOMRIGHTRESIZE] = XCreateFontCursor(dpy, XC_bottom_right_corner);
|
||||
wPreferences.cursor[WCUR_VERTICALRESIZE] = XCreateFontCursor(dpy, XC_sb_v_double_arrow);
|
||||
wPreferences.cursor[WCUR_HORIZONRESIZE] = XCreateFontCursor(dpy, XC_sb_h_double_arrow);
|
||||
wPreferences.cursor[WCUR_WAIT] = XCreateFontCursor(dpy, XC_watch);
|
||||
wPreferences.cursor[WCUR_QUESTION] = XCreateFontCursor(dpy, XC_question_arrow);
|
||||
wPreferences.cursor[WCUR_TEXT] = XCreateFontCursor(dpy, XC_xterm); /* odd name??? */
|
||||
wPreferences.cursor[WCUR_SELECT] = XCreateFontCursor(dpy, XC_cross);
|
||||
|
||||
Pixmap cur = XCreatePixmap(dpy, DefaultRootWindow(dpy), 16, 16, 1);
|
||||
GC gc = XCreateGC(dpy, cur, 0, NULL);
|
||||
@@ -569,7 +566,7 @@ void StartUp(Bool defaultScreenOnly)
|
||||
XSetForeground(dpy, gc, 0);
|
||||
XFillRectangle(dpy, cur, gc, 0, 0, 16, 16);
|
||||
XFreeGC(dpy, gc);
|
||||
wCursor[WCUR_EMPTY] = XCreatePixmapCursor(dpy, cur, cur, &black, &black, 0, 0);
|
||||
wPreferences.cursor[WCUR_EMPTY] = XCreatePixmapCursor(dpy, cur, cur, &black, &black, 0, 0);
|
||||
XFreePixmap(dpy, cur);
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "wcore.h"
|
||||
|
||||
/****** Global Variables ******/
|
||||
/* cursors */
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern XContext wWinContext;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@@ -51,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 = wCursor[WCUR_DEFAULT];
|
||||
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT];
|
||||
attribs.background_pixmap = None;
|
||||
attribs.background_pixel = screen->black_pixel;
|
||||
attribs.border_pixel = border_pixel;
|
||||
@@ -102,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 = wCursor[WCUR_DEFAULT];
|
||||
attribs.cursor = wPreferences.cursor[WCUR_DEFAULT];
|
||||
attribs.background_pixmap = None;
|
||||
attribs.background_pixel = parent->screen_ptr->black_pixel;
|
||||
attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask |
|
||||
|
||||
@@ -114,7 +114,6 @@ typedef struct InspectorPanel {
|
||||
unsigned int choosingIcon:1;
|
||||
} InspectorPanel;
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
|
||||
static InspectorPanel *panelList = NULL;
|
||||
@@ -1017,7 +1016,7 @@ static void selectWindow(WMWidget *bPtr, void *data)
|
||||
|
||||
if (XGrabPointer(dpy, scr->root_win, True,
|
||||
ButtonPressMask, GrabModeAsync, GrabModeAsync, None,
|
||||
wCursor[WCUR_SELECT], CurrentTime) != GrabSuccess) {
|
||||
wPreferences.cursor[WCUR_SELECT], CurrentTime) != GrabSuccess) {
|
||||
wwarning("could not grab mouse pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user