mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
- made the definable cursors feature available by default (removed the
compile time option)
This commit is contained in:
@@ -18,8 +18,10 @@ Changes since version 0.70.0:
|
|||||||
saving dock/clip/session information on exit.
|
saving dock/clip/session information on exit.
|
||||||
- Added an internal strcasecmp() to WINGs (only on systems where's not present)
|
- Added an internal strcasecmp() to WINGs (only on systems where's not present)
|
||||||
- Deminiaturizing a window that is also shaded, will perform an unshade too.
|
- Deminiaturizing a window that is also shaded, will perform an unshade too.
|
||||||
(Note that this only applies to deminiaturizing shaded windows.
|
(Note that this only applies to deminiaturizing shaded windows. Unhiding
|
||||||
Unhiding an application will keep the shaded/unshaded state of windows.)
|
an application will keep the shaded/unshaded state of windows.)
|
||||||
|
- Removed compile time option for definable cursors and made them available by
|
||||||
|
default.
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.65.1:
|
Changes since version 0.65.1:
|
||||||
|
|||||||
@@ -1,43 +1,16 @@
|
|||||||
# README.definable-cursor: How to use definable-cursor patch for Window Maker
|
|
||||||
# created 1999-Apr-24 14:53 jmk
|
|
||||||
# autodate: 2001-Sep-05 22:40
|
|
||||||
|
|
||||||
+------------------------------------------+
|
|
||||||
| Definable Mouse Cursors for Window Maker |
|
|
||||||
+------------------------------------------+
|
|
||||||
|
|
||||||
The definable-cursor patch for Window Maker
|
Definable Mouse Cursors for Window Maker
|
||||||
<http://www.windowmaker.org/> allows user-definable mouse cursors; the
|
----------------------------------------
|
||||||
|
|
||||||
|
The definable-cursor feature allows user-definable mouse cursors; the
|
||||||
cursors can either be the built-in ones from the X11 cursor font, or
|
cursors can either be the built-in ones from the X11 cursor font, or
|
||||||
they can be bitmap (XBM) files. User-definable cursors can be useful
|
they can be bitmap (XBM) files. User-definable cursors can be useful
|
||||||
for theme-builders, lefthanders, and the visually impaired.
|
for theme-builders, lefthanders, and the visually impaired.
|
||||||
|
|
||||||
This README describes how to enable user-definable cursors in Window
|
|
||||||
Maker as well as how to use them.
|
|
||||||
|
|
||||||
+----------------------------+
|
Defining Your Own Cursors
|
||||||
| Enabling Definable Cursors |
|
-------------------------
|
||||||
+----------------------------+
|
|
||||||
|
|
||||||
If you want to enable definable mouse cursors in Window Maker, you must
|
|
||||||
do so before you configure and build Window Maker. Here's how:
|
|
||||||
|
|
||||||
(1) Edit src/wconfig.h.in and change the following line:
|
|
||||||
|
|
||||||
#undef DEFINABLE_CURSOR
|
|
||||||
|
|
||||||
to:
|
|
||||||
|
|
||||||
#define DEFINABLE_CURSOR
|
|
||||||
|
|
||||||
(2) Configure and build Window Maker as you normally would:
|
|
||||||
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
|
|
||||||
+---------------------------+
|
|
||||||
| Defining Your Own Cursors |
|
|
||||||
+---------------------------+
|
|
||||||
|
|
||||||
A cursor specification takes one of the following forms in the
|
A cursor specification takes one of the following forms in the
|
||||||
~/GNUstep/Defaults/WindowMaker file:
|
~/GNUstep/Defaults/WindowMaker file:
|
||||||
@@ -84,23 +57,22 @@ Maker used them in the past, but doesn't use them anymore):
|
|||||||
|
|
||||||
ResizeCursor = (builtin, sizing);
|
ResizeCursor = (builtin, sizing);
|
||||||
|
|
||||||
+----------------------------------------------+
|
|
||||||
| Using Cursors with 'getstyle' and 'setstyle' |
|
|
||||||
+----------------------------------------------+
|
|
||||||
|
|
||||||
The 'getstyle' and 'setstyle' style- and theme-management utilities
|
Using Cursors with 'getstyle' and 'setstyle'
|
||||||
can handle user-definable cursors. By default, 'getstyle' ignores
|
--------------------------------------------
|
||||||
cursor definitions; using 'getstyle -t' to get theme-related settings
|
|
||||||
will also include any cursors you've defined in the resulting
|
|
||||||
stylefile.
|
|
||||||
|
|
||||||
However, by default, 'setstyle' does *not* ignore cursor settings. If
|
The 'getstyle' and 'setstyle' style/theme-management utilities can
|
||||||
|
handle user-definable cursors. By default, 'getstyle' ignores cursor
|
||||||
|
definitions; using 'getstyle -t' to get theme-related settings will
|
||||||
|
also include any cursors you've defined in the resulting stylefile.
|
||||||
|
|
||||||
|
However, by default, 'setstyle' does NOT ignore cursor settings. If
|
||||||
you wish to set a style or theme without installing cursor settings,
|
you wish to set a style or theme without installing cursor settings,
|
||||||
you can use 'setstyle --no-cursors' to ignore the cursor definitions.
|
you can use 'setstyle --no-cursors' to ignore the cursor definitions.
|
||||||
|
|
||||||
+--------------+
|
|
||||||
| Random Notes |
|
Random Notes
|
||||||
+--------------+
|
------------
|
||||||
|
|
||||||
Most X11 cursors are 16x16 bitmaps. Many X servers can actually handle
|
Most X11 cursors are 16x16 bitmaps. Many X servers can actually handle
|
||||||
larger cursors, though. To check, use:
|
larger cursors, though. To check, use:
|
||||||
|
|||||||
@@ -176,11 +176,9 @@ static int setMultiByte();
|
|||||||
#endif
|
#endif
|
||||||
static int updateUsableArea();
|
static int updateUsableArea();
|
||||||
|
|
||||||
#ifdef DEFINABLE_CURSOR
|
|
||||||
extern Cursor wCursor[WCUR_LAST];
|
extern Cursor wCursor[WCUR_LAST];
|
||||||
static int getCursor();
|
static int getCursor();
|
||||||
static int setCursor();
|
static int setCursor();
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -803,7 +801,7 @@ WDefaultEntry optionList[] = {
|
|||||||
&wPreferences.modelock, getBool, NULL
|
&wPreferences.modelock, getBool, NULL
|
||||||
}
|
}
|
||||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||||
#ifdef DEFINABLE_CURSOR
|
|
||||||
,{"NormalCursor", "(builtin, left_ptr)", (void*)WCUR_ROOT,
|
,{"NormalCursor", "(builtin, left_ptr)", (void*)WCUR_ROOT,
|
||||||
NULL, getCursor, setCursor
|
NULL, getCursor, setCursor
|
||||||
},
|
},
|
||||||
@@ -852,7 +850,6 @@ WDefaultEntry optionList[] = {
|
|||||||
{"SelectCursor", "(builtin, cross)", (void*)WCUR_SELECT,
|
{"SelectCursor", "(builtin, cross)", (void*)WCUR_SELECT,
|
||||||
NULL, getCursor, setCursor
|
NULL, getCursor, setCursor
|
||||||
}
|
}
|
||||||
#endif /* DEFINABLE_CURSOR */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -2472,8 +2469,6 @@ getRImages(WScreen *scr, WDefaultEntry *entry, WMPropList *value,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFINABLE_CURSOR
|
|
||||||
|
|
||||||
# include <X11/cursorfont.h>
|
# include <X11/cursorfont.h>
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -2736,8 +2731,6 @@ again:
|
|||||||
}
|
}
|
||||||
#undef CURSOR_ID_NONE
|
#undef CURSOR_ID_NONE
|
||||||
|
|
||||||
#endif /* DEFINABLE_CURSOR */
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------------- value setting functions --------------- */
|
/* ---------------- value setting functions --------------- */
|
||||||
static int
|
static int
|
||||||
@@ -3435,28 +3428,26 @@ setMultiByte(WScreen *scr, WDefaultEntry *entry, char *value, void *foo)
|
|||||||
extern _WINGsConfiguration WINGsConfiguration;
|
extern _WINGsConfiguration WINGsConfiguration;
|
||||||
|
|
||||||
WINGsConfiguration.useMultiByte = *value;
|
WINGsConfiguration.useMultiByte = *value;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFINABLE_CURSOR
|
|
||||||
static int
|
static int
|
||||||
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
|
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
|
||||||
{
|
{
|
||||||
if (None != wCursor[index])
|
if (None != wCursor[index]) {
|
||||||
{
|
|
||||||
XFreeCursor(dpy, wCursor[index]);
|
XFreeCursor(dpy, wCursor[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wCursor[index] = *cursor;
|
wCursor[index] = *cursor;
|
||||||
|
|
||||||
if ((WCUR_ROOT == index) && (None != *cursor))
|
if ((WCUR_ROOT == index) && (None != *cursor)) {
|
||||||
{
|
|
||||||
XDefineCursor(dpy, scr->root_win, *cursor);
|
XDefineCursor(dpy, scr->root_win, *cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* DEFINABLE_CURSOR*/
|
|
||||||
|
|
||||||
|
|||||||
@@ -697,9 +697,7 @@ wScreenInit(int screen_number)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DEFINABLE_CURSOR
|
|
||||||
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]);
|
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* screen descriptor for raster graphic library */
|
/* screen descriptor for raster graphic library */
|
||||||
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;
|
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;
|
||||||
|
|||||||
@@ -805,11 +805,8 @@ StartUp(Bool defaultScreenOnly)
|
|||||||
|
|
||||||
|
|
||||||
/* cursors */
|
/* cursors */
|
||||||
#ifdef DEFINABLE_CURSOR
|
/*wCursor[WCUR_NORMAL] = None;*/
|
||||||
wCursor[WCUR_NORMAL] = None;
|
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
|
||||||
#else
|
|
||||||
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
|
|
||||||
#endif
|
|
||||||
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
||||||
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
||||||
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
||||||
|
|||||||
@@ -213,12 +213,6 @@
|
|||||||
*/
|
*/
|
||||||
#undef GRADIENT_CLIP_ARROWS
|
#undef GRADIENT_CLIP_ARROWS
|
||||||
|
|
||||||
/*
|
|
||||||
* define DEFINABLE_CURSOR if you want WindowMaker's default cursor
|
|
||||||
* to be user-definable instead of using a hard-coded left_ptr.
|
|
||||||
*/
|
|
||||||
#undef DEFINABLE_CURSOR
|
|
||||||
|
|
||||||
|
|
||||||
#undef NO_WINDOW_ENUMERATOR
|
#undef NO_WINDOW_ENUMERATOR
|
||||||
|
|
||||||
|
|||||||
@@ -49,21 +49,21 @@ char *FontOptions[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
char *CursorOptions[] = {
|
char *CursorOptions[] = {
|
||||||
"NormalCursor"
|
"NormalCursor",
|
||||||
,"ArrowCursor"
|
"ArrowCursor",
|
||||||
,"MoveCursor"
|
"MoveCursor",
|
||||||
,"ResizeCursor"
|
"ResizeCursor",
|
||||||
,"TopLeftResizeCursor"
|
"TopLeftResizeCursor",
|
||||||
,"TopRightResizeCursor"
|
"TopRightResizeCursor",
|
||||||
,"BottomLeftResizeCursor"
|
"BottomLeftResizeCursor",
|
||||||
,"BottomRightResizeCursor"
|
"BottomRightResizeCursor",
|
||||||
,"VerticalResizeCursor"
|
"VerticalResizeCursor",
|
||||||
,"HorizontalResizeCursor"
|
"HorizontalResizeCursor",
|
||||||
,"WaitCursor"
|
"WaitCursor",
|
||||||
,"QuestionCursor"
|
"QuestionCursor",
|
||||||
,"TextCursor"
|
"TextCursor",
|
||||||
,"SelectCursor"
|
"SelectCursor",
|
||||||
,NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -379,20 +379,16 @@ print_help()
|
|||||||
printf("Usage: %s [OPTIONS] FILE\n", ProgName);
|
printf("Usage: %s [OPTIONS] FILE\n", ProgName);
|
||||||
puts("Reads style/theme configuration from FILE and updates Window Maker.");
|
puts("Reads style/theme configuration from FILE and updates Window Maker.");
|
||||||
puts("");
|
puts("");
|
||||||
puts(" --no-fonts ignore font related options");
|
puts(" --no-fonts ignore font related options");
|
||||||
/* Why these stupid tabs? They're misleading to the programmer,
|
puts(" --no-cursors ignore cursor related options");
|
||||||
* and they don't do any better than aligning via spaces: If you
|
puts(" --ignore <option> ignore changes in the specified option");
|
||||||
* have a proportional font, all bets are off anyway. Sheesh.
|
puts(" --help display this help and exit");
|
||||||
*/
|
|
||||||
puts(" --no-cursors ignore cursor related options");
|
|
||||||
puts(" --ignore <option> ignore changes in the specified option");
|
|
||||||
puts(" --help display this help and exit");
|
|
||||||
/*
|
/*
|
||||||
puts(" --format <format> specifies the format of the theme to be converted");
|
puts(" --format <format> specifies the format of the theme to be converted");
|
||||||
*/
|
*/
|
||||||
puts(" --version output version information and exit");
|
puts(" --version output version information and exit");
|
||||||
puts("");
|
/*puts("");
|
||||||
puts("Supported formats: blackbox");
|
puts("Supported formats: blackbox");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user