Sparta_DockedFormEditor: GTK2: Fixed mouse default event handler creation. Issue #32199

git-svn-id: trunk@56053 -
This commit is contained in:
michl 2017-10-14 15:03:46 +00:00
parent ecfce9f8b0
commit a66ce4f9b5

View File

@ -2074,15 +2074,21 @@ var
end;
end;
if (LastMouse.Down) and
(not (gdk_event_get_type(Event) in [GDK_BUTTON_PRESS, gdk_2button_press, gdk_3button_press]))
then begin
{$IFDEF VerboseMouseBugfix}
DebugLn('DeliverMouseDownMessage: NO CLICK: LastMouse.Down=',dbgs(LastMouse.Down),
' Event^.theType=',dbgs(gdk_event_get_type(Event)));
{$ENDIF}
Exit;
end;
if (LastMouse.Down) then
if (gdk_event_get_type(Event) in [GDK_BUTTON_PRESS, gdk_2button_press, gdk_3button_press]) then
begin
// After a LastMouse.Down has to follow a LastMouse.Up. Issue #32199
if LastMouse.WinControl <> AWinControl then
Exit;
end
else
begin
{$IFDEF VerboseMouseBugfix}
DebugLn('DeliverMouseDownMessage: NO CLICK: LastMouse.Down=',dbgs(LastMouse.Down),
' Event^.theType=',dbgs(gdk_event_get_type(Event)));
{$ENDIF}
Exit;
end;
if (LastMouse.Down) and (gdk_event_get_type(Event) = GDK_BUTTON_PRESS) and
(csDesigning in AWinControl.ComponentState) then