Open karliss opened 3 years ago
Verified that the problem doesn't happen when logging in using X instead of Wayland
While searching for other GTK programs using GtkEntryCompletion on github I found this https://github.com/polter-rnd/gtk3-patched/blob/d99710dc05d611e78bf7f6e56f0ee561350ecd42/Fix-GtkEntryCompletion.patch so it might be a known GTK bug.
The corresponding custom position calculation code got removed during 3.9x development https://github.com/GNOME/gtk/commit/0cc94ed72e62f2e09d556d912ef5b4550f3c70ef
I can still reproduce this problem on Ubuntu 22.10 with gnome 43.1 and the hamster flatpak built on git master.
Just wondering, so is it a gtk issue or an issue with the hamster app?
I can confirm the issue on Plasma 6 with Wayland. I did not have this issue on Plasma 5 with X11.
I tried reproducing the issue with gtk-demo
, but I was not able to reproduce. Especially the demo “Combo boxes” works fine for me.
Especially the demo “Combo boxes” works fine for me.
It's not a dropdown menu/combo box. It looks similar to one but it's an input field+ GtkEntryCompletion https://developer-old.gnome.org/gtk3/stable/GtkEntryCompletion.html . At least that's how it was when I looked at the hamster code 4 years ago. Entry/Entry completion from the gtk-demo is probably more representative of the problematic widget.
Tried searching for other gtk programs using it again https://github.com/search?q=gtk_entry_completion_set_popup_completion+TRUE&type=code . Was also able to repeat it in Geany/File Browser plugin and gtk3-demo . So It's probably a GTK bug.
Tried gtk4-demo/Entry/Entry completion that one wasn't affected by the bug. So maybe fixed in gtk4.
gtk3-demo:
gtk4-demo:
In a multi monitor setup suggestions for activity and category fields are positioned incorrectly. Depending on how bad it is it may be so far that it's not visible at all.
Problem happens on all the monitors except the leftmost one. In the configuration bellow thats 2 and 3.![Screenshot from 2020-12-11 21-20-39](https://user-images.githubusercontent.com/7101031/101946462-a9ffb300-3bf7-11eb-8014-b8de61ef4aad.png)
If I change the layout so that 2 is leftmost one, position is wrong on monitors 1 and 3.
I looked at the code and it seems that category and activity fields are using more or less standard GtkEntry and GtkEntryCompletion and the popup part is created by GtkEntryCompletion. In other instances of wayland popup issues like #652 popups were incorrectly created by Hamster code, in this case it might be a GTK issue. This theory could be tested by checking what happens with other GTK programs using GtkEntryCompletion.
Test environment: