wbolster / nothing-to-say

gnome shell extension to only unmute the microphone when you have something to say
GNU General Public License v2.0
247 stars 22 forks source link

Panel button does not work with touchscreen input #44

Open sado1 opened 2 years ago

sado1 commented 2 years ago

Hello. I'm running Fedora 35, Gnome 41 - I was glad to see this plugin, as it's really cool for my usecase (convertible laptop with touch input, combined with inability to use push-to-talk in TeamSpeak on Wayland). But it seems that I can only click the panel button to enable/disable microphone (using touchpad). Touching the button via touchscreen has no effect, other than the long press turns the button's background to grey. Could you please try to make the touch input work as well? If any more information would be helpful, please let me know.

wbolster commented 2 years ago

i agree this would be useful but tbh i have no idea what the technical solution is to make this work.

sado1 commented 2 years ago

When I changed: this.connect("button-press-event", () => { to this.connect("touch-event", () => { it somewhat works. You need to move your finger constantly, then it keeps working as 'hold to talk', if you stop your finger, sometimes the extension thinks, that the button is being constantly being enabled and disabled in a loop.

I have little understanding of how Gnome extensions work, but after looking at the docs, I guess that the touch event emits the signal for multiple actions, which is not what we want here. We only want to detect initially touching the button - and, if we want to have a push-to-talk option - when we stop touching it, too.

I'll be glad for any hints, I imagine you don't have access to hardware with Gnome and touchscreen, I can take a look at fixing this.

BenignBeppe commented 2 years ago

I did a quick test on my touch screen and it works just like clicking. This is on Ubuntu 20.04.

wbolster commented 2 years ago

do you mean the current button-press-event works for you, @BenignBeppe?

BenignBeppe commented 2 years ago

Yes. Maybe there is some difference in implementation with touch, so for me it works exactly like a mouse click, but that not always being the case?