hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.09k stars 882 forks source link

Mouse passthrough for animation #8093

Closed keksc closed 1 week ago

keksc commented 1 week ago

Description

Hey there !! I am a shader enjoyer and made a shader animation to complete my hyprland setup, what i want is: when i press a keybind hyprland will launch my program that will open a window which will display a short shader animation. I already added these flags to the window: windowrulev2 = opacity 0.20 0.20, title:^(animation)$ windowrulev2 = float, title:^(animation)$ but my mouse is getting locked by the animation window which is on top of everything. Furthermore, I use Vulkan and GLFW for this app and i met a problem: GLFW_MOUSE_PASSTHROUGH(https://www.glfw.org/docs/3.4/window_guide.html#GLFW_MOUSE_PASSTHROUGH_hint) doesnt work on wayland, and on Vulkan only the VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR and VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR flags are available out of these 4: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkCompositeAlphaFlagBitsKHR.html, so the only way to achieve transparency is to use the hyprland config (so I cant have non-transparent shapes and a fully transparent background, everything has to be a little transparent which restricts some features that I used to have under Windows). So basically the feature request is a window rule to pass all input that goes into a window to the underlying, pretty much what GLFW_MOUSE_PASSTHROUGH does, and occasionnaly to add support for transparent framebuffers. Thanks, btw i love how easy hyprland is and how its not messy compared to an i3wm setup

vaxerski commented 1 week ago

No, this is already doable with wayland protocols. See https://wayland.app/protocols/wayland#wl_surface:request:set_input_region for ignoring input and https://wayland.app/protocols/alpha-modifier-v1 for transparency

keksc commented 1 week ago

Ok thank you, you responded very quickly