-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Adopt GTK3 CSS cursor names #14610
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
base: master
Are you sure you want to change the base?
Adopt GTK3 CSS cursor names #14610
Conversation
src/gui_gtk_x11.c
Outdated
"default", // GDK_CENTER_PTR (no css analogue) | ||
"default" // GDK_LEFT_PTR | ||
}; | ||
# endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These choices are best considered relative to the mshape_ids
array above. It seems we'll have to make some tough choices because GTK no longer supports all of the shapes documented under mouseshape
. This PR is still in draft mode because I have not updated that documentation to explain which shapes are supported under GTK. I will do so once we agree on the choices in this list.
Thanks for working on that. I think that makes sense. Do I understand correctly, that this should not break anything on GUI (GTK3) Vim? |
No errors or crashes will occur. However it is not backward compatible. Users who currently use numeric cursor shape IDs or any of the following vim shape names will see different icons. The underlying issue is that
|
Okay, so it looks like we will have those 'mouseshapes': (System is
Missing:
I am a bit surprised we don't have beam and busy. But when this is no longer supported by the underlying library :/ Currently the help states also this:
So it seems more or less okay? Can we keep the current cursor shapes when we still use GTK2/3 UI? |
a491f50
to
3a7fc8d
Compare
We will have support for the vim names I like the idea of adding a Regarding when to adopt this, I don't have a firm preference. I wanted to start on this because it is coming eventually and would take some discussion. If it is best to delay this until GTK4 that is fine with me. I think one argument for adopting this in GTK3 sooner rather than later relates to GTK2 support. I don't yet have a firm grasp on how hard it will be to maintain support for all of GTK2/3/4. Whatever the absolute effort required, on a relative basis it would be considerably easier to support any two versions of GTK at once. This seems to have been the approach so far. If we decide that we will support only GTK3/4 in vim10 then I think there's two ways to approach that:
The first option would argue for merging this now. The second option would argue for folding this into the much larger effort to support GTK4. We currently have a kludge that shunts vim users into X11 even with GTK3 unless they explicitly opt into Wayland. I think that was good when it was added but eventually this will have to be removed.
|
Solution: Adopt GTK3 CSS cursor convention.
3a7fc8d
to
59d37c9
Compare
Problem: GTK4 will drop numeric cursor support.
Solution: Adopt GTK3 CSS cursor convention.
I've been working on GTK4 support. GTK3 began the transition to CSS styling for mouse cursors. GTK4 drops almost all X11-specific constructs, including the numeric X cursors. GTK3 began this transition by supporting CSS names for mouse cursors. This PR adopts that convention as a precursor to GTK4 support.