-
Notifications
You must be signed in to change notification settings - Fork 18
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
Focus not passed through on click (Wayland) #11
Comments
just checked on plasma wayland. It worked as expected for me. And i did face the same bug in gnome before. Gnome sends the keyboard events to the topmost app (which is our overlay) instead of the app in focus. #6 is a good example of a similar issue with keyboard and overlay. Try checking if you can reproduce this on any other DE/WM. If other WMs work fine, then we will mark this as a gnome bug :) |
Thank you for the pointer about the gnome bug! I upgraded to Gnome 44.3 (by upgrading Ubuntu from 22.04 to 23.04) and the Wayland problem does not happen! |
great. i hope coderedart/jokolay#6 will be resolved soon too :) |
I can somewhat recreate this on KDE wayland. |
kde wayland works fine for me. On latest KDE + Endeavour (Archlinux) with Nvidia can you try running the passthrough.mp4 |
the basic example is also not working. The pass-through field in the app changes, but it doesn't let me click through. maybe because it runs through xwayland, I am not sure I am also on arch and Kde wayland and an up to date system |
@mystchonky This would be hard to debug on my side as I can't reproduce it. If you want to figure out the problem, you can first try running the passthrough example at https://github.com/coderedart/glfw-sys-passthrough/blob/master/examples/passthrough.c cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_EXAMPLES=ON If that doesn't work, you will have to deal with master glfw version 3.4 directly. |
passthrough example doesn't work either. Is there a way to create a wayland window and not x11 ? Could that be the problem ?
what does this mean? |
I figured out how to build it using wayland and now it correctly passes through. not sure what is going on |
https://www.glfw.org/docs/latest/compile_guide.html#GLFW_BUILD_X11 cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_EXAMPLES=ON -D GLFW_BUILD_X11=OFF -D GLFW_BUILD_WAYLAND=ON The https://github.com/glfw/glfw could have had some more improvements recently which I haven't patched back into my fork.
If it does work, then its just my fork not having the recent fixes for passthrough. I will just fix that. |
The problem with using pure wayland is that it won't allow us to get global cursor position. So, when our window is not in focus, we can't check if the cursor is on any of our "egui areas" to disable passthrough. |
I tried this. Had to make a small adjustment and add a |
Then, the issue is probably with your xwayland. maybe reinstall I just installed hyprland window manager and running egui_overlay with xwayland works fine for me. I updated my system and rebooted, just to see if there's any new bugs. But everything is still working fine under both plasma wayland and hyprland. I will answer any questions you might have, but you will probably need to debug this yourself as I can't reproduce it at all. |
Apparently it is a bug with XWayland itself and a fix has already been merged in 24.1. This isn't an issue related to this project, GLFW or KDE plasma either. I will post an update here once I test the fix :) |
Using the triangle example, the triangle overlay takes focus on click rather than the window behind it. Mouse clicks properly propagate to the app behind the overlay, however keyboard entry doesn't work because the triangle overlay has focus.
How to reproduce:
The problem does not occur in Gnome42.9 + X11. Clicks send the focus to the app behind the triangle.
The text was updated successfully, but these errors were encountered: