Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-08-13 11:44:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-13 11:49:30 +0400
commit2eebe611e42c149aeafcf5bcd18c7a477c813e38 (patch)
tree0f151b7308ab690addacd50e6e8b5b3191f3e935 /intern/ghost/intern/GHOST_SystemWin32.cpp
parenta7875c7c05ee15edf38047220f3c9fbe9835bc98 (diff)
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).
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index ca2768ec161..8cfd2856231 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