mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:19:22 +02:00
Gtk2: bugfix where csCaptureMouse cannot be disabled. issue #8178
git-svn-id: trunk@30152 -
This commit is contained in:
parent
2c0ed6c9f9
commit
67aec0c9c4
@ -1310,6 +1310,7 @@ const
|
||||
var
|
||||
DesignOnlySignal: boolean;
|
||||
ShiftState: TShiftState;
|
||||
ACtl: TWinControl;
|
||||
begin
|
||||
Result := CallBackDefaultReturn;
|
||||
|
||||
@ -1360,8 +1361,17 @@ begin
|
||||
Result := CallBackDefaultReturn; // why not True if we want to stop it?
|
||||
end;
|
||||
|
||||
DeliverMouseMoveMessage(Widget,Event,TWinControl(Data));
|
||||
if TControl(Data).FCompStyle = csWinControl then
|
||||
ACtl := TWinControl(Data);
|
||||
if not (csCaptureMouse in ACtl.ControlStyle) and
|
||||
([ssLeft,ssRight,ssMiddle]*ShiftState <> []) and
|
||||
not (ACtl is TCustomForm) and not DragManager.IsDragging then
|
||||
begin
|
||||
if (Event^.x < 0) or (Event^.y < 0) or
|
||||
(Event^.x > ACtl.Width) or (Event^.y > ACtl.Height) then
|
||||
Exit(True);
|
||||
end;
|
||||
DeliverMouseMoveMessage(Widget,Event, ACtl);
|
||||
if ACtl.FCompStyle = csWinControl then
|
||||
Result := True; // stop signal
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user