From b8daf2d0c1662d69156c36ec0197f7b345dd3d45 Mon Sep 17 00:00:00 2001 From: Lipinast Lekrisov Date: Tue, 29 Apr 2025 09:35:32 +0000 Subject: [PATCH] Carbon: fixes in NotifyApplicationUserInput --- lcl/interfaces/carbon/carbonprivatecommon.inc | 6 +++--- lcl/interfaces/carbon/carbonprivatecontrol.inc | 2 +- lcl/interfaces/carbon/carbonprivatewindow.inc | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lcl/interfaces/carbon/carbonprivatecommon.inc b/lcl/interfaces/carbon/carbonprivatecommon.inc index 039a143920..07d1c544df 100644 --- a/lcl/interfaces/carbon/carbonprivatecommon.inc +++ b/lcl/interfaces/carbon/carbonprivatecommon.inc @@ -192,7 +192,7 @@ begin if Widget.NeedDeliverMouseEvent(Msg.Msg, Msg) then begin - NotifyApplicationUserInput(Widget.LCLObject, Msg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@Msg)^); DeliverMessage(Widget.LCLObject, Msg); end; end; @@ -228,7 +228,7 @@ begin PostponedDown := False; if AWidget.NeedDeliverMouseEvent(PostponedDownMsg.Msg, PostponedDownMsg) then begin - NotifyApplicationUserInput(AWidget.LCLObject, PostponedDownMsg.Msg); + NotifyApplicationUserInput(AWidget.LCLObject, PLMessage(@PostponedDownMsg)^); DeliverMessage(AWidget.LCLObject, PostponedDownMsg); end; end; @@ -300,7 +300,7 @@ begin begin DeliverMessage(AWidget.LCLObject, Msg); - NotifyApplicationUserInput(AWidget.LCLObject, Msg.Msg); + NotifyApplicationUserInput(AWidget.LCLObject, PLMessage(@Msg)^); CarbonWidgetSet.SetCaptureWidget(0); // capture is released end; end; diff --git a/lcl/interfaces/carbon/carbonprivatecontrol.inc b/lcl/interfaces/carbon/carbonprivatecontrol.inc index b859f2ea36..ecc15b8d52 100644 --- a/lcl/interfaces/carbon/carbonprivatecontrol.inc +++ b/lcl/interfaces/carbon/carbonprivatecontrol.inc @@ -41,7 +41,7 @@ begin // send postponed mouse up event DeliverMessage(LCLTarget, SavedMouseUpMsg); - NotifyApplicationUserInput(LCLTarget, SavedMouseUpMsg.Msg); + NotifyApplicationUserInput(LCLTarget, PLMessage(@SavedMouseUpMsg)^); CarbonWidgetSet.SetCaptureWidget(0); // capture is released end; diff --git a/lcl/interfaces/carbon/carbonprivatewindow.inc b/lcl/interfaces/carbon/carbonprivatewindow.inc index 8a33740634..9d64f99c67 100644 --- a/lcl/interfaces/carbon/carbonprivatewindow.inc +++ b/lcl/interfaces/carbon/carbonprivatewindow.inc @@ -331,7 +331,7 @@ begin begin if Widget.NeedDeliverMouseEvent(Msg.Message.Msg, Msg) then begin // Msg is set in the Appropriate HandleMousexxx procedure - NotifyApplicationUserInput(Widget.LCLObject, Msg.Message.Msg); + NotifyApplicationUserInput(Widget.LCLObject, Msg.Message); if DeliverMessage(Widget.LCLObject, Msg) = 0 then begin Result := EventNotHandledErr; @@ -753,7 +753,7 @@ const DebugLn('[HandleRawKeyDownEvent] LCL handled CN_KEYDOWN, exiting'); {$ENDIF} - NotifyApplicationUserInput(Widget.LCLObject, KeyMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@KeyMsg)^); Result := noErr; Exit; end; @@ -773,7 +773,7 @@ const {$ENDIF} //Result already set by CallNextEventHandler - NotifyApplicationUserInput(Widget.LCLObject, KeyMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@KeyMsg)^); Exit; end; end; @@ -813,7 +813,7 @@ const if Result=EventNotHandledErr then Result := noErr; - NotifyApplicationUserInput(Widget.LCLObject, CharMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@CharMsg)^); Exit; end; if CharMsg.CharCode<>ord(KeyChar) then @@ -847,7 +847,7 @@ const if Result=EventNotHandledErr then Result := noErr; - NotifyApplicationUserInput(Widget.LCLObject, CharMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@CharMsg)^); Exit; end; end; @@ -880,7 +880,7 @@ const {$ENDIF} Result := noErr; - NotifyApplicationUserInput(Widget.LCLObject, KeyMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@KeyMsg)^); Exit; end; @@ -901,7 +901,7 @@ const if Result=EventNotHandledErr then Result := noErr; - NotifyApplicationUserInput(Widget.LCLObject, KeyMsg.Msg); + NotifyApplicationUserInput(Widget.LCLObject, PLMessage(@KeyMsg)^); Exit; end; end;