Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
2.05k stars 106 forks source link

Touch Input Inconsistencies / Support #188

Open nine7nine opened 9 months ago

nine7nine commented 9 months ago

Touch Input is very inconsistent with AGS.

I'm not sure what the solution is here, if there is a way to wrap or mask touch inputs or something like that. -- or if maybe this is a hyprland issue, in part... but it's mildly annoying ;-)

It'd be nice to know if this is a Hyprland or AGS issue though.

Aylur commented 9 months ago

I would move this issue to my dotfiles, because this sounds like an issue with how I made my setup (assuming you do use it), but I will leave this here as I am not sure if this is from how the Window.popup property works. I don't have a device with touchscreen, so I can't test it, but how does this behave?

import Widget from 'resource:///com/github/Aylur/ags/widget.js';

const win = Widget.Window({
    name: 'test',
    popup: true,
    visible: true,
    focusable: true,
    child: Widget.Label({
        label: 'tap away',
    }),
    connections: [['button-press-event', (self) => {
        print(self.get_pointer());
    }]],
});

export default { windows: [win] }
nine7nine commented 9 months ago

Thanks for the response, Aylur.

I'll give this a try later on, when I'm in front of my machine.

Yes, my dotfiles are based on yours - but i had assumed that AGS itself may have required some touch related stuff. but you very well could be right, that it's purely an issue with lacking this support in your dotfiles...

interestingly, the Dock does work fine - if i'm on a empty desktop and the dock is showing, but i touch elsewhere, the dock does hide... So it really just seems to be TopBar & PopUp related.

Aylur commented 9 months ago

hmm, the dock shouldn't hide on click away, if the workspace is empty, only if you hover over it and leave the cursor. I don't know how touch input is handled in Gtk3 or Hyprland, so not sure where the issue is

nine7nine commented 9 months ago

Well, I would suppose that clicking touch input after being focused on the dock does move the cursor - so that is likely why it hides... but yes, from what i gather touch is a bit weird in gtk3 and also in Hyprland... I think gtk4 handles touch better, IIRC... and Hyprland still has some issues / work to be done to better support tablets, touch devices and Stylus.

That all said: I have been successful at switching over to Wayland: using AGS and Hyprland, most of the remaining quirks/issues are fairly minor... I even managed OSK (Onscreen Keyboard) integration with my AGS shell (via a revealer widget)... It's all pretty awesome... ~ Largely possible due to AGS/your dotfiles, as I'm not sure I would've been as inclined to cook up something with EWW - and Gnome aside, basically all of the other Wayland-based DE/WMs that I tried had issues to some extent or another.

Aylur commented 9 months ago

Gtk4 will solve most issues yeah, in gtk3 touch events are a special thing you have to add on top, while in gtk4 its supported just like mouse and keyboard events