xfwm4 | drop non functional gtk cursor theme (!64)
Enrico Weigelt, metux IT consult
lkml at metux.net
Thu Nov 3 14:24:43 CET 2022
On 02.11.22 17:56, Olivier Fourdan wrote:
> Mind you, I did try before posting my reply, and it works.
Interesting. Did you restart your Xserver ? Are you using separate
font server ? Did you test whether it doesn't work anymore with my
patch ?
Because myDisplayCreateCursor() obviously just uses Xserver's builtin
cursor font.
1. myDisplayCreateCursor() calls XCreateFontCursor
2. XCreateFontCursor() once loads the Xserver's builtin font "cursor"
into an internal structure (not accessible from the outside) - once
loaded, it always reuses it (never attempts to reload ever), finally
creates a cursor from that.
The only chance (w/o really dirty and dangerous tricks, like overwriting
Xlib's internal fields) to do that is via XFIXES protocol. And that's
exactly what gdk is doing (see gdk_set_device_cursor() et al).
BUT:
#1: XFixesChangeCursor() directly changes the cursor itself (not the
builtin cursor font) thus not necessary to recreate and reassign.
(the whole point of this function is that other clients don't need
to care at all)
#2: it has no influence on xfwm's own cursors (eg. the resize cursors),
as nobody else then xfwm knows about them
#3: the current code recreates cursors from builtin font, so overwriting
whatever anybody else (eg. gtk) did via XFixesChangeCursor()
> FWIW, this code is to update the cursor for xfwm4 itself, not the apps
> (those need to update their cursor themselves).
Yes, of course, I'm aware of that.
Some applications, BTW, (eg. chrome) do use the new cursor theme,
after restart.
--mtx
--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287
More information about the Xfce4-dev
mailing list