AppChooser doesn't work with mouse
janxkoci opened this issue · comments
What Happened?
It seems I cannot use mouse (touchpad) to select apps in AppChooser portal, only keyboard works (arrows up and down, then Enter).
The AppChooser portal is usually triggered when I want to open some file, e.g. after downloading it with Epiphany and clicking on it in the downloads popover, or when opening a file from archive in File Roller.
One example:
Steps to Reproduce
- Trigger the AppChooser portal (e.g. download a file with Epiphany and try to open it from popover, or open some zip archive and right-click some file inside it to "open" it);
- AppChooser opens;
- Try to select an app with mouse click.
Expected Behavior
The app is selected and I can click the "Open" button to open it. I should also be able to double-click the app in the list to directly open it (thus skipping the "Open" button).
OS Version
6.x (Odin)
Software Version
Latest release (I have run all updates)
Log Output
No response
Hardware Info
This is on a Slimbook Essential 14" laptop and its built-in touchpad.
Can confirm on OS 7
I think this is because we're adding the entire of the window as the WindowHandle, which seems to override the button press event:
portals/src/AppChooser/Dialog.vala
Lines 139 to 153 in 147ba3b
The similar issue was seen in IconBrowser and fixed in elementary/iconbrowser#21, so maybe we can fix this in the similar way too?
If I am not mistaken, window handle has above_child property inherited from Gtk.EventBox, but it would not be ideal since we cannot use it anymore when we port to GTK4. I think the fix done in iconbrowser will do.