Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appearance under wayland: fix customizing themes #757

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

lukefromdc
Copy link
Member

Since wayland compositors such as wayfire follow the GNOME interface gsettings values, we need to set them here too.

*Otherwise we can only reliably select existing metathemes or sometimes a saved custom theme.

@lukefromdc
Copy link
Member Author

Fixes
#755

@lukefromdc
Copy link
Member Author

We got the same Travis issue, again affecting only Fedora. Debian build finished fine

 rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl --pre

ERROR:  Error installing dpl:

	The last version of dpl (>= 0) to support your Ruby & RubyGems was 2.0.3.beta.4. Try installing it with `gem install dpl -v 2.0.3.beta.4`

	dpl requires Ruby version >= 3. The current ruby version is 2.7.8.225.

Successfully installed mime-0.4.4

Successfully installed json_pure-2.7.2

Successfully installed excon-0.110.0

Successfully installed travis-packagecloud-ruby-1.1.0

Successfully installed regstry-1.0.15

Successfully installed travis-cl-1.2.4

The command "rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl --pre" failed and exited with 1 during .

Your build has been stopped.

@mbkma
Copy link
Member

mbkma commented Jun 5, 2024

@lukefromdc as I said we need to apply this mate-desktop/mate-desktop.org@6a6aa9f to every repo to fix this issue

@lukefromdc lukefromdc force-pushed the wayland-theme-customize branch from d610d7b to b29a2e8 Compare June 5, 2024 16:39
@lukefromdc
Copy link
Member Author

#758 fixed travis builds in a test

@lukefromdc lukefromdc force-pushed the wayland-theme-customize branch 2 times, most recently from fc7ec90 to 54b4404 Compare June 5, 2024 18:20
@mark-herbert42
Copy link

tested cursor scheme/size - works like a charm.

Since wayland compositors such as wayfire follow the GNOME interface gsettings values, we need to set them here too
@lukefromdc lukefromdc force-pushed the wayland-theme-customize branch from 54b4404 to 649fad9 Compare June 7, 2024 04:24
*Note that only compositors that read the cursor size from gsettings will apply this, wayfire does not at this time
*This is also true of cursor theme: the compositor must read it from gsettings for it to be applied from the control center
@lukefromdc
Copy link
Member Author

I found the place where cursor size changes are applied and was able to change the GNOME gsettings value from there.

Unfortunately, I also found that Wayfire does not use gsettings to set cursor theme or size at all unless this changed in some recent commit. This the the real reason I am not seeing any response to changing cursor theme or size via gsettngs.I can change it just fine from WCM (wayfire configuration manager) but it appears some other compositors do support changing the cursor size and theme from gsettings.

At least some versions of sway have been reported to be able to read cursor size and theme from gsettings
https://www.reddit.com/r/swaywm/comments/qq74gv/how_do_i_set_correctly_the_cursor_theme/?rdt=47524
Presumably so does GNOME, meaning some wayland compositors do support cursor theming and size via the GNOME gsettings..

My vote is for adding a warning dialog to indicate that some compositors may ignore gsettings for cursor theme and size, and include cursor theme and size support in this.

thoughts?

@lukefromdc
Copy link
Member Author

Also see
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/58
concerning cursor size and theme setting.
Again, so long as any compositor reads these from gsettings we need to support that, but we also need to warn users on compositors that do not

@mark-herbert42
Copy link

I use wayfire - git snapshot actually. But I did not set up any exotic plugins except of rounding corners over it. And - it works for me. How - I do not know, maybe it is done by gtk through some wayland-wlroots call, but it works.

And my wayfire is controlled by ini file - not by gsettings,

Ok - writing this mail I got the point how it works. So - when mu cursor is hoverinhg over gtk window (or over Qt window ) - it pains cursor theme from org.gnome gsettings. When I hover over window decorations or Xorg(Xwayland) window it takes wayfire ini file settings. So it actually works excatly as Mate+Compiz in Xorg session. Gtk overrides the compositor settings. Or WM settings. So f you set up some fancy cursor in Wayfire.ini but have some legacy in gsettings it will behave inconsistently. And it is not a wayland-introduced bug (as I had same effect with compiz) - it is just how Mate works with external wm or compositor.

And I do not see many solutions here. Well - solution 1 - is to make a Wayfire add-on like we had on compiz - "Mate-compatibilty" that will read gsettings cursor theme and force it over the one from ini file. or make add-on code for mate-settings - if wayfire detected (display = wayland + wayfire.ini is writeable ) - duplicate settings to wayfire.ini. Wayfire addon seems to be better way as it is going same ditrection as compiz was doing.

Anyway cursor settings in org.gnome are needed because no matter how wayfire is acting now the org.gnome settings are respected. Over web-browsers, libreoffice or caja-painted desktop org.gnome cursor will be.

@lukefromdc
Copy link
Member Author

Just confirmed that even though wayfire has its own ability to specify the cursor, the GNOME gsettings is in fact applied over a GTK window. Changing size works on my setup, the old hardcode I put somewhere for a decade ago to keep early QT4 apps from changing the cursor still means the theme change is visible only in dconf-editor. Anyway, we now have two tests confirming this part of the code works in and only in GTK apps.

@lukefromdc lukefromdc requested a review from a team June 12, 2024 21:18
@lukefromdc
Copy link
Member Author

Does anyone else want to review this before merging? We have a successful test by the reporter of the original issue, and all the travis checks pass

@lukefromdc lukefromdc merged commit 25546fd into master Jun 27, 2024
3 checks passed
@lukefromdc lukefromdc deleted the wayland-theme-customize branch June 27, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants