nwg-piotr / nwg-dock-hyprland

GTK3-based dock for Hyprland
MIT License
137 stars 12 forks source link

Can not switch to app with multiple instances with touch #38

Open ForgotMyPasswd opened 2 weeks ago

ForgotMyPasswd commented 2 weeks ago

Describe the bug If an app has multiple windows or instances of that app, such as two instances of the kitty terminal emulator, the popup to select which of these instances to select appears. However, this menu can't be tapped on and can only be interacted with using a mouse which is inconvenient for 2 in 1 laptop users.

To Reproduce Steps to reproduce the behavior:

  1. Open two sessions of any app
  2. Tap on the grouped icon
  3. Tap on one of the windows that appear in the pop up

Expected behavior Switch to the window that is tapped from this pop up

Desktop (please complete the following information):

nwg-piotr commented 2 weeks ago

I have no touch screen device to play with. Which touch event would you like me to connect?

ForgotMyPasswd commented 2 weeks ago

I can't offer much guidance since I'm unfamiliar with how GTK handles touch events, though from a brief look at the documentation GDK_TOUCH_END appears to be the event that should be used. Ideally I would like to tap on a program as usual, and be able to tap on a specific instance, such as an instance of kitty running pacman instead of one running htop, in the pop up that appears when there are multiple instances. Apologies if my guess was incorrect. (edited for clarity)

nwg-piotr commented 2 weeks ago

Well, we seem not to have much options. The GDK_TOUCH_END event fires together with button release, so it's not a solution. Probably a long press would do the job, but we have no such event in GTK3. We would need a timer between Gdk.EventType.TOUCH_BEGIN and Gdk.EventType.TOUCH_END. It would be much easier if I had a device to test stuff on.