Fix touchscreen click events for panel applets#470
Conversation
Add synthetic click generation when touch up occurs quickly after touch down. This addresses the issue where touchscreen taps show hover effects but don't trigger click events on panel applets. - Add TOUCH_CLICK_TIMEOUT_MS constant (200ms) for touch-to-click conversion - Import ButtonEvent and ButtonState from smithay for synthetic clicks - In touch up handler, check time difference from touch down - Generate synthetic button press/release events when within timeout - Preserve existing touch event handling Fixes touchscreen interaction with COSMIC panel applets.
|
I don't think we should ever generate a pointer event from a touch event. We should just be passing touch events through to the applet, then the applet is responsible for interpreting it. In #425 (comment), I commented that the way |
Yes , it is the same issue I was trying to fix. |
I agree with the general idea. Anyway, just throwing in my 2 cents. I was also about to open an issue to track progress on this, but seems like there already is one, so tagging it here: #451 |
Description
This PR fixes the issue where touchscreen taps on COSMIC panel applets show hover effects but don't trigger click events.
Problem
Currently, when using a touchscreen to tap on panel applets:
Solution
The fix adds synthetic click generation in the touch up handler when:
Changes
TOUCH_CLICK_TIMEOUT_MSconstant (200ms) for touch-to-click conversionButtonEventandButtonStatefrom smithay for synthetic click generationTesting
Compiled and tested on Pop!_OS 24.04 LTS with COSMIC DE. The fix enables proper touchscreen interaction with all panel applets.
Environment
175924951924.04~b23a2dfFixes touchscreen interaction issues reported in COSMIC panel usage.