swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.56k stars 1.11k forks source link

GTK-3 menus opens the leftmost menu item no matter which item is clicked if touchinput device is present #7391

Open maribu opened 1 year ago

maribu commented 1 year ago

Please fill out the following:

screen recording

maribu commented 1 year ago

Note: I think this issue does not affect my machine with an Intel GPU, but it does affect two different machines with AMD GPUs.

kennylevinsen commented 1 year ago

Note: I think this issue does not affect my machine with an Intel GPU, but it does affect two different machines with AMD GPUs.

This kind of behavior should not be GPU dependent. Differences in the install or the output configuration are more likely to be the cause.

bigrand commented 1 year ago

This also happens to me. It occurs with Thunar File Manager.

bl4ckb0ne commented 1 year ago

Does it also occur with GTK4?

maribu commented 1 year ago

The first time I open a menu with GTK4 I see visual "glitches" for half a second and this warning is printed on the terminal:

(gtk4-demo-application:17313): Gdk-WARNING **: 17:45:36.181: Compositor doesn't support moving popups, relying on remapping

Afterwards the GTK4 no longer tries using moving popups and the menu opens right away. Both the first time a menu is opened (with visual glitches) and subsequently the correct menu opens. So the issue seems to not affect GTK4.

There is one other curious behavior that may be related: For a split of second or so the first item in the menu is highlighted (as if my cursor would be hovering over it). Afterwards the highlight moves back to the menu. So there may also be something causing GTK4 to misinterpret the cursor position of a split of a second right after the click.

ruabmbua commented 1 year ago

I have seen this behavior exclusively in virt-manager when running in sway. Does not happen with gnome.

Checking virt-manager, seems to be a gtk3 app.

c0001 commented 1 year ago

This bug also appears when using firefox thru wayland via sway's wlroots implementation, and seems its a wlroots bug but has never been watched out yet.

wwaleszcz commented 1 year ago

This bug also happened to me. It appears in gtk3 applications such as Thunar and Xournalpp. It didn't occure in Nautilus, which is I believe gtk4 app. I use a 2 in 1 convertable lenovo yoga, and when I use the stylus instead of the mouse pointer the menus open normally. I noticed the bug only on this device on every distribution I tried (Arch and Fedora). It occured both sway and hyprland, so its probalby a wlroots bug.

c4rlo commented 1 year ago

I'm experiencing this issue also (and have done for a long time). Arch Linux, sway 1.8.1, wlroots 0.16.2, Gtk 3.24.38, Intel GPU. I'm seeing it with Gtk3 apps like Mousepad and LibreOffice, but not Gtk4 apps like Transmission-gtk.

Interestingly, I also don't see the issue with Firefox or Thunderbird, even though they are Gtk3 apps (and I'm not running them through XWayland).

wwaleszcz commented 12 months ago

I tried running sway on multiple devices and this problem happened only on devices with touchscreens.

maribu commented 11 months ago

Ah, I originally throught the GPU in use had something to do with it. My two affected machines have both an AMD GPU and, crucially, also a touchscreen. The unaffected machine has an Intel GPU, and crucially, no touchscreen.

I think the touchscreen presence indeed is triggering the issue.

ruabmbua commented 11 months ago

No touchscreen on my desktop, but I have a wacom drawing pen tablet thing plugged in all the time. This would not be the first issue caused by it on sway ^^.

wentasah commented 9 months ago

I experience the issue as well and I also have a Wacom tablet. When unplugging the tablet, the issue disappears. After plugging it again, the issue is back.

ruabmbua commented 9 months ago

Forgot to mention, unplugging the tablet fixes the problem for me as well.

wentasah commented 7 months ago

Still present in Sway 1.9.0.

6b6279 commented 2 months ago

Seems to only occur when a touchscreen-like device is connected. I had this issue for months, sporadically, but I always have my graphic tablet connected to my PC; right after plugging it off, the problem was resolved. Should perhaps rename the issue. Related issue on GTK3 upstream? https://gitlab.gnome.org/GNOME/gtk/-/issues/3116