From cd79a420be62885c1c94607aac3a25bf3a31634f Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 1 Jan 2009 19:17:29 +0000 Subject: [PATCH] win32: don't fire Wheel events for disabled windows (bug #0012803) git-svn-id: trunk@18019 - --- lcl/interfaces/win32/win32callback.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index eb3a4dd49d..d030027d82 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1830,11 +1830,12 @@ begin begin X := GET_X_LPARAM(LParam); Y := GET_Y_LPARAM(LParam); - // check if mouse cursor within this window, otherwise send message to window the mouse is hovering over + // check if mouse cursor within this window, otherwise send message to + // window the mouse is hovering over P.X := X; P.Y := Y; TargetWindow := TWin32WidgetSet(WidgetSet).WindowFromPoint(P); - if TargetWindow = HWND(nil) then + if (TargetWindow = 0) or not IsWindowEnabled(TargetWindow) then exit; // check if the window is an edit control of a combobox, if so,