mirror of
https://github.com/Interlisp/maiko.git
synced 2026-03-26 10:03:18 +00:00
Add support for setting cursor color to ldex (X11 display) (#508)
The cursor (foreground) color can be set with the
-cursorColor x11-color-spec
option to ldex or any front-end that passes the options through to ldex.
For example:
lde ... -cursorColor red
lde ... -cursorColor '#A020F0'
./run-medley -cursorColor RED -g 1200x700 -sc 1200x700 -noscroll
Alternatively, the color may be specified with the ldex*cursorColor resource
(in ~/.Xresources, or other such X11 resource databases that are loaded by
the X11 server)
The command line option will override the X11 resource option.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
static XColor cursor_fore_xcsd, cursor_back_xcsd, xced;
|
||||
extern Colormap Colors;
|
||||
extern char cursorColor[255];
|
||||
|
||||
extern DspInterface currentdsp;
|
||||
/* a simple linked list to remember X cursors */
|
||||
@@ -143,7 +144,7 @@ void init_Xcursor(DspInterface dsp)
|
||||
|
||||
XLOCK; /* Take no X signals during this activity (ISC 386) */
|
||||
|
||||
XAllocNamedColor(dsp->display_id, Colors, "black", &cursor_fore_xcsd, &xced);
|
||||
XAllocNamedColor(dsp->display_id, Colors, cursorColor, &cursor_fore_xcsd, &xced);
|
||||
XAllocNamedColor(dsp->display_id, Colors, "white", &cursor_back_xcsd, &xced);
|
||||
|
||||
XUNLOCK(dsp); /* OK to take signals again */
|
||||
|
||||
Reference in New Issue
Block a user