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

xwayland: deactivate xwayland focus if wayland is focused #7458

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

Trimutex
Copy link
Contributor

Describe your PR, what does it fix/add?

When going from XWayland -> Wayland the window doesn't actually unfocus until you activate another XWayland window. This removes the focus so the last XWayland window doesn't think its still focused.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Nope

Is it ready for merging, or does it need work?

Ready for merging

@Trimutex
Copy link
Contributor Author

Should fix #7435

@koeqaife
Copy link

Should fix #7435

My discord works natively in wayland

@Trimutex
Copy link
Contributor Author

Forgot to mention that this also fixes other things like going from some games on XWayland to a Wayland window causes chat input to stop working.

@Trimutex
Copy link
Contributor Author

Trimutex commented Aug 22, 2024

Should fix #7435

My discord works natively in wayland

Ah, thought it might have been what one comment was talking about, as it fixes that issue, apologies!
#7435 (comment)

@vaxerski
Copy link
Member

this part has been a dangerous place.

I need prusa-slicer tested - notorious for not working with popups when something is off

@Trimutex
Copy link
Contributor Author

this part has been a dangerous place.

I need prusa-slicer tested - notorious for not working with popups when something is off

Understandable that something like this would want to be tested a bunch. Been using it for the past day and I can only see minor fixes on my side. Any specific things you want me to run through to test?

@vaxerski
Copy link
Member

see the second line of my message

@Trimutex
Copy link
Contributor Author

Trimutex commented Aug 23, 2024

Ah, I didn't realize prusa-slicer was a program name so I misunderstood.

Downloaded prusa-slicer 2.8.0-1 and attempted to get to default settings from my understanding. Menu's seem to function normally, but messing around with it too long causes Hyprland to crash, both on -git and using this commit.
Edit note: Hyprland crash is on subsequent launches of program after first prusa crash, prusa just refuses to open if Hyprland is not restarted. Error is invalid (NULL) pointer instance && g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed.

I can try to work on bisecting that crash as well but it seems unrelated to any issues with the commit itself.

@Trimutex
Copy link
Contributor Author

Ignore above, issues with Wayland for prusa-slicer are already known. See prusa3d/PrusaSlicer#12246

Prusa-slicer behaves as normal with no bugs in popups and menus using solution found here: prusa3d/PrusaSlicer#12867

@vaxerski ping if you needed as testing went fine

@vaxerski
Copy link
Member

can you ping me tomorrow evening, I'll do some testing

@vaxerski
Copy link
Member

regresses #6616 with bambustudio

launch bambustudio

go to preview

click any dropdown, it instantly closes

the reason is that you send an unfocus event to bambu incorrectly

@Trimutex
Copy link
Contributor Author

Hmm, ok I'll look into it and create a better fix then. Couldn't find those issues when I searched on GitHub :/

@vaxerski
Copy link
Member

even I get lost in the tracker, don't worry

@Trimutex
Copy link
Contributor Author

Should behave like normal now, and only remove focus if going from xwayland -> wayland.

Side note: Testing using bambustudio crashes Hyprland if I mess with it too much (like around 5 pop-up clicks). Getting this while testing with -git and these commits. Is this a known thing, just due to my hardware that I gotta figure out, or unknown?

@vaxerski
Copy link
Member

I've never had that, can you get a debug stacktrace? https://wiki.hyprland.org/Crashes-and-Bugs/#obtaining-a-debug-stacktrace

@Trimutex
Copy link
Contributor Author

Sure, I'm going to go ahead and open an issue for it though, since its off topic

@Trimutex
Copy link
Contributor Author

Issue moved to #7506

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit b672118 into hyprwm:main Aug 25, 2024
10 checks passed
@Trimutex Trimutex deleted the xwayland-unfocus branch August 26, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants