Send the message WM_MOUSEWHEEL to focus window

This commit is contained in:
dreamsourcelabTAI 2024-04-29 14:48:00 +08:00
parent 42368463a3
commit 2a1a6bd701
2 changed files with 2 additions and 3 deletions

View File

@ -70,7 +70,6 @@ WinNativeWidget::WinNativeWidget(const int x, const int y, const int width,
_titleBarWidget = NULL;
_is_native_border = IsWin11OrGreater();
_is_win7 = IsWin7();
_border_color = QColor(0x80,0x80,0x80);
int r = backColor.red();
@ -368,7 +367,8 @@ LRESULT CALLBACK WinNativeWidget::WndProc(HWND hWnd, UINT message, WPARAM wParam
}
case WM_MOUSEWHEEL:
{
if (self->_is_win7 && self->_childWindow != NULL){
// If system not send this message to the focus window, the native window will be received it.
if (self->_childWindow != NULL){
return SendMessage(self->_childWindow, message, wParam, lParam);
}
break;

View File

@ -127,7 +127,6 @@ private:
WinShadow *_shadow;
QColor _border_color;
bool _is_lose_foreground;
bool _is_win7;
};
}