Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-05-15 14:57:09



Reply to topic  [ 5 posts ] 
Desktop theme's own mouse cursors 
Author Message

Joined: 2011-09-27 11:18:31
Posts: 176
Reply with quote
I know you're going to consider this stupid, but I'll ask it anyway :-)

Is there a way to make the viewer use my own Linux desktop theme's mouse cursors instead of the ancient X.org ones? Until recently I thought it impossible, because all viewers come with the res-sdl folder that contains them. But I recently noticed that Alchemy somehow uses the desktop theme's cursors (apart from the special ones: sit, pay etc). I asked on their Discord server how they did it and all they could/would tell me was that they have «proper wayland, xdg-portal and SDL2 support». (I'm on X, I don't see how the second is relevant and I CoolVLViewer supports wayland and SDL2 as well.)

That being said, I tried converting the Xcursor theme to bmp files myself (with the xcur2png program and imagemagick's convert), which was successful but the result was hideous, because the cursors lost all transparency (they had a greyish background) and still operated like an arrow while mine are circular (I use https://store.kde.org/p/1244392).

Anyway, I know it's not important, but I wanted to ask.

Thank you.


2023-08-16 13:09:07
Profile

Joined: 2009-03-17 18:42:51
Posts: 5580
Reply with quote
g0rd0ngrfr33mailgr wrote:
Is there a way to make the viewer use my own Linux desktop theme's mouse cursors instead of the ancient X.org ones?
For next release, I added a configuration export (in "cool_vl_viewer.conf") to enable system cursors where suitable/possible.

Quote:
all they could/would tell me was that they have «proper wayland, xdg-portal and SDL2 support».
  • Wayland (or rather X-Wayland, for the viewers, Alchemy included) is a big pile of fragile, glitchy code, that attempts (and fails) to mimic what X11 has been providing natively for decades... Forget about root sessions with X-over-ssh (a must have for administrators), for example, and as far as viewers are concerned, (X-)Wayland support in OpenGL drivers is rather fragile and incomplete...
    This said, the Cool VL Viewer will run under X-Wayland (when Alchemy fails to initialize Xlib in a thread-safe state under X11, causing OpenGL drivers to fall back to mono-threaded rendering); just be aware that I won't provide any support for any (X-)Wayland related glitches (which are very likely to happen with OpenGL drivers).

  • xdg-portal offers a wrapper around file selectors, for example, but it is totally non-standard (it does not even exist in all Linux distros), and relies on an amount of other "packages" that then become added dependencies to add to your system in order to run the viewer...
    I instead implemented an XUI file selector, which works the same on all OSes (and all window managers under Linux), is natively non-blocking (since it is updated at each frame as part of the viewer UI and does not block the latter while not needing a complex threading scheme), and blends in the viewer UI.

  • As for SDL2 support, the Cool VL Viewer had it for years (back then, my viewer could even be compiled against either of SDL1 or SDL2)... I so far did not implement the SDL2 feature for using system cursors (simply because I myself prefer using the viewer custom cursors), but this was trivial to do and is now done (and I let people the choice, instead of forcing something they might not like down their throat).

Alchemy is also now (their PBR branch, at least) depending on systemd to work (!), where the Cool VL Viewer does not depend on any init system... This is because they are using a C++ library for dbus which itself depends on (lib)systemd (instead of reusing, like I offered to them, my lean and clean dbus code, that I implemented years ago for the Cool VL Viewer, and which only depends on the "universal" and omnipresent glib).

Finally, if you look inside llwindowsdl.cpp and llappviewerlinux.cpp, you will notice how much more suited to Linux is the Cool VL Viewer, with stuff no other TPV got (primary & secondary paste buffers support, splash screen, proper windows position saving with SDL2, proper window icon support, multiple GL shared contexts support, proper full screen mode (with full desktop fallback), proper crash log with symbols demangling, etc).

Unlike all other TPVs, mine is being developed under and, in the first place, for Linux...


2023-08-16 15:52:14
Profile WWW

Joined: 2011-09-27 11:18:31
Posts: 176
Reply with quote
Henri Beauchamp wrote:
For next release, I added a configuration export (in "cool_vl_viewer.conf") to enable system cursors where suitable/possible.

THANK YOU! You don't know how much this has been bugging me and for how long!!

Quote:
Wayland (or rather X-Wayland, for the viewers, Alchemy included) is a big pile of fragile, glitchy code, that attempts (and fails) to mimic what X11 has been providing natively for decades... […] just be aware that I won't provide any support for any (X-)Wayland related glitches (which are very likely to happen with OpenGL drivers).

That's what I've heard too, and I don't plan to switch until it becomes necessary.

Quote:
I instead implemented an XUI file selector, which works the same on all OSes (and all window managers under Linux), is natively non-blocking (since it is updated at each frame as part of the viewer UI and does not block the latter while not needing a complex threading scheme), and blends in the viewer UI.

I remember when you did :-)

Quote:
Alchemy is also now (their PBR branch, at least) depending on systemd to work (!)

I know! :evil: Part of the reason i switched to Gentoo is that it still provides the option to use OpenRC (with some compromises), but, if you have OpenRC, you can't have the systemd dbus as well, hence I can neither use the Alchemy PΒR pre-compiled binaries nor build it myself, unless I switch to systemd.


2023-08-16 16:24:43
Profile

Joined: 2011-09-27 11:18:31
Posts: 176
Reply with quote
It works perfectly. Thank you!


2023-08-20 11:26:51
Profile

Joined: 2016-06-19 21:33:37
Posts: 350
Location: Columbus area, OH, USA
Reply with quote
I appreciate this addition. While I didn't have a problem with the classic behavior, it's nice to have the same darker themed cursors in the viewer as my desktop.


2023-08-20 11:55:47
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.