mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
Cocoa: Fix Message Result in TCocoaWidgetSet.CallDefaultWndHandler.CallMouseWheelHandler()
This commit is contained in:
parent
bc7ef3d1eb
commit
eacd34023f
@ -130,7 +130,7 @@ const
|
|||||||
WantArrow : array [boolean] of integer = (0, DLGC_WANTARROWS);
|
WantArrow : array [boolean] of integer = (0, DLGC_WANTARROWS);
|
||||||
WantKeys : array [boolean] of integer = (0, DLGC_WANTALLKEYS);
|
WantKeys : array [boolean] of integer = (0, DLGC_WANTALLKEYS);
|
||||||
|
|
||||||
procedure CallMouseWheelHandler(barFlag: Integer);
|
function CallMouseWheelHandler(barFlag: Integer): LRESULT;
|
||||||
var
|
var
|
||||||
scrollMsg: TLMScroll;
|
scrollMsg: TLMScroll;
|
||||||
pMsg: PLMessage;
|
pMsg: PLMessage;
|
||||||
@ -143,6 +143,7 @@ const
|
|||||||
offset: Integer;
|
offset: Integer;
|
||||||
inc: Integer;
|
inc: Integer;
|
||||||
begin
|
begin
|
||||||
|
Result:= 0;
|
||||||
if NOT (Sender is TWinControl) then
|
if NOT (Sender is TWinControl) then
|
||||||
Exit;
|
Exit;
|
||||||
if NOT winControl.HandleAllocated then
|
if NOT winControl.HandleAllocated then
|
||||||
@ -191,6 +192,7 @@ const
|
|||||||
scrollMsg.ScrollCode:= SB_THUMBPOSITION;
|
scrollMsg.ScrollCode:= SB_THUMBPOSITION;
|
||||||
pMsg:= @scrollMsg;
|
pMsg:= @scrollMsg;
|
||||||
winControl.WindowProc(pMsg^);
|
winControl.WindowProc(pMsg^);
|
||||||
|
Result:= scrollMsg.Result;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -212,9 +214,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
LM_MOUSEWHEEL:
|
LM_MOUSEWHEEL:
|
||||||
CallMouseWheelHandler(SB_Vert);
|
TLMMouseEvent(Message).Result:= CallMouseWheelHandler(SB_Vert);
|
||||||
LM_MOUSEHWHEEL:
|
LM_MOUSEHWHEEL:
|
||||||
CallMouseWheelHandler(SB_Horz);
|
TLMMouseEvent(Message).Result:= CallMouseWheelHandler(SB_Horz);
|
||||||
else
|
else
|
||||||
TLMessage(Message).Result := 0;
|
TLMessage(Message).Result := 0;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user