From b7e08599cc784777d06d34e49e90c2d408ab629d Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Tue, 23 Feb 2021 15:00:48 +0200 Subject: QEventDispatcherWin32: get rid of the hook procedure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of intercepting the WM_QT_SENDPOSTEDEVENTS message in the hook procedure, we can handle it at receive points, making qt_GetMessageHook() unnecessary. Including general performance improvements, this patch fixes the issue where some applications (e.g. Ableton Live) do not call a chain of nested hooks for plugins. Pick-to: 6.1 5.15 Fixes: QTBUG-90949 Change-Id: If8e96848392c6f10d45af2aac0567707d16af673 Reviewed-by: Oliver Wolff Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Volker Hilsheimer Reviewed-by: Nuno Santos --- src/corelib/kernel/qeventdispatcher_win_p.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/corelib/kernel/qeventdispatcher_win_p.h') diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h index 90a818b0f5..49a6d3ebbc 100644 --- a/src/corelib/kernel/qeventdispatcher_win_p.h +++ b/src/corelib/kernel/qeventdispatcher_win_p.h @@ -104,7 +104,6 @@ protected: private: friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp); - friend LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int, WPARAM, LPARAM); }; struct QSockNot { @@ -154,11 +153,11 @@ public: // internal window handle used for socketnotifiers/timers/etc HWND internalHwnd; - HHOOK getMessageHook; // for controlling when to send posted events UINT_PTR sendPostedEventsTimerId; QAtomicInt wakeUps; + void startPostedEventsTimer(); // timers WinTimerDict timerDict; -- cgit v1.2.3