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 673644 - Scroll not working in document overview
Scroll not working in document overview
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: x11
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-06 13:24 UTC by Sander
Modified: 2012-05-28 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xi2: fix thinko in variable type (868 bytes, patch)
2012-04-20 21:42 UTC, Cosimo Cecchi
committed Details | Review
xi2: ignore non-core events for smooth scroll (3.32 KB, patch)
2012-04-20 21:42 UTC, Cosimo Cecchi
committed Details | Review
device-manager: don't select events for disabled devices (1.01 KB, patch)
2012-04-24 00:07 UTC, Cosimo Cecchi
reviewed Details | Review
device-manager: don't select events for disabled devices (1013 bytes, patch)
2012-04-24 14:34 UTC, Cosimo Cecchi
committed Details | Review
device-manager: select/unselect device events as device change (5.28 KB, patch)
2012-04-24 14:34 UTC, Cosimo Cecchi
committed Details | Review

Description Sander 2012-04-06 13:24:57 UTC
When I'm in the document overview in Gnome-Documents, the mouse scrollwheel (or touchpad scroll) doesn't react. I have to drag the scroobar to scroll.

When I open a document. I'm able to scroll with the wheel.

I'm using the latest Gnome 3.4, fully upgraded from the Arch Testing repo: https://www.archlinux.org/packages/testing/i686/gnome-documents/
Comment 1 Žygimantas Beručka 2012-04-20 11:40:25 UTC
Is anyone going to look into this? This application is just a piece of crap while this is not fixed.

It has also been reported on Launchpad https://bugs.launchpad.net/ubuntu/+source/gnome-documents/+bug/973796
Comment 2 Cosimo Cecchi 2012-04-20 14:37:35 UTC
Just to be clear, this is not a gnome-documents bug, but a regression in Clutter or GTK+; I haven't been able to track down the actual bug yet.
Comment 3 Sander 2012-04-20 20:13:30 UTC
Strange, I didn't expect it would be a GTK+ or Clutter issue, as I haven't seen other apps with the same problem, and I don't have the problem when I open a document.
Comment 4 Cosimo Cecchi 2012-04-20 21:36:29 UTC
-> gtk+

This seems like a bug in the XI2 event handling code; attaching a patch for GDK that fixes this issue.
Comment 5 Cosimo Cecchi 2012-04-20 21:42:36 UTC
Created attachment 212460 [details] [review]
xi2: fix thinko in variable type
Comment 6 Cosimo Cecchi 2012-04-20 21:42:43 UTC
Created attachment 212461 [details] [review]
xi2: ignore non-core events for smooth scroll

Since the event will be ignored anyway after it's translated (non-core
devices are disabled), don't let it run in the smooth scroll code path,
as it will burn our caches for the actual event we're interested in.
Comment 7 Matthias Clasen 2012-04-21 16:03:55 UTC
Review of attachment 212460 [details] [review]:

ugh
ack
Comment 8 Matthias Clasen 2012-04-21 16:06:52 UTC
Review of attachment 212461 [details] [review]:

The commit message should talk about slave devices, not 'non-core'.
Other than that, the reasoning makes sense to me, but it would be good to get garnacho's review.
Comment 9 Carlos Garnacho 2012-04-21 16:38:45 UTC
It sounds like an X bug if it's sending events with deviceid=sourceid=slave and the window doesn't listen to events for that slave device specifically. 

The patch looks mostly good, the only shortcoming I can see is that if events are enabled for the touchpad slave device it would get no scroll events at all, but that should be a really uncommon thing to do. Finding a good place to reset the delta to serve for 2 events sounds also tricky...
Comment 10 Matthias Clasen 2012-04-22 17:11:59 UTC
Committed these now, with some extra logging. I'll talk to whot about the questionable extra events we're seeing here.
Comment 11 Peter Hutterer 2012-04-23 23:22:49 UTC
I see XISelectEvents requests come in for all devices except the XIAllDevices fake device. So the mask is definitely set for that device. That's why you get the event twice. Is this a runaway loop or so on the client that sets all masks?
Comment 12 Cosimo Cecchi 2012-04-24 00:07:19 UTC
-> clutter

Turns out this might be a clutter bug after all; proposed patch attached. This fixes the bug for me without the workaround in GTK.
Comment 13 Cosimo Cecchi 2012-04-24 00:07:33 UTC
Created attachment 212646 [details] [review]
device-manager: don't select events for disabled devices

I.e. only select events for core devices or devices explicitly enabled
by clients.
Comment 14 Emmanuele Bassi (:ebassi) 2012-04-24 08:33:20 UTC
Review of attachment 212646 [details] [review]:

looks good, though you can use device->is_enabled from within clutter-device-manager.c as well.

we should also select events when a device becomes enabled.
Comment 15 Cosimo Cecchi 2012-04-24 14:34:05 UTC
Created attachment 212708 [details] [review]
device-manager: don't select events for disabled devices

Use device->is_enabled
Comment 16 Cosimo Cecchi 2012-04-24 14:34:12 UTC
Created attachment 212709 [details] [review]
device-manager: select/unselect device events as device change

When a device is added or changes, select/unselect events from X
accordingly.
Comment 17 Emmanuele Bassi (:ebassi) 2012-04-24 17:33:00 UTC
Review of attachment 212708 [details] [review]:

looks good
Comment 18 Emmanuele Bassi (:ebassi) 2012-04-24 17:34:08 UTC
Review of attachment 212709 [details] [review]:

looks good to me
Comment 19 Matthias Clasen 2012-04-24 18:01:35 UTC
So, should we revert the gdk workaround then ?
Any opinion ?
Comment 20 Sander 2012-04-24 18:10:17 UTC
I just noticed that I can't scoll inside Nautilus either. Can someone confirm that, and check if the discussed patches fix that issue too?
Comment 21 Cosimo Cecchi 2012-04-24 22:51:19 UTC
(In reply to comment #19)
> So, should we revert the gdk workaround then ?
> Any opinion ?

I pushed both patches to master. If Emmanuele is comfortable backporting the first one to the clutter-1-10 branch and we can have another clutter release with the fix, I think it's better to drop the workaround from GDK, yes.
Comment 22 Cosimo Cecchi 2012-04-24 22:52:13 UTC
(In reply to comment #20)
> I just noticed that I can't scoll inside Nautilus either. Can someone confirm
> that, and check if the discussed patches fix that issue too?

No, scrolling in Nautilus should work fine with GTK 3.4; if you have issues there it's better to open a separate bug report against Nautilus.
Comment 23 Emmanuele Bassi (:ebassi) 2012-04-25 00:04:21 UTC
I can backport when I roll 1.10.2; GNOME 3.4.2 is due May 7th, but I guess I can do a release before that.
Comment 24 Emmanuele Bassi (:ebassi) 2012-05-28 14:44:29 UTC
1.10.4 was released with these commits.