TopIcons-plus
TopIcons-plus copied to clipboard
Touch input does not work under Wayland
Hi My laptop has a touch screen, nothing happens when I touch some icon shown by topicons plus extension. My extension was installed via Gnome extensions website. I use Gnome Shell 3.24.3 under Wayland on Arch linux.
Hi, Thanks for the report. I do not own a machine with touch input, so I am in trouble for testing it. But I will see what we can do.
Hi My laptop has a touch screen, nothing happens when I touch some icon shown by topicons plus extension. My extension was installed via Gnome extensions website. I use Gnome Shell 3.24.3 under Wayland on Arch linux.
Some additions:
- Same is true for every tray extension out there;
- Right-click actually works on two very small areas, on the top and bottom of the icon;
- If you increase the Icon Size the clickable area apparently gets pushed off the screen;
- Conversely, if you decrease Icon Size, the clickable area gets bigger.
Based on what I've tried, I'd guess there is a clickable "area" that is being covered by the icon, plus clicking on the icon has no effect.
@phocean I can send a PR with a fix if you give me some info (1 - Which tests I should include, 1 - How to test/use it on my machine as I work on it, and 3 - some pointers to the main files containing code that deals with clicks and with rendering the icon).
edit: Just found a quick, easy and kinda hack-ish fix:
iconContainer.connect('button-release-event', function(actor, event) {
icon.click(event);
});
// Hack-ish fix to make icon clickable
icon.connect('button-release-event', function(actor, event) {
icon.click(event);
});
// hack-ish fix for touch events
iconContainer.connect('touch-event', function(actor, event) {
icon.click(event);
});
icon.connect('touch-event', function(actor, event) {
icon.click(event);
});
Refactoring would be better, but I decided this is good enough for me:
[iconContainer, icon].forEach(function(clickableElement){
['button-release-event', 'touch-event'].forEach(function(eventName){
clickableElement.connect(eventName, function(actor, event) {
icon.click(event);
});
});
});
@frnco Thank you for the proposals, and sorry for the delay in my response.
It seems very interesting, but I still do not have any device to test it. Ideally, I would like that a few people review it and confirm it works on touch screens.
For the rest, I would just make sure that it still works as expected on standard configurations.
So yes, if it's still possible, I would love a pull request.