Receiving high precision WM_MOUSEWHEEL events with Logitech mouse on Windows 10 - scroll

To improve scrolling in my application, I recently added support for high-resolution scrolling wheel events. According to the documentation this is pretty straightforward: The handler for WM_MOUSEWHEEL should support arbitrary values as opposed to just +/- 120.
Examples of applications doing this properly are Firefox and Chrome on Windows.
I am using a Logitech mouse with a high-res wheel (MX Master 3), but I noticed that all the events I am receiving are just +/- 120. However, I could find two pretty weird work-arounds:
Rename my program to Firefox.exe
Focus on Firefox (with my app in the background), move the mouse over and scroll there
The second trick works with other things as well. For example, it makes the Windows 10 Settings app scroll smoothly. Here's a demo of the difference in action (first 4 seconds focused, then unfocused with Firefox having focus): https://www.youtube.com/watch?v=gb1FUtyLxUg&feature=youtu.be
I assume the driver is doing this for compatibility with older apps that can't handle anything that isn't 120. But is there a way for my app to opt-in to get the better events? Or does the Logitech driver simply hardcode a bunch of browsers and everyone else is out of luck?

Related

DirectX Performance Issue maximized window

I develop a test application with directx 11 und fl 10.1.
Everything is working as expected and fine, but when I maximize the window with my graphics in it, the time per frame increases drastically. like 1ms to 40ms.
NVS 300 graphics card
Windows 7 32-bit
Application that draws few sinuses with direct3d, c# via sharpdx
Windows forms with a control and sharpdx initialized swapchain, programmed to change backbuffer on resize event (would occur without that too though)
I used a System.Stopwatch to find the issue at the code line:
mSwapChain.Present(1, PresentFlags.None);
where the time it needs when maximized increases by a lot suddenly.
any clues?
In my specific case, switching to windows classic theme with aero disabled solved the issue. Because the frame performance got worse if the windows start button started to lay over the resized window.

Scrolling in Microsoft Remote Desktop on a Mac w/ Magic Trackpad 2

I'm experiencing wonky behavior using a Mac to remote into a Windows 7 PC using Microsoft's Remote Desktop app for the Mac, and using a Magic Trackpad 2 as my primary input device. The problems arise primarily when scrolling in various applications in Windows. It appears the Magic Trackpad is flooding windows with scroll events, causing unpredictable behavior in many applications. Some scroll ok, others whip around or back and forth, or stutter uncontrollably. I probably need to find a way to "filter" out this flood of scroll events into something more manageable by Windows, but I am unaware of any existing apps or utilities to do so? Has anyone else experienced this issue and/or have any potential solutions to it?
A bit more research, and I've got at least a partial solution to the issue. It helps greatly to turn off some of the "Magic" Apple imparts to its trackpads. Namely, turning off 'scrolling with inertia' helps with scrolling when using Remote Desktop. The default functionality for magic trackpad scrolling is to apply inertia to your scroll, making pages continue to scroll after you release the pad like they have weight. While this looks and feels cool, it wreaks havoc with some older windows apps. The trick is to turn this feature off you have to open the Mac's Accessibility control panel, not the one for the trackpad itself. Within Accessibility there are additional mouse and trackpad tweaks, one of which is to turn off inertial scrolling. Also, reducing the scrolling speed to its lowest setting makes Remote Desktop scrolling a bit easier. Hope this helps others.
One of a kind workaround that I came up recently is to decrease the number of lines for one notch of the mouse wheel.
P.S. For some reason the "Wheel" tab is not visible when I'm connected via MS RDP client, but available for the beta version (Version 10.1.5 (866)).
On the Mac side, pay attention to the speed part in the trackpad settings. Here I suggest you bring it to the fastest. Also, in the remote (windows) machine, increase the line per speed from default 3 to 10 And again, on the windows side, set the mouse speed to the fastest in the additional options section.

How to detect support of immediate scroll events with Modernizr?

