Bug 78207 - Touching tooltip activates weston desktop-shell launcher icons
Summary: Touching tooltip activates weston desktop-shell launcher icons
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium minor
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-02 21:48 UTC by Anu Reddy
Modified: 2014-05-13 23:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Anu Reddy 2014-05-02 21:48:35 UTC
Touching tool-tip in different locations causes weston desktop-shell launcher icons activate.


Steps to reproduce:
1. Launch weston
2. Hover the mouse pointer on desktop-shell launcher icons to display respective tooltip
3. Touch the tooltip. Observe launcher icons are activated and clients are being launched.


Software Stack:
wayland (HEAD) 1.4.92-0-g4a4523f
drm (HEAD) libdrm-2.4.52-0-g46d451c
mesa (HEAD) remotes/origin/10.1-0-g340ebdb
libva (HEAD) libva-1.2.1-0-g88ed1eb
intel-driver (HEAD) 1.2.2-0-g121e70d
cairo (HEAD) heads/1.12-0-g59e2a93
libinput (HEAD) remotes/origin/HEAD-0-g97af5c3
weston (HEAD) 1.4.92-0-gd7d71e8
Comment 1 U. Artie Eoff 2014-05-02 23:19:25 UTC
almost seems like a feature to me ;)... we'll see what everyone else thinks.
Comment 2 Ander Conselvan de Oliveira 2014-05-05 14:03:54 UTC
(In reply to comment #1)
> almost seems like a feature to me ;)... we'll see what everyone else thinks.

This is a bit more complicated. The tooltip is implemented as a subsurface, and the code in toytoolkit doesn't handle input from subsurfaces correctly. When a touch event for the tooltip is received, it is processed as if it were an event on the top panel. So depending on what part of the tooltip you touch, a different launcher is activated.

I sent a patch to the mailing list that solves this problem by ignoring input on the tooltip. I'll work on fixing the input handling later.
Comment 3 Pekka Paalanen 2014-05-06 05:30:10 UTC
Well, a tooltip should not be a sub-surface at all, it was never meant for that. 

Usually, overlaid sub-surfaces have their input region set to empty, which means picking goes right through to what is beneath.

However, this case is special, because the parent surface (panel) is not a xdg_shell surface, so it cannot use the normal explicit tooltip mechanism. But that is also a good thing, because it allows you to use a sub-surface for implementing panel's tooltips, and the shell plugin could know to ignore the sub-surfaces of the panel explicitly. This is what I would see as the appropriate solution, *if* you want clicks/touches on the panel tooltip to be handled or ignored instead of go through.

Note, that setting the input region to empty for a sub-surface that is used as a tooltip might not be right, as I'm not sure if a user expects the surface picking to go through the tooltip.
Comment 4 Kristian Høgsberg 2014-05-12 19:51:07 UTC
commit a57c9f1b90a14bbbd5de217f1e44bd443cd3783f
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue May 6 15:25:40 2014 +0300

    window: Ignore input events from subsurfaces
    
    Toytoolkit was not designed to handle input from subsurfaces and
    instead it expects subsurfaces to have an empty input region. That way
    input events for subsurfaces are generated on the main surface and
    there is no need to convert coordinates before reporting the event to
    the user.
    
    However it is possible that a subsurface has a non-empty input region,
    but in that case those events aren't properly processed. The function
    window_find_widget() assumes the coordinates are in the main surface
    coordinate space, and ends up chosing the wrong widget.
    
    This patch changes the input code to completely ignore input events from
    subsurfaces. This option was chosen instead of ensuring that the input
    region on those surfaces is always empty since there's no enforcement
    that a subsurface should completely overlap with the main surface. If
    an event happens in the area of the surface that doesn't overlap, the
    event could cause a completely unrelated surface to be picked.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=78207


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.