Commit: 2eebe611e42c149aeafcf5bcd18c7a477c813e38
Author: Sergey Sharybin
Date:   Wed Aug 13 13:44:26 2014 +0600
Branches: master
https://developer.blender.org/rB2eebe611e42c149aeafcf5bcd18c7a477c813e38

Fix T40717: Screen does not update while scrolling or zooming with touchpad on 
a laptop

This is rather workaround solution for now, which seems to
work and it's not that huge to maintain (one liner apart from
the comment).

Idea is to make sure PeekMessage peeks the message when window
proc receives WM_MOUSEWHEEL (some touchpad drivers seems to
swallow the messages making it so PeekMessage doesn't get
anything).

===================================================================

M       intern/ghost/intern/GHOST_SystemWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp 
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index ca2768e..8cfd285 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -115,6 +115,17 @@
 #define VK_MEDIA_PLAY_PAUSE 0xB3
 #endif // VK_MEDIA_PLAY_PAUSE
 
+/* Workaround for some laptop touchpads, some of which seems to
+ * have driver issues which makes it so window function receives
+ * the message, but PeekMessage doesn't pick those messages for
+ * some reason.
+ *
+ * We send a dummy WM_USER message to force PeekMessage to receive
+ * something, making it so blender's window manager sees the new
+ * messages coming in.
+ */
+#define BROKEN_PEEK_TOUCHPAD
+
 static void initRawInput()
 {
 #ifdef WITH_INPUT_NDOF
@@ -1053,6 +1064,10 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, 
UINT msg, WPARAM wParam,
                                         * until it finds a window that 
processes it.
                                         */
                                        event = processWheelEvent(window, 
wParam, lParam);
+
+#ifdef BROKEN_PEEK_TOUCHPAD
+                                       PostMessage(hwnd, WM_USER, 0, 0);
+#endif
                                        break;
                                case WM_SETCURSOR:
                                        /* The WM_SETCURSOR message is sent to 
a window if the mouse causes the cursor

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to