Bug 24408 - No mouse events in Clutter-based applications.
Summary: No mouse events in Clutter-based applications.
Status: RESOLVED WORKSFORME
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R600 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-08 15:24 UTC by Alexandre Mazari
Modified: 2011-01-20 11:55 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Alexandre Mazari 2009-10-08 15:24:28 UTC
Clutter-based applications do not receive mouse events.
"glReadPixels" is used by Clutter to identify the currently clicked Actor for whatever reason.
It seems the implementation of glReadPixels for r600 is wrong somewhere.
Comment 1 Alexandre Mazari 2009-10-15 06:08:51 UTC
Symptom : 
Clutter-based applications aren't able to handle mouse clicks. For example, gnome-shell overview isn't rendered when clicking the "Activities" button.

Probable reason :
Clutter scenes are composed of actors throwing events when clicked. The Clutter core uses a kind of multicolor mask where each actor has a different color to pick the currently clicked Actor.
Thus, it reads the color value at the clicked spot and match it with the related actor.  This step is called "picking". An event is then raised to the client code to notify a click on the particular actor.
Current Clutter implementation uses glReadPixels to get the color value (see clutter-main.c:523) :

glReadPixels (x, viewport[3] - y -1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);

Owen Taylor tends to think that the implementation of glReadPixels in the r600 mesa driver behaves incorrectly and needs fixing.
Comment 2 Florian Scandella 2010-01-16 11:37:46 UTC
for me, it worked once (tried last before new years) .. now its very flakey(aka most of the time it works, but sometime it does not) and i get lots of clutter warnings like:

(mutter:26391): Clutter-WARNING **: The required ID of 986895 does not refer to an existing actor; this usually implies that the pick() of an actor is not correctly implemented or that there is an error in the glReadPixels() implementation of the GL driver.

rv770, using mesa master (no gallium, with kms), clutter 1.0.8.
Comment 3 Alex Deucher 2011-01-20 10:08:27 UTC
Is this still an issue with mesa 7.10 or git master?
Comment 4 Alexandre Mazari 2011-01-20 11:55:27 UTC
Works here for a while now (rawhide's Clutter and mesa).


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.