Bug 7798 - Scroll doesn't work with some kinds of mouse / trackpad
Summary: Scroll doesn't work with some kinds of mouse / trackpad
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: 5.0
Assignee: Michael Natterer
URL:
: 9187 10487 10579 10741 ()
Depends on:
Blocks:
 
Reported: 2012-10-11 10:21 UTC by Ademar Gonzalez
Modified: 2014-05-02 06:14 UTC (History)
15 users (show)

Tags: ui-refresh gtk
Is this bug a regression?: ---
Last known good build:


Attachments
[PATCH 1/2] Never intervene in the event stream if a gesture was never observed (2.45 KB, patch)
2013-02-17 07:12 UTC, Kristian Rietveld (inactive)
Details
[PATCH 2/2] Do not start overshooting without observing a gesture (3.60 KB, patch)
2013-02-17 07:12 UTC, Kristian Rietveld (inactive)
Details
[PATCH 1/3] Add momentum_phase to GdkEventScroll (4.20 KB, patch)
2013-02-22 19:03 UTC, Kristian Rietveld (inactive)
Details
[PATCH 2/3] Never intervene in the event stream for legacy mice (1.50 KB, patch)
2013-02-22 19:03 UTC, Kristian Rietveld (inactive)
Details
[PATCH 3/3] Do not start overshooting for legacy mouse scroll events (3.46 KB, patch)
2013-02-22 19:04 UTC, Kristian Rietveld (inactive)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Ademar Gonzalez 2012-10-11 10:21:10 UTC
While editing C#, sometime after start up, the editor scroll stops responding to the track pad.
Comment 1 PJ 2013-01-10 19:44:36 UTC
Is this track pad only? I can scroll for hours with a mouse.
Comment 2 Ademar Gonzalez 2013-01-10 20:32:32 UTC
Yes, scrolling with a mouse works, but two fingers trackpad scrolling is not working for me on a Macbook with the latest refresh.
Comment 3 PJ 2013-01-10 22:07:49 UTC
Thanks for the info!

I can scroll with the standalone trackpad as well as the Macbook track pad on a late 2010 macbook.

Which exact macbook are you experiencing this with? 


Upping the priority/severity in case this is wide-spread.
Comment 4 Mike Krüger 2013-01-11 02:31:01 UTC
My track pads work as well btw.
Comment 5 Ademar Gonzalez 2013-01-11 09:06:34 UTC
This is a MacBook 13-inch Late 2007 (Intel) running Mac OS X Lion 10.7.5 (11G63)

Now check this out. After installing Mono 2.10.10 scrolling with the track pad also breaks on the regular MonoDevelop release (3.0.6). Reinstalling Mono 2.10.9 fixes the issue in MonoDevelop.
Comment 6 Lluis Sanchez 2013-01-11 11:02:33 UTC
Mitch, any idea?
Comment 7 PJ 2013-01-15 12:03:22 UTC
I am not sure which exact build of 2.10.10 you have been using. Based on comment 5 perhaps I could have you try a new Mono 2.10.11 build?

http://files.xamarin.com/~pjbeaman/MonoFramework-MDK-2.10.11.macos10.xamarin.x86.dmg

Unfortunately, I haven't been able to reproduce the scroll issue here on any scroll/trackpad. 

Hope we can track it down (no pun intended)!
Comment 8 Ademar Gonzalez 2013-01-16 15:53:02 UTC
No, it does not work with build 2.10.11. This build also breaks the functionality in the regular MonoDevelop install.

I want to clarify this affects all of monodevelop not only the code editor.
Comment 9 Lluis Sanchez 2013-01-17 03:52:07 UTC
Reopening
Comment 10 PJ 2013-01-29 11:11:24 UTC
We still can't reproduce this. Are you using a custom driver? We're going to have to slate this for a later release if we can track it down.
Comment 11 Mikayla Hutchinson [MSFT] 2013-01-30 18:51:31 UTC
We have someone in the private beta forum reporting this with a mouse:

"Apple USB Mouse (Model A 1152) iMac 21.5 OS/X 10.8.2
Scrolling works with Safari, Xcode, etc. Was working with MonoDevelop but does not since loading the beta.