I use ScrollMagic to trigger animations on each section of a web page. This works great for desktop and for some browsers on mobile.
However there are some mobile browsers (older versions of Safari and Chrome (on ipad)) that don't play these animations until the scrolling event is finished. I know there are ways around that. However instead, I would like to simply turn off these animations when not supported.
Is there a way to detect that with Modernizr? Or would I have to target specific browsers and its versions?
You wouldn't detect parallax animation. That isn't a browser feature, that is something that you can use browser features to accomplish.
In this case you would you be looking to detect if you are reflow the page during a scroll, or if it waits until after the scroll event fires. There is currently no detect for this, and creating one would get pretty greasy.
I believe what you are seeing is the result of the scroll event not firing as you scroll on certain browsers. I cannot think of a way to simulate this with javascript (triggering a scroll event will obviously only trigger one scroll event, so there isn't anything to gain there). As a result, I am not confident that you would ever be able to accurately detect this.
I completely agree with Patrick's answer, but would like to add that it is indeed possible to have immediate scroll events on the mobile versions of chrome and safari, you are talking about.
The issue you're describing is related to all iOS devices before version 8.
Before then the mobile browser engine did not trigger "true" scroll events while scrolling, but only once scrolling had come to a full halt (so after the inertia stopped). Even the execution of javascript was suspended, so you couldn't just run a loop to check the scroll position.
Long story short: There are ways around it using containers for scrolling and requestAnimationFrame.
The easiest way I found to get scroll events for pre iOS8 devices is iScroll.
I would recommend to check out this: http://janpaepke.github.io/ScrollMagic/examples/advanced/mobile_basic.html
and this:
http://janpaepke.github.io/ScrollMagic/examples/expert/mobile_advanced.html
So getting back to your original question: How to detect when you would even need those workarounds.
You'd need to check if the you're on iOS version 7 or lower, which, to my knowledge, can't be done with modernizr, as it is a feature detection library.
So check out this thread to learn more: Detect iOS version less than 5 with JavaScript

windows 8 gestures on edge of screen

I have a desktop application running on windows 7 and 8. We implemented gestures using WM_GESTURE to support both windows. When running on windows 8 tablet, if user try to swipe, pan etc from of the edge i.e out side the visible screen, gestures do not work. When i logged the event(messages) application receives, it shows no gesture message.
On metro apps you see menu at bottom of screen when you swipe up from outside the screen area. I want similar functionality with my desktop application. Is this possible? Does desktop app has limitation or i am missing something? I searched over but cannot find a clear cut answer positive or negative.
Further info if of any help. It is a MFC application using both VC++ and C#. Minimum supported version of windows is 7.
One more thing. Our application runs in full screen with no task bar etc, like slide show.

keyboard splitting hangs in opengl app

I have OpenGL application with UITextField in the main menu. When I tap on the text field the keyboard appears and I can edit the text. But if I running under iOS 5 and if I try to split keyboard then the keyboard starts splitting (I mean animation) and then hangs when I release my fingers. I mean it hangs on half splitting - and does not responds more. But my app is still alive - and render is working well - background animation is still working.
I have just made a simple test - have disabled the render at all. And the problem has gone. So the problem is related to OpenGL.
I use OpenGL ES 1.1,
XCode 4.2 and iOS SDK 5.0.
Do somebody have similar problems? Any suggestions?
Please help.
UPDATE:
I have just tested two more games from AppStore - and in one I have found this problem too!
'Roads of Rome HD free' - iPad game.
I've encountered this problem too, but I was able to fix it due to previous experiences. In one application we found that if we keep our GL view active while playing video, the video playback position slider didn't behave smoothly. The same seems to happen with the keyboard split. If your problem is the same as mine, the issue is related to the keyboard split animation not finishing (and, in our case, the point where remained struck varied with each test)
We solved the issue stopping the animation on your GL view (I bet it's called EAGLView) when receiving a UIKeyboardWillChangeFrame notification and starting it again after UIKeyboardDidChangeFrame.
Old post, but I just came across this problem in ios 8 on an iPad3.
Running an OpenGL app at 60fps seems to throttle the keyboard update. Reducing your FPS while the keyboard overlay is active will fix the issue.
I'm using GLKViewController to manage the update and Draw callbacks with a 60fps refresh, but that was causing the keyboard split to lock up half completed.
I found the best solution for me was to set the view's preferredFramesPerSecond to 20 while receiving text input, and then set back to 60 after the textView is closed. As well as fixing the keyboard hang, it also just makes the keyboard generally more responsive.
myViewController.preferredFramesPerSecond = 20;

Resources