mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:01:20 +02:00
Gtk/Gtk2/Gtk3: fixes in NotifyApplicationUserInput
This commit is contained in:
parent
04474929e1
commit
899f36897a
@ -1197,7 +1197,7 @@ begin
|
||||
// send the message directly to the LCL
|
||||
// (Posting the message via queue
|
||||
// has the risk of getting out of sync with the gtk)
|
||||
NotifyApplicationUserInput(AWinControl, Msg.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@Msg)^);
|
||||
//DebugLn(['DeliverMouseMoveMessage ',dbgsName(AWinControl)]);
|
||||
DeliverMessage(AWinControl, Msg);
|
||||
end;
|
||||
@ -1487,7 +1487,7 @@ begin
|
||||
MessE.Button := 0;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
DeliverMessage(AWinControl, MessE);
|
||||
end;
|
||||
if event^.Button in [6, 7] then
|
||||
@ -1502,7 +1502,7 @@ begin
|
||||
MessE.Button := 0;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
DeliverMessage(AWinControl, MessE);
|
||||
end
|
||||
else
|
||||
@ -1533,7 +1533,7 @@ begin
|
||||
|
||||
MessI.Result:=0;
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessI.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessI)^);
|
||||
DeliverMessage(AWinControl, MessI);
|
||||
end;
|
||||
end;
|
||||
@ -1814,7 +1814,7 @@ begin
|
||||
// (Posting the message via queue
|
||||
// has the risk of getting out of sync with the gtk)
|
||||
MessI.Result := 0;
|
||||
NotifyApplicationUserInput(AWinControl, MessI.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessI)^);
|
||||
DeliverMessage(AWinControl, MessI);
|
||||
if MessI.Result <> 0 then
|
||||
begin
|
||||
|
@ -2205,7 +2205,7 @@ var
|
||||
Msg.KeyData := CommonKeyData or (Flags shl 16) or $0001 {TODO: repeatcount};
|
||||
|
||||
// send the (Sys)KeyDown message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
DeliverKeyMessage(TargetObj, Msg);
|
||||
end;
|
||||
{$ENDIF}
|
||||
@ -2358,7 +2358,7 @@ begin
|
||||
if not KeyAlreadyHandledByGtk
|
||||
then begin
|
||||
// send the (Sys)KeyDown message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
if DeliverKeyMessage(TargetObj, Msg)
|
||||
and (Msg.CharCode <> Vkey) then
|
||||
StopKeyEvent;
|
||||
@ -2381,7 +2381,7 @@ begin
|
||||
|
||||
// send the message directly to the LCL
|
||||
Msg.Result:=0;
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
|
||||
if DeliverKeyMessage(TargetObj, Msg)
|
||||
and (Msg.CharCode <> VKey)
|
||||
|
@ -1340,7 +1340,7 @@ begin
|
||||
// send the message directly to the LCL
|
||||
// (Posting the message via queue
|
||||
// has the risk of getting out of sync with the gtk)
|
||||
NotifyApplicationUserInput(AWinControl, Msg.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@Msg)^);
|
||||
//DebugLn(['DeliverMouseMoveMessage ',dbgsName(AWinControl)]);
|
||||
DeliverMessage(AWinControl, Msg);
|
||||
|
||||
@ -2006,7 +2006,7 @@ begin
|
||||
MessE.Button := 0;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
Result:=DeliverMessage(AWinControl, MessE);
|
||||
end
|
||||
else
|
||||
@ -2022,7 +2022,7 @@ begin
|
||||
MessE.Button := 0;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
Result:=DeliverMessage(AWinControl, MessE);
|
||||
end
|
||||
else
|
||||
@ -2078,7 +2078,7 @@ begin
|
||||
end;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessI.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessI)^);
|
||||
Result := DeliverMessage(AWinControl, MessI);
|
||||
|
||||
// issue #19914
|
||||
@ -2246,7 +2246,7 @@ begin
|
||||
if event^.button in [8,9] then
|
||||
MessI.Keys := MessI.Keys or ((event^.button - 7) shl 16);
|
||||
MessI.Result := 0;
|
||||
NotifyApplicationUserInput(AWinControl, MessI.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessI)^);
|
||||
DeliverMessage(AWinControl, MessI);
|
||||
if not AWinControl.HandleAllocated then
|
||||
Result := True
|
||||
@ -2423,7 +2423,7 @@ begin
|
||||
MessE.Button := 0;
|
||||
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
if DeliverMessage(AWinControl, MessE) <> 0 then
|
||||
Result := True; // message handled by LCL, stop processing
|
||||
end;
|
||||
|
@ -2123,7 +2123,7 @@ var
|
||||
Msg.msg := LM_KEYDOWN;
|
||||
Msg.KeyData := CommonKeyData or (Flags shl 16) or $0001;
|
||||
// send the (Sys)KeyDown message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
DeliverKeyMessage(TargetObj, Msg);
|
||||
|
||||
if SysKey then
|
||||
@ -2131,7 +2131,7 @@ var
|
||||
else
|
||||
Msg.msg := LM_KEYUP;
|
||||
// send the (Sys)KeyUp message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
DeliverKeyMessage(TargetObj, Msg);
|
||||
end else
|
||||
|
||||
@ -2150,7 +2150,7 @@ var
|
||||
Msg.KeyData := CommonKeyData or (Flags shl 16) or $0001 {TODO: repeatcount};
|
||||
// do not send next LM_CLICKED. issue #21483
|
||||
g_object_set_data(PGObject(TargetWidget),'lcl-button-stop-clicked', TargetWidget);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
DeliverKeyMessage(TargetObj, Msg);
|
||||
end;
|
||||
|
||||
@ -2175,7 +2175,7 @@ var
|
||||
Msg.KeyData := CommonKeyData or (Flags shl 16) or $0001 {TODO: repeatcount};
|
||||
|
||||
// send the (Sys)KeyDown message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
DeliverKeyMessage(TargetObj, Msg);
|
||||
end;
|
||||
end;
|
||||
@ -2376,7 +2376,7 @@ begin
|
||||
if not KeyAlreadyHandledByGtk
|
||||
then begin
|
||||
// send the (Sys)KeyDown message directly to the LCL
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
if DeliverKeyMessage(TargetObj, Msg)
|
||||
and (Msg.CharCode <> Vkey) then
|
||||
StopKeyEvent;
|
||||
@ -2399,7 +2399,7 @@ begin
|
||||
|
||||
// send the message directly to the LCL
|
||||
Msg.Result:=0;
|
||||
NotifyApplicationUserInput(TControl(TargetObj), Msg.Msg);
|
||||
NotifyApplicationUserInput(TControl(TargetObj), PLMessage(@Msg)^);
|
||||
|
||||
if DeliverKeyMessage(TargetObj, Msg)
|
||||
and (Msg.CharCode <> VKey)
|
||||
|
@ -1524,7 +1524,7 @@ begin
|
||||
MessE.UserData := AWinControl;
|
||||
MessE.Button := 0;
|
||||
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
NotifyApplicationUserInput(AWinControl, PLMessage(@MessE)^);
|
||||
Result := TGtk3Widget(AData).DeliverMessage(MessE) <> 0;
|
||||
AEvent^.scroll.send_event := NO_PROPAGATION_TO_PARENT;
|
||||
|
||||
@ -1725,7 +1725,7 @@ begin
|
||||
|
||||
Msg.Msg := LM_MOUSEMOVE;
|
||||
|
||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@Msg)^);
|
||||
if Widget^.get_parent <> nil then
|
||||
Event^.motion.send_event := NO_PROPAGATION_TO_PARENT;
|
||||
DeliverMessage(Msg, True);
|
||||
@ -2033,7 +2033,7 @@ begin
|
||||
Msg.CharCode := ACharCode;
|
||||
Msg.KeyData := PtrInt((KeyValue shl 16) or (LCLModifiers shl 16) or $0001);
|
||||
|
||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@Msg)^);
|
||||
|
||||
if not CanSendLCLMessage then
|
||||
exit;
|
||||
@ -2059,7 +2059,7 @@ begin
|
||||
Msg.CharCode := ACharCode;
|
||||
Msg.KeyData := PtrInt((KeyValue shl 16) or (LCLModifiers shl 16) or $0001);
|
||||
|
||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@Msg)^);
|
||||
|
||||
if not CanSendLCLMessage then
|
||||
exit;
|
||||
@ -2106,7 +2106,7 @@ begin
|
||||
CharMsg.KeyData := Msg.KeyData;
|
||||
AChar := AEventString[1];
|
||||
CharMsg.CharCode := Word(AChar);
|
||||
NotifyApplicationUserInput(LCLObject, CharMsg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@CharMsg)^);
|
||||
|
||||
if not CanSendLCLMessage then
|
||||
exit;
|
||||
@ -2127,7 +2127,7 @@ begin
|
||||
//Send a LM_(SYS)CHAR
|
||||
CharMsg.Msg := LM_CharMsg[IsSysKey];
|
||||
|
||||
NotifyApplicationUserInput(LCLObject, CharMsg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@CharMsg)^);
|
||||
|
||||
if not CanSendLCLMessage then
|
||||
exit;
|
||||
@ -2254,7 +2254,7 @@ begin
|
||||
DebugLn('TGtk3Widget.GtkEventMouse ',dbgsName(LCLObject),
|
||||
' msg=',dbgs(msg.Msg), ' point=',dbgs(Msg.XPos),',',dbgs(Msg.YPos));
|
||||
{$ENDIF}
|
||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||
NotifyApplicationUserInput(LCLObject, PLMessage(@Msg)^);
|
||||
Event^.button.send_event := NO_PROPAGATION_TO_PARENT;
|
||||
|
||||
if (SavedHandle <> PtrUInt(Self)) or (LCLObject = nil) or (FWidget = nil) then
|
||||
|
Loading…
Reference in New Issue
Block a user