To my knowledge I am not running any custom utilities or drivers."
Comment 12 Mikayla Hutchinson [MSFT] 2013-02-05 16:38:00 UTC
We have been able to reproduce this with the A1152 Mighty Mouse. Mitch/Kris, is there  any additional info we can provide to help debug it?
Comment 13 Mikayla Hutchinson [MSFT] 2013-02-05 17:01:24 UTC
*** Bug 9187 has been marked as a duplicate of this bug. ***
Comment 14 Michael Natterer 2013-02-06 18:07:31 UTC
Does that mouse show the same problem in e.g. gtk-demo? All my scrolling
devices scroll just fine, I have no idea how to reproduce this :(
Comment 15 Mikayla Hutchinson [MSFT] 2013-02-06 18:30:15 UTC
Yes, gtk-demo has the same issue.
Comment 16 Kristian Rietveld (inactive) 2013-02-07 03:47:55 UTC
From the reports it seems like this is only reproducible on older hardware. A 2007 MacBook Pro model is mentioned and the mighty mouse is from around 2007 as well.

I can try the latest GTK+ on my 2006 MacBook or else see if I can borrow a mighty mouse from somebody for testing.
Comment 17 Michael Natterer 2013-02-07 04:49:02 UTC
I'm trying to get my hands on a mighty mouse here too, but my resources
of mac-owning friends are rather limited.
Comment 18 Al Nyveldt 2013-02-07 08:28:38 UTC
My bug was marked as duplicate and added this this one.

I'm having the issue on a late 2011 MacBook Pro with a Logitech Performance MX.

I wrote lots of details about in on the other bug notes: https://bugzilla.xamarin.com/show_bug.cgi?id=9187
Comment 19 Mikayla Hutchinson [MSFT] 2013-02-07 14:07:19 UTC
Since I have one of these devices here, you're welcome to send me test code or walk me through debugging it on IRC :)
Comment 20 Mikayla Hutchinson [MSFT] 2013-02-12 16:23:33 UTC
I did some printf debugging and it appears that this mouse emits precise scrolling events but with no phase. 

This is confirmed by the apple docs: "Legacy scroll wheel events (say from a Mighty Mouse) and momentum scroll wheel events have a phase of NSEventPhaseNone."

https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsevent_Class/Reference/Reference.html#//apple_ref/occ/instm/NSEvent/phase
Comment 21 Kristian Rietveld (inactive) 2013-02-17 07:11:33 UTC
I have emulated a Mighty Mouse by changing the event translation code to always return a NONE phase on scroll events. The following two patches were necessary to get things to work in that case.

Michael: Could you check for me with a Mighty mouse whether this makes things work properly?
Comment 22 Kristian Rietveld (inactive) 2013-02-17 07:12:07 UTC
Created attachment 3392 [details]
[PATCH 1/2] Never intervene in the event stream if a gesture was never observed
Comment 23 Kristian Rietveld (inactive) 2013-02-17 07:12:25 UTC
Created attachment 3393 [details]
[PATCH 2/2] Do not start overshooting without observing a gesture
Comment 24 Mikayla Hutchinson [MSFT] 2013-02-18 16:00:34 UTC
It mostly works, so I landed it.

The one problem is if I use the trackpad to scroll, then the scrollwheel on the mouse stops working. I can think of cases where this might happen, for example someone use using MD on a laptop then gets to their desk and plugs in a mouse & keyboard.
Comment 25 Kristian Rietveld (inactive) 2013-02-18 16:24:42 UTC
Ah. I did test with the trackpad and a "normal" mouse and that worked. Will also test with a trackpad and an emulated mighty mouse. I think the events get stuck at the same place, since in patch 1 code was added to check whether a start phase has been observed for a trackpad (and thus uses this state too when you start using the mouse which never emitted a state phase). I think we might need to have this flag for every separate device.
Comment 26 Mikayla Hutchinson [MSFT] 2013-02-20 21:49:47 UTC
*** Bug 10487 has been marked as a duplicate of this bug. ***
Comment 27 Thomas Guzman 2013-02-21 08:51:30 UTC
I have a similar issue since Xamarin Studio (MD4) on Mac:

When the scrollbar is at top or bottom, mouse wheel doesn't do anything, but Trackpad works.
When the scrollbar is anywhere else other than top or bottom, mouse wheel works (until I reach the top or bottom, of course, after that, I have to use the trackpad again...)

This is happening everywhere in the application

Very VERY annoying...
Comment 28 Thomas Guzman 2013-02-21 08:54:52 UTC
Forgot to mention: My mouse is a Logitech Performance MX, Logitech Control Center installed
Comment 29 Mikayla Hutchinson [MSFT] 2013-02-22 11:42:33 UTC
*** Bug 10579 has been marked as a duplicate of this bug. ***
Comment 30 Kristian Rietveld (inactive) 2013-02-22 19:03:26 UTC
Created attachment 3461 [details]
[PATCH 1/3] Add momentum_phase to GdkEventScroll
Comment 31 Kristian Rietveld (inactive) 2013-02-22 19:03:45 UTC
Created attachment 3462 [details]
[PATCH 2/3] Never intervene in the event stream for legacy mice
Comment 32 Kristian Rietveld (inactive) 2013-02-22 19:04:11 UTC
Created attachment 3463 [details]
[PATCH 3/3] Do not start overshooting for legacy mouse scroll events
Comment 33 Kristian Rietveld (inactive) 2013-02-22 19:06:43 UTC
From the documentation I figured a different way to detect legacy mice. This feels more robust and also simplifies the patches. See the three new attachments.

Michael: could you re-test whether this fixes the issues? The new patches should fix the problem where the scroll wheel becomes stuck after overshooting.


The one issue I see here is that after overshooting I need a few mouse scroll events before the widget actually starts scrolling. I do not know whether this is really a problem or whether this is caused by the way I emulate a "mighty mouse".
Comment 34 Mikayla Hutchinson [MSFT] 2013-02-22 20:20:04 UTC
Seems to work well. Landed it, now we just need a release :)
Comment 35 Mikayla Hutchinson [MSFT] 2013-02-27 13:18:46 UTC
*** Bug 10741 has been marked as a duplicate of this bug. ***
Comment 36 Marlon 2013-02-27 13:52:44 UTC
Not to split hairs, but I don't know that this resolved my particular issue. For my situation, what seems to work is Thomas' comment (#27 above) where you must click somewhere in between the top and bottom of the text editor. 

However, even doing that does not immediately give control back to the mousewheel. It is still unresponsive unless I first scroll down a tad using the Trackpad. In other words, I have to give it a tiny "push" using scroll on the Trackpad. It's quite annoying, and hardly a solution when I didn't have to do this until today. Prior to today, I could use the scrollwheel all the time.
Comment 37 Mikayla Hutchinson [MSFT] 2013-02-27 14:13:08 UTC
Marlon, we haven't released the fix yet. There'll be a new Mono build (Mono 2.10.12?) at some point with this fix, but unfortunately it's still going through release/QA.

From your description, it really does sound like the same bug - it's known to happen when using Logitech Control Center. Being able to scroll with the mouse after a "push" with the trackpad matches this problem exactly, because it's caused by "legacy" (Apple's word) mice that emit new-style "smooth" scroll events without the same "begin" event that we expect from more modern devices.
Comment 38 gburdeti 2013-03-06 20:01:15 UTC
I have the same problem. My scroll wheel does not work at all :(
Thank you for the fix. I hope you'll release it soon.
Comment 39 Alex 2013-03-17 05:28:22 UTC
Hi all,

ok, the mouse wheel worked ok for me all the time. Now, after upgrading to latest MonoDevelop (and MacOS) , the mouse wheel stopped working, I cant scroll the code editor, nor any other windows inside MonoDevelop. I am using a standard Apple mouse. As this is really annoying, is there a scheduled day for releasing a patch for this?

Alex
Comment 40 gburdeti 2013-03-17 12:46:18 UTC
I had to plug another mouse for scrolling to work. My logitech mouse doesn't work but my MS arc mouse works fine. Now I have to switch mice when working with MonoDevelop. :(

Scrolling with the trackpad on my mbp works fine.
Comment 43 Alex 2013-04-08 09:32:43 UTC
Are you using the latest MonoDevelop version? For me the problem disappeared after upgrading (MacOS, Apple mouse).

Alex
Comment 44 gburdeti 2013-04-08 15:50:01 UTC
The new MonoDevelop version (4.0.3) doesn't have the scroll problem anymore with my mouse. Except that now it doesn't synch with my Unity projects as well as 4.0. Sometimes is looses the link to the project if the project is updated externally.
Comment 45 Mohit Kheterpal 2014-05-02 06:14:34 UTC
As per comment 42, comment 43 and comment 44 this issue does not exist any more.

Hence closing this issue. Marking it as verified.