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

Cursor/Tablet: move to a hyprland impl #5902

Merged
merged 2 commits into from
May 9, 2024
Merged

Cursor/Tablet: move to a hyprland impl #5902

merged 2 commits into from
May 9, 2024

Conversation

vaxerski
Copy link
Member

@vaxerski vaxerski commented May 5, 2024

This moves wlr_cursor to a completely new impl mostly under CPointerManager

Still needs tablet support to be shipped.

TODO:

  • Tablet support
  • Testing
  • Wiki (Cursor/Tablet rewrite changes hyprland-wiki#641)
  • Fix hardware cursors being a bit inefficient with rendering
  • Fix software cursors being a broken mess
  • Allow WLR_NO_HARDWARE_CURSORS (cursor:no_hardware_cursors. Dynamic as well.)
  • Fix surface cursors being wonky

New stuff:

  • cursor:no_hardware_cursors replaces the wlr env
  • cursor:hotspot_padding default 1, the amount of padding around the hotspot around monitor edges. Set to 10 to see what I mean.

@vaxerski vaxerski force-pushed the cursor-rewrite branch 2 times, most recently from 30a75af to 6899b9e Compare May 5, 2024 21:52
@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

Tablet done. Haven't tested, needs testing. @fufexan pls and ofc anyone else who has one.

I don't know what a "strip" and "ring" is, those are left unimplemented because I am unsure how they work and what they do. Also it's 2:16am. If anyone knows, lmk.

@vaxerski vaxerski requested a review from fufexan May 6, 2024 01:18
@vaxerski vaxerski force-pushed the cursor-rewrite branch 2 times, most recently from 7468a89 to 5a6bee9 Compare May 6, 2024 02:13
@Agent00Ming

This comment was marked as resolved.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

what is and in what way

@nonetrix

This comment was marked as outdated.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

post crash report when you crash

@nonetrix
Copy link

nonetrix commented May 6, 2024

My bad I forgot I was running plugins, also a --skip-loading-plugins flag would be a neat addition especially for NixOS to avoid rebuilding my system

@nonetrix

This comment was marked as outdated.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

does that mean it works without plugins? (wouldn't be a huge surprise)

skip loading plugins as in? Like, reject to load plugins altogether? It is doable, but a config opt would make more sense imo

edit: you were faster. Thanks, great news. Also please check if monitor and area mappings in the config work if possible

I'll try to finish this during the day (its 4am...) but I can't promise anything as I have an exam on tuesday.

@nonetrix

This comment was marked as outdated.

@nonetrix
Copy link

nonetrix commented May 6, 2024

Actually I think I may have misattributed the crash to the plugin perhaps, it's crashing like before with the plugin. I suspect something is causing it to crash most of the time but not always. Anyway, here is the log wasn't able to use transformations but crashed regardless. I guess I just got very lucky or unlucky depending on how you view it
hyprlandCrashReport240832.txt

@nonetrix
Copy link

nonetrix commented May 6, 2024

Ags seems to be the culprit in making it crash for some reason, disabling that allows me to start Hyprland consistently but then I get strange errors in Firefox like this. I am 99% sure when I had it working I was using the updated version but I guess something weird could have happened without realizing


(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

(firefox:256722): Gdk-CRITICAL **: 22:25:59.697: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed
[Parent 256722, Main Thread] WARNING: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed: 'glib warning', file /build/firefox-125.0.3/toolkit/xre/nsSigHandlers.cpp:187

Edit: pretty certain I accidentally loaded wrong version, must have gotten confused when trying to rebuild older Hyprland so I could at least attempt to post logs or something sorry I'm a moron. Pretty much no apps start except for Kitty when I get past crashing by disabling Ags. The ones that don't complain about not being able to find monitor or something along those lines always seemingly

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

crash should be fixed. Typical 2am mistake.

@vaxerski vaxerski force-pushed the cursor-rewrite branch 3 times, most recently from 9af47df to ed9a189 Compare May 6, 2024 11:22
@Agent00Ming

This comment was marked as outdated.

@Agent00Ming

This comment was marked as outdated.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

it's cause of this, prolly: #5902 (comment)

@Agent00Ming

This comment was marked as outdated.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

yeah I have no fucking clue how that happens, tryna figure out rn.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

found it I think, will fix, gimme sec.

@vaxerski
Copy link
Member Author

vaxerski commented May 6, 2024

okay that should be fixed. Now, why do client-side cursors not render...

@Agent00Ming
Copy link
Contributor

There aren't any bugs left that I know of, so send it. The other tablet users will find the undiscovered bugs 😈

@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

lets fuckin roll

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

There aren't any bugs left that I know of, so send it. The other tablet users will find the undiscovered bugs 😈

Of course there will be more bugs, you can’t appease every spacebar heating user, but for now, seems stable enough to throw at the labrats, I used it yesterday for the rest of the day and didn’t have any functionality issues, sounds like we gtg. Obligatory clueless LGTM

This moves wlr_cursor to a completely new impl mostly under
CPointerManager

Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
@vaxerski vaxerski merged commit 84e8d18 into main May 9, 2024
14 checks passed
@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

Thanks guys!

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

Love how there has to be one last commit before the merge because that’s a beautiful way to get SEGVs all over the floor(always happens, you think something’s good to go “Ill just add this and we can ship it” - Famous last words)

@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

there was no changes, I just reworded the commits

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

Wait but ring and strips are implemented

@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

nope xD if someone has one and opens a bug report I might add it (I still dunno what they are)

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

nope xD if someone has one and opens a bug report I might add it (I still dunno what they are)

I mean- ring works for me? At least libinput suggests so(see screenshot above)

@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

libinput will see it but the apps don't get these events forwarded

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

libinput will see it but the apps don't get these events forwarded

I see. Well, do I have to open an issue to get the ring implemented? X)

@vaxerski
Copy link
Member Author

vaxerski commented May 9, 2024

would be nice

@Ciel-MC
Copy link

Ciel-MC commented May 9, 2024

would be nice

#5960

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.

None yet

6 participants