1
0
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:
Christophe CURIS
2013-09-29 17:36:36 +02:00
committed by Carlos R. Mafra
parent 2c20413831
commit b48b3370e2
14 changed files with 71 additions and 83 deletions

View File

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