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
18.58k stars 772 forks source link

Wrong menubar entry activated on click for XWayland apps if fractional scaling is used but XWayland scale is disabled #5144

Open M4he opened 4 months ago

M4he commented 4 months ago

Hyprland Version

System/Version info Hyprland: git e68c07d8096ee5f83e29508c8762279ab80a924b via [official NixOS Flake](https://github.com/hyprwm/hyprland-wiki/blob/27b9014e80ff216327c7a8cdec2a6ac638a31162/pages/Nix/Hyprland%20on%20NixOS.md?plain=1#L78-L93) System: - OS: NixOS 23.11 (Tapir) - GPU: Intel CometLake-U GT2 UHD Graphics

Bug or Regression?

Bug

Description

I'm using

xwayland {
    force_zero_scaling = true
}

and a fractional screen scaling of 1.25.

When I use an XWayland application such as GIMP or Krita, clicking menubar items will often activate an item to the left instead until I move the cursor. It seems like the mouse click event coordinates are not correctly calculated when XWayland scaling is turned off but fractional scaling is turned on.

It only seems to affect menubars as other elements of the UI of those applications react just fine.

How to reproduce

  1. Set xwayland { force_zero_scaling = true } in hyprland.conf.
  2. Apply a fractional screen scale, e.g. monitor=,preferred,auto,1.25.
  3. Open an XWayland application, e.g. GIMP or Krita.
  4. In the topmost menubar of the window click on menus that are located more to the right side (not the first ones).
  5. Do not move the cursor while or after clicking.
  6. Menus to the left of the click event will be activated instead.

Crash reports, logs, images, videos

Menus in Krita:

krita_menus.webm

hdm9527 commented 3 months ago

Same problem, the idea window can only be enlarged, not reduced.

dnvery commented 2 months ago

Has anyone managed to make a patch to fix it?

phoeshow commented 2 months ago

same problem ,when I use gimp and click menu. the selection jump to previous one always.