forked from Ivasoft/DSView
Send the message WM_MOUSEWHEEL to focus window
This commit is contained in:
@@ -70,7 +70,6 @@ WinNativeWidget::WinNativeWidget(const int x, const int y, const int width,
|
|||||||
_titleBarWidget = NULL;
|
_titleBarWidget = NULL;
|
||||||
|
|
||||||
_is_native_border = IsWin11OrGreater();
|
_is_native_border = IsWin11OrGreater();
|
||||||
_is_win7 = IsWin7();
|
|
||||||
|
|
||||||
_border_color = QColor(0x80,0x80,0x80);
|
_border_color = QColor(0x80,0x80,0x80);
|
||||||
int r = backColor.red();
|
int r = backColor.red();
|
||||||
@@ -368,7 +367,8 @@ LRESULT CALLBACK WinNativeWidget::WndProc(HWND hWnd, UINT message, WPARAM wParam
|
|||||||
}
|
}
|
||||||
case WM_MOUSEWHEEL:
|
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);
|
return SendMessage(self->_childWindow, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ private:
|
|||||||
WinShadow *_shadow;
|
WinShadow *_shadow;
|
||||||
QColor _border_color;
|
QColor _border_color;
|
||||||
bool _is_lose_foreground;
|
bool _is_lose_foreground;
|
||||||
bool _is_win7;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user