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).
This commit is contained in:
parent
a7875c7c05
commit
2eebe611e4
Notes:
blender-bot
2023-02-14 10:28:18 +01:00
Referenced by issue #40717, Screen does not update while scrolling or zooming with touchpad on a laptop
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue