After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641197 - mouse events at pixel row zero are ignored
mouse events at pixel row zero are ignored
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-01 22:34 UTC by Rui Matos
Modified: 2011-03-07 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tune clutter's point_in_poly test for polys in screen coords (6.74 KB, patch)
2011-03-03 23:34 UTC, Robert Bragg
none Details | Review
tune clutter's point_in_poly test for polys in screen coords (6.37 KB, patch)
2011-03-04 00:17 UTC, Robert Bragg
none Details | Review

Description Rui Matos 2011-02-01 22:34:39 UTC
Using an external display along with the laptop with the following geometry:

+======================+-------------+
|                      |             |
|                      |             |
|                      |             |
|                      +-------------+
|                      |
+----------------------+

where '=' means the shell's panel, i.e. the bigger display is the primary one.

It happens that mouse clicks on the panel items (e.g. the clock) do not activate the items if the pointer is at row zero (y == 0). Hot corner overview activation doesn't work reliably either.
Comment 1 António Fernandes 2011-02-03 14:08:49 UTC
I have the exact same problem same problem, but I have a single display.

Hot corner is activated at row 1, instead of row zero.
Comment 2 Rui Matos 2011-02-04 20:41:20 UTC
Ok, this is NOT related to there being 2 displays.

What led me to believe so is that it doesn't happen with only the laptop's display on. But if I disable the laptop's display and only leave the external on I get the buggy behavior.

Any hints for debugging this further are very welcome.
Comment 3 Robert Bragg 2011-03-03 23:34:12 UTC
Created attachment 182422 [details] [review]
tune clutter's point_in_poly test for polys in screen coords

Ok, I was able to reproduce a similar issue outside of gnome-shell and the attached patch fixed the problem for me so it would be good to hear if that also fixes this issue too.
Comment 4 Robert Bragg 2011-03-04 00:17:40 UTC
Created attachment 182426 [details] [review]
tune clutter's point_in_poly test for polys in screen coords

reading the number of casts being done to pull a float out of a byte array, then cast to an int to pixel align (poorly) before casting back to a float was looking rather silly so this tweaked patch instead separates out the pixel alignment step and also uses the COGL_UTIL_NEARBYINT macro to pixel align to the nearest integer instead of simply flooring the floats.
Comment 5 William Jon McCann 2011-03-04 00:21:58 UTC
The patch from comment #3 fixed the problem for me.  I didn't have a chance to try the next one but I assume it will too.
Comment 6 Rui Matos 2011-03-04 09:54:36 UTC
Yup, patch from comment #4 fixes it here. Thanks
Comment 7 António Fernandes 2011-03-05 21:18:59 UTC
Patch from comment #4 fixed it for me too. Excelent!
Comment 8 Robert Bragg 2011-03-07 14:04:30 UTC
ok thanks for testing, the second patch was pushed to master as 54f85832b7fa and to the clutter-1.6 branch as 95af5bd973a3b5f