Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch Input Inconsistencies / Support #188

Closed
nine7nine opened this issue Nov 25, 2023 · 5 comments
Closed

Touch Input Inconsistencies / Support #188

nine7nine opened this issue Nov 25, 2023 · 5 comments

Comments

@nine7nine
Copy link

nine7nine commented Nov 25, 2023

Touch Input is very inconsistent with AGS.

  • For example, I can touch a button in the TopBar to reveal a widget, but once the widget is revealed I can't unfocus with a click / hide it with touch input... mouse clicks allow me to click away focus: resulting in the widget disappearing. (eg: with Date/Dashboard, QuickSettings, etc).

  • the same is true of clicking a button in the TopBar: with mouse clicks, the second time clicked will hide the widget, but with touch input - it does nothing.

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
Copy link
Owner

Aylur commented Nov 26, 2023

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
Copy link
Author

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
Copy link
Owner

Aylur commented Nov 26, 2023

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
Copy link
Author

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
Copy link
Owner

Aylur commented Nov 26, 2023

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

@Aylur Aylur mentioned this issue Sep 25, 2024
Merged
@Aylur Aylur closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants