-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
pointer constraints on layer-shell surfaces broken in recent commit #4465
Comments
check with above |
I'm sorry, I have tested wrong and it is precisely not the above ... Now I double checked and it is because of this: diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 2b3fc7d3..fdb1dd93 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1101,6 +1101,13 @@ wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<
continue;
auto SURFACEAT = wlr_layer_surface_v1_surface_at(ls->layerSurface, pos.x - ls->geometry.x, pos.y - ls->geometry.y, &sCoords->x, &sCoords->y);
+ if (ls->layerSurface->current.keyboard_interactive && ls->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
+ if (!SURFACEAT)
+ SURFACEAT = ls->layerSurface->surface;
+
+ *ppLayerSurfaceFound = ls.get();
+ return SURFACEAT;
+ }
if (SURFACEAT) {
if (!pixman_region32_not_empty(&SURFACEAT->input_region)) Again, sorry for the confusion! |
I'm unsure what exactly #4401 was trying to achieve here but the above code seemed to be there to implement this: "For the top and overlay layers, the seat will always give exclusive keyboard focus to the top-most layer which has keyboard interactivity set to exclusive. If this layer contains multiple surfaces with keyboard interactivity set to exclusive, the compositor determines the one receiving keyboard events in an implementation- defined manner. In this case, no guarantee is made when this surface will receive keyboard focus (if ever)." However the check for "exclusive" was not in place. Maybe changing this to check for |
patch.txt |
The proposed solutions are bad because keyboard_interactivity should not affect pointer interactivity. So I think pointer constraints should be used instead: https://wayland.app/protocols/pointer-constraints-unstable-v1 |
To clarify: I use pointer-constraints, shortcut inhibit and keyboard focus exclusive. I expect
I'm unsure if (1) ever worked properly (see #4464) but the mentioned commit definitely broke it completely (2) was working before but now also doesn't work anymore: key codes are now send to other surfaces in addition to the layer surface even with exclusive access! So this is the position I'm currently in. |
was 2 a regression from #4401 ? |
Now that you mention it - no that seems to be yet another regression. I can bisect that tomorrow. |
would help, thanks. :) I'll try to fix that tomorrow. On holiday, you know. |
Might also be just modifier keys I'm not sure anymore. In that case it may also be that shortcut inhibit is broken. |
shortcut inhibit is not impl'd in hl. |
Are you sure? wayland-info | grep shortcut
interface: 'zwp_keyboard_shortcuts_inhibit_manager_v1', version: 1, name: 21
interface: 'hyprland_global_shortcuts_manager_v1', version: 1, name: 46 |
Ah its just a dummy implementation. |
I think (2) was broken by 307dd8f |
2 should be fixed |
I did some bisecting again and it seems like the keyboard actually always worked. So yeah, the only problem is the pointer constraints, which were broken in c4da4b0 |
please check #4889 |
Working perfectly! #4464 is also fixed :) |
closed in #4889 |
Hyprland Version
System/Version info
c4da4b0
Bug or Regression?
Regression
Description
This commit (c4da4b0) breaks pointer constraints. See feschber/lan-mouse#79
How to reproduce
Instantiate a pointer lock instance on a layershell surface -> The pointer does not get locked anymore
Crash reports, logs, images, videos
No response
The text was updated successfully, but these errors were encountered: