You are not logged in.
Hello,
I've been experiencing an issue with apps using gtk3 where the number of clicks required for context menus and their items varies between 1, 2, 3, or 4 clicks instead of just one. This problem doesn't occur with QT apps or gtk2 apps(I only tested gimp), and I've even tested it with a different mouse.
I'm currently using hyprland on arch with an AMD graphic card, and the issue persists even when I switch to sway.
Additionally, I attempted to reset the gtk settings and using the X11 gtk backend, but the problem persists.
If someone would have an idea on how to fix this, I would be happy, thanks.
Here's a video with sound showing the bug, the top right is pcmanfm-qt and other apps are gtk3 (Problem also happen with firefox since it uses gtk) :
https://drive.google.com/file/d/1xkg302 … tJySj/view
Last edited by kyuzial (2023-11-04 16:42:57)
Offline
Does it help to "export GDK_CORE_DEVICE_EVENTS=1"?
Offline
Does it help to "export GDK_CORE_DEVICE_EVENTS=1"?
Thanks for you reply, I tried setting it in a terminal and launching apps but no it doesn't change anything. (Do I need to set the variable for the whole environment or is the way I used okay ? )
Offline
You need to export it to the disfunctional client, ie.
GDK_CORE_DEVICE_EVENTS=1 gtk3-demo
would fix gtk3-demo - if this was related.
Offline
I tried exporting the variable to mousepad and thunar and I have the same behavior.
Offline
Sanity check: does it also happen in an openbox (X11) session?
Offline
Sanity check: does it also happen in an openbox (X11) session?
The behavior seems to be better. When I click slowly (waiting half a second after the menu is shown), there's no issue. However, when I click quickly, it's the same as when using Wayland.
Using X11 it's mostly improved, at least it's not entirely random but I don't really want to use X11.
I also tried on my laptop (intel graphics) having almost the same hyprland setup and I have the same issue.
Offline
Using X11 it's mostly improved, at least it's not entirely random but I don't really want to use X11.
The point of that excercise was/is to narrow down on the inhibitor.
If you don't click multiple times in hyprland but just wait (maybe longer than on openbox, 25+ seconds), does that have the same effect?
However, I just checked the video - is this only about the main menu entries toggling the popup?
Cause that's (openbox behavior, like 500ms delay or so) is perfectly normal (for gtk3) - there's some cooldown phase and I don't remember it every being any different.
Offline
If you don't click multiple times in hyprland but just wait (maybe longer than on openbox, 25+ seconds), does that have the same effect?
When waiting longer, I still have the bug.
However, I just checked the video - is this only about the main menu entries toggling the popup?
It relates to both the main menu entries toggling the popup and the behavior within popups, I can experience the same behavior when clicking on entries.
This issue also occurs with the context menu when right-clicking, making it particularly annoying. When I click on an entry, nothing happens, requiring me to right-click again and select the entry to perform the action.
It seems to be a bug of gtk on wayland, since it doesn't happen on xwayland or xorg.
(I can make a video to show that if my explanation is not clear enough)
Offline
https://bbs.archlinux.org/viewtopic.php?id=279586 - "fixed", but your situation isn't /that/ bad.
Does it work "properly" w/ weston?
Offline
My issue is quite bad, having to open the right click menu multiple time because I can't click on an item is really annoying, on firefox when clicking on an entry, the popup doesn't disappear but I have to click multiple times(happen for select all option with text for example)
I tried using weston and kde and it seems to fix the issue, I guess it's a bug with wlroots since I have this issue on both sway and hyprland. Thanks for you help.
Offline
This is a late bump of this thread, but this is definitely a Gtk/GDK issue. I see the same on openSUSE. I don't use a desktop much on Arch, just servers. I can confirm that with apps like gnome-sudoku, clicking on the app the first time does nothing. Clicking a second time is required to get the app to recognize input. Then it behaves fine. This is on an X11 setup.
I do have to GDK_CORE_DEVICE_EVENTS=1 for Firefox and Thunderbird to allow middle-mouse scroll to work with the mouse set to "focus-follows-mouse". Otherwise the middle-mouse-scroll has no effect when Firefox or Thunderbird are not brought to the front as the top-level windows. Exporting GDK_CORE_DEVICE_EVENTS=1 solves the middle-mouse-scroll when other windows overlap Firefox or Thunderbird, but makes no difference with the gnome-sudoku not recognizing the mouse-click issue.
There are about a dozen bugs over the last 8 years or so this could be a regression of with GDK not being able to identify the correct window the mouse-event belongs to, and in that case simply discards the input. I have no firm answer yet on which bug or which regression this could be, but have a couple of bugs open on the Firefox/Thunderbird issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1907708 and https://bugzilla.mozilla.org/show_bug.cgi?id=1359226 and https://bugzilla.opensuse.org/show_bug.cgi?id=1230424
I hope a solution is found, this is a frustrating issue in Gtk apps for users not running gnome.
David C. Rankin, J.D.,P.E.
Offline