AlynxZhou / showmethekey

Show keys you typed on screen.
https://showmethekey.alynx.one/
Apache License 2.0
329 stars 26 forks source link

Clickable Area not clickable, V1.7.1 Wayland #9

Closed ha5ch closed 2 years ago

ha5ch commented 2 years ago

Since v1.7.1 the clickable area is not clickable any more on Gnome 42 (Arch Linux, Gnome Shell 42.3, Wayland 1.21.0)

When you click on "clickable area", you click through like the output area (same for right, left and middle click).

When starting showmethekey-gtk from CLI, the following error message occurs multiple time:

(showmethekey-gtk:41018): Gtk-WARNING **: 08:55:58.002: GtkImage 0x55a159b44610 reported baselines of minimum -2147483648 and natural -2147483648, but sizes of minimum 16 and natural 16. Baselines must be inside the widget size.

v1.6.3 works as expected

AlynxZhou commented 2 years ago

Try move your cursor a little bit higher than the text. I cannot reproduce this.

What's your theme?

ha5ch commented 2 years ago

I'm afraid cursor a little above doesn't work for me. I'm using Colloid-gtk-theme but also tried with Adwaita and all extension deactivated. Same result.

AlynxZhou commented 2 years ago

How about take some screencast about your interaction and terminal output and attach it here? I am not sure why.

ha5ch commented 2 years ago

ok, will do a screencast a little later and post it here. may it help. Additional terminal output is not given atm.

AlynxZhou commented 2 years ago

Additional terminal output is not given atm.

GTK_DEBUG=all GDK_DEBUG=all G_MESSAGE_DEBUG=all showmethekey-gtk may help.

A debug build is needed.

AlynxZhou commented 2 years ago

My friend tested and says if you switched to colloid and then switch back to adwaita you'll get this error, maybe it's a theme issue. I'll try myself.

AlynxZhou commented 2 years ago

Instead of writing workaround for themes, I think it's more reasonable to let the floating window just use Adwaita. I cannot fix countless third-party themes, and the floating window is special that there are little style that can be applied on it.

AlynxZhou commented 2 years ago

Instead of writing workaround for themes, I think it's more reasonable to let the floating window just use Adwaita.

However I didn't find a way to only apply themes for one widget.

AlynxZhou commented 2 years ago

Check v1.7.2 from AUR which always GTK basic theme for floating window, it should fix this issue.

If not feel free to reopen.

AlynxZhou commented 1 year ago

Gtk 4.10 dropped GtkStyleContext, now I could only set style for a GdkDisplay (not per widget), so set basic theme for this widget is not a solution.

Some solutions I have:

  1. Add workaround in CSS for each themes, but it is hard to read every themes to see what they did for header bar. Or just don't support them.
  2. Let the whole app use basic theme, it should be fine, but ugly.
  3. Similar with 2, but just use Libadwaita, so I only need to write CSS based on the Libadwaita one, it is beautiful, but require extra code changes.