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.13k stars 884 forks source link

wvkbd #7135

Closed cjuniorfox closed 1 month ago

cjuniorfox commented 2 months ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759 (props: bump version to 0.39.1). Date: Tue Apr 16 16:01:03 2024 Tag: v0.39.1, commits: 4460 flags: (if any) System Information: System name: Linux Node name: zentac Release: 6.9.11-200.fc40.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Thu Jul 25 18:17:34 UTC 2024 GPU information: 09:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME="Fedora Linux" VERSION="40.20240801.0 (Forty)" ID=fedora VERSION_ID=40 VERSION_CODENAME="" PLATFORM_ID="platform:f40" PRETTY_NAME="Fedora Linux 40.20240801.0 (Forty)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:40" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=40 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=40 SUPPORT_END=2025-05-13 OSTREE_VERSION='40.20240801.0' plugins: ```

Description

When using the on-screen keyboard made for wlroots compositor wvkbd-mobintl, and the Sup key is pressed on the on-screen keyboard, the keyboard layout freezes and I cannot press any key or release the Sup key. The problem seems that while the Sup key is pressed, the mouse pointer click is used to drag the windows instead of interacting with them, making this on-screen keyboard unusable. I have almost certainly that the issue because disabling the drag-window rule from hyprctl.conf makes the on-screen keyboard go back to respond to keypresses after pressing the Sup key. I also was unable to see the on-screen keyboard on hyprctl clients list. Also, placing the mouse over the on-screen keyboard does not change the focused Window. So I believe that this kind of application is part of some wlroots-related special window class that I don't understand. My suggestion is to disable the "draw window" feature when the mouse is over the on-screen keyboard.

How to reproduce

To test it, you will need to install wvkbd. On Fedora 40, You need to build from scratch as follows:

sudo dnf install wget unzip cairo-devel pango-devel libxkbcommon-devel wlroots-devel wayland-devel @development-tools
wget https://github.com/jjsullivan5196/wvkbd/archive/refs/tags/v0.15.zip
unzip v0.15.zip
cd wvkbd-0.15/
make
./wvkbd-mobintl

OBS: Make sure that the bindm = $mainMod, mouse:272, movewindow is enabled on hyprctl.conf

  1. Click on the Keyboard icon at the bottom-left side of the on-screen keyboard.
  2. Click on the Sup key.
  3. Try to click on any other key on the on-screen keyboard. No presses work anymore.

Disable the aftermentioned bind and try the steps again. The on-screen keyboard works as intended.

Crash reports, logs, images, videos

There's no crash to be reported.

MightyPlaza commented 2 months ago

can you try on -git?

cjuniorfox commented 2 months ago
$ hyprctl systeminfo
Hyprland, built from branch main at commit ab0a3268e04f2295ec4455be90ce8d0c2b107b8d  ().
Date: Thu Aug 01 01:43:13 2024
Tag: , commits: 5040

flags: (if any)

System Information:
System name: Linux
Node name: zentac
Release: 6.9.12-200.fc40.x86_64
Version: #1 SMP PREEMPT_DYNAMIC Sat Jul 27 15:56:15 UTC 2024

GPU information: 
09:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller])

os-release: NAME="Fedora Linux"
VERSION="40 (Forty)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (Forty)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13

plugins:

The behavior persists.

ikalco commented 2 months ago

I think the problem is that you have something like bindm = SUPER, mouse:272, movewindow and the mouse press is consumed by Hyprland, so the keyboard never gets the mouse input

to get around that you can do below bindmn = SUPER, mouse:272, movewindow

n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.

cjuniorfox commented 2 months ago

Worked, but not in an ideal way. Interacting with the window's contents when dragging those windows around could cause unintended interactions that can harm the overall experience. So, It's a workaround, but does not fix the issue. From my point of view, the ideal way to fix it could be to disable the interaction for the area where this special kind of element is present.

cjuniorfox commented 2 months ago

image Here is an example. I just tried to drag the Firefox window by pressing the Sup key and the dragging action interacted with the content, making me select the text unintendedly