hamster icon indicating copy to clipboard operation
hamster copied to clipboard

Category and activity suggestions are misplaced

Open karliss opened this issue 5 years ago • 7 comments

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.

hamster_category

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

If I change the layout so that 2 is leftmost one, position is wrong on monitors 1 and 3.

Screenshot from 2020-12-11 21-21-40

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:

  • ArchLinux
  • Gnome 3.24 with Wayland
  • Hamster 3.02 (also observed when running Hamster from master at the time of reporting)

karliss avatar Dec 11 '20 19:12 karliss

Verified that the problem doesn't happen when logging in using X instead of Wayland

karliss avatar Dec 11 '20 19:12 karliss

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.

karliss avatar Dec 11 '20 19:12 karliss

The corresponding custom position calculation code got removed during 3.9x development https://github.com/GNOME/gtk/commit/0cc94ed72e62f2e09d556d912ef5b4550f3c70ef

karliss avatar Dec 11 '20 20:12 karliss

I can still reproduce this problem on Ubuntu 22.10 with gnome 43.1 and the hamster flatpak built on git master.

matthijskooijman avatar Apr 29 '23 18:04 matthijskooijman

Just wondering, so is it a gtk issue or an issue with the hamster app?

InRiPa avatar Nov 10 '23 08:11 InRiPa

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.

Flupp avatar Apr 29 '24 09:04 Flupp

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: gtk3-demo gtk4-demo: gtk4-demo

karliss avatar May 01 '24 19:05 karliss