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

- made the definable cursors feature available by default (removed the

compile time option)
This commit is contained in:
dan
2001-11-23 05:39:13 +00:00
parent 0c4dc1c24a
commit 06b48596f5
7 changed files with 55 additions and 105 deletions

View File

@@ -18,8 +18,10 @@ Changes since version 0.70.0:
saving dock/clip/session information on exit.
- 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.
(Note that this only applies to deminiaturizing shaded windows.
Unhiding an application will keep the shaded/unshaded state of windows.)
(Note that this only applies to deminiaturizing shaded windows. Unhiding
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:

View File

@@ -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
<http://www.windowmaker.org/> allows user-definable mouse cursors; the
Definable Mouse Cursors for Window Maker
----------------------------------------
The definable-cursor feature allows user-definable mouse cursors; the
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
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.
+----------------------------+
| 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 |
+---------------------------+
Defining Your Own Cursors
-------------------------
A cursor specification takes one of the following forms in the
~/GNUstep/Defaults/WindowMaker file:
@@ -84,23 +57,22 @@ Maker used them in the past, but doesn't use them anymore):
ResizeCursor = (builtin, sizing);
+----------------------------------------------+
| Using Cursors with 'getstyle' and 'setstyle' |
+----------------------------------------------+
The 'getstyle' and 'setstyle' style- and 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.
Using Cursors with 'getstyle' and 'setstyle'
--------------------------------------------
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 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
larger cursors, though. To check, use:

View File

@@ -176,11 +176,9 @@ static int setMultiByte();
#endif
static int updateUsableArea();
#ifdef DEFINABLE_CURSOR
extern Cursor wCursor[WCUR_LAST];
static int getCursor();
static int setCursor();
#endif
/*
@@ -803,7 +801,7 @@ WDefaultEntry optionList[] = {
&wPreferences.modelock, getBool, NULL
}
#endif /* KEEP_XKB_LOCK_STATUS */
#ifdef DEFINABLE_CURSOR
,{"NormalCursor", "(builtin, left_ptr)", (void*)WCUR_ROOT,
NULL, getCursor, setCursor
},
@@ -852,7 +850,6 @@ WDefaultEntry optionList[] = {
{"SelectCursor", "(builtin, cross)", (void*)WCUR_SELECT,
NULL, getCursor, setCursor
}
#endif /* DEFINABLE_CURSOR */
};
@@ -2472,8 +2469,6 @@ getRImages(WScreen *scr, WDefaultEntry *entry, WMPropList *value,
}
#endif
#ifdef DEFINABLE_CURSOR
# include <X11/cursorfont.h>
typedef struct
{
@@ -2736,8 +2731,6 @@ again:
}
#undef CURSOR_ID_NONE
#endif /* DEFINABLE_CURSOR */
/* ---------------- value setting functions --------------- */
static int
@@ -3435,28 +3428,26 @@ setMultiByte(WScreen *scr, WDefaultEntry *entry, char *value, void *foo)
extern _WINGsConfiguration WINGsConfiguration;
WINGsConfiguration.useMultiByte = *value;
return 0;
}
#endif
#ifdef DEFINABLE_CURSOR
static int
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
{
if (None != wCursor[index])
{
if (None != wCursor[index]) {
XFreeCursor(dpy, wCursor[index]);
}
}
wCursor[index] = *cursor;
if ((WCUR_ROOT == index) && (None != *cursor))
{
if ((WCUR_ROOT == index) && (None != *cursor)) {
XDefineCursor(dpy, scr->root_win, *cursor);
}
}
return 0;
}
#endif /* DEFINABLE_CURSOR*/

View File

@@ -697,9 +697,7 @@ wScreenInit(int screen_number)
return NULL;
}
#ifndef DEFINABLE_CURSOR
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]);
#endif
/* screen descriptor for raster graphic library */
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;

View File

@@ -805,11 +805,8 @@ StartUp(Bool defaultScreenOnly)
/* cursors */
#ifdef DEFINABLE_CURSOR
wCursor[WCUR_NORMAL] = None;
#else
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
#endif
/*wCursor[WCUR_NORMAL] = None;*/
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);

View File

@@ -213,12 +213,6 @@
*/
#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

View File

@@ -49,21 +49,21 @@ char *FontOptions[] = {
};
char *CursorOptions[] = {
"NormalCursor"
,"ArrowCursor"
,"MoveCursor"
,"ResizeCursor"
,"TopLeftResizeCursor"
,"TopRightResizeCursor"
,"BottomLeftResizeCursor"
,"BottomRightResizeCursor"
,"VerticalResizeCursor"
,"HorizontalResizeCursor"
,"WaitCursor"
,"QuestionCursor"
,"TextCursor"
,"SelectCursor"
,NULL
"NormalCursor",
"ArrowCursor",
"MoveCursor",
"ResizeCursor",
"TopLeftResizeCursor",
"TopRightResizeCursor",
"BottomLeftResizeCursor",
"BottomRightResizeCursor",
"VerticalResizeCursor",
"HorizontalResizeCursor",
"WaitCursor",
"QuestionCursor",
"TextCursor",
"SelectCursor",
NULL
};
@@ -379,20 +379,16 @@ print_help()
printf("Usage: %s [OPTIONS] FILE\n", ProgName);
puts("Reads style/theme configuration from FILE and updates Window Maker.");
puts("");
puts(" --no-fonts ignore font related options");
/* Why these stupid tabs? They're misleading to the programmer,
* and they don't do any better than aligning via spaces: If you
* have a proportional font, all bets are off anyway. Sheesh.
*/
puts(" --no-cursors ignore cursor related options");
puts(" --ignore <option> ignore changes in the specified option");
puts(" --help display this help and exit");
puts(" --no-fonts ignore font related options");
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("");
puts("Supported formats: blackbox");
puts(" --version output version information and exit");
/*puts("");
puts("Supported formats: blackbox");*/
}