Skip to content

Commit

Permalink
QEventDispatcher: Remove code dealing with Windows < 10
Browse files Browse the repository at this point in the history
It's not supported.

Change-Id: I650a48f214bc4965b5e28f04e4f095273d7f9e5b
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
Morten242 committed Jul 28, 2021
1 parent becb359 commit c877e97
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/corelib/kernel/qeventdispatcher_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,6 @@ void WINAPI QT_WIN_CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/,
QCoreApplication::postEvent(t->dispatcher, new QTimerEvent(t->timerId));
}

static inline UINT inputQueueMask()
{
UINT result = QS_ALLEVENTS;
// QTBUG 28513, QTBUG-29097, QTBUG-29435: QS_TOUCH, QS_POINTER became part of
// QS_INPUT in Windows Kit 8. They should not be used when running on pre-Windows 8.
#if WINVER > 0x0601
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8)
result &= ~(QS_TOUCH | QS_POINTER);
#endif // WINVER > 0x0601
return result;
}

LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
{
if (message == WM_NCCREATE)
Expand Down Expand Up @@ -248,7 +236,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
// by the foreign event loop (e.g. from the native modal dialog).
// Skip sending, if the message queue is not empty.
// sendPostedEventsTimer will deliver posted events later.
static const UINT mask = inputQueueMask();
static const UINT mask = QS_ALLEVENTS;
if (HIWORD(GetQueueStatus(mask)) == 0)
q->sendPostedEvents();
else
Expand Down

0 comments on commit c877e97

Please sign in to comment.