termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.85k stars 290 forks source link

[Bug]: default cursor doesn't change #586

Closed numberokta closed 4 months ago

numberokta commented 4 months ago

Problem description

I'm not sure if this is a bug. default cursor doesn't change for some apps. this issue only happens in x11-repo apps and in proot-distro everything's fine I khow x11 work like this: check ~/.gtkrc-2.0 for gtk2 cursor check ~/.config/gtk-3.0/settings.ini for gtk3 cursor and check this files for default cursor ~/.icons/default/index.theme ~/.local/share/icons/default/index.theme /usr/share/icons/default/index.theme I think termux-x11 doesn't check for default cursor files.

What steps will reproduce the bug?

I installed lxappearance and changed cursor but some apps (like rofi, polybar) still using default cursor. I recorded this issue:

https://github.com/termux/termux-x11/assets/20727200/0bce7ead-553e-4020-92b1-7527a6cd6d50

What is the expected behavior?

termux-x11 use selected cursor like x11.

twaik commented 4 months ago

AFAIK X server does not manage cursors. It only displays them.

numberokta commented 4 months ago

I found the issue, and it's a bug, but it's not related to termux-x11. It's a bug in termux-packages, precisely xcb-util-cursor package. I looked at source of build.sh in termux-packages and configure.ac must be patched. DEF_CURSORPATH="~/.icons:/usr/share/icons:usr/share/pixmaps:/usr/X11R6/lib/X11/icons" to DEF_CURSORPATH="~/.icons:@TERMUX_PERFIX/share/icons:@TERMUX_PERFIX/share/pixmaps:@TERMUX_PERFIX/X11R6/lib/X11/icons"

twaik commented 4 months ago

@numberokta test deb from here. https://github.com/termux/termux-packages/actions/runs/8358888914

numberokta commented 4 months ago

@twaik thanks.

twaik commented 4 months ago

Does it work? I still did not merge it to termux-packages.

numberokta commented 4 months ago

It works.

RalfWerner commented 4 months ago

What has changed compared to your video and in what second?

RalfWerner commented 4 months ago

@twaik I've been creating Xclients for about 40 years. For the first time, I hear that a XServer cannot change the pointer. It does not coincide with my experience. Rather that it is one of the first actions of a beginner. XCB and XLIB are central interfaces to the XServer and are used in many Xclients. I would be careful to make changes without checking thoroughly.

twaik commented 4 months ago

For the first time, I hear that a XServer cannot change the pointer.

I did not it can not change pointer. I said changing pointer is not it's purpose. It only displays what X clients request to use as a pointer.

numberokta found the cause of issue and it is not related to Xlib, Xcb or X clients at all. It is a configuration option that was not checked while package was ported.

twaik commented 4 months ago

Ok, it is merged. Update will be available in repos in a few hours.

RalfWerner commented 4 months ago

It only displays what X clients request

Correct and that with the xcb-util package (you've changed!?) and in the video about 12 times. As far as I can see that but always "as expected". I'll check also when pkg up update it:)