mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:20:30 +02:00
LCL-Gtk2: Fixed coordinates in MouseMove/MouseDown events (regression after e916d8bc16
).
Patch by Alexander (Rouse_) Bagel, issue #40726.
This commit is contained in:
parent
6a1aea3ed2
commit
ac1d49467b
@ -4654,6 +4654,7 @@ function GetWidgetClientOrigin(TheWidget: PGtkWidget): TPoint;
|
||||
|
||||
var
|
||||
ClientWidget: PGtkWidget;
|
||||
WidgetInfo: PWidgetInfo;
|
||||
ClientWindow: PGdkWindow;
|
||||
LCLObject: TObject;
|
||||
begin
|
||||
@ -4669,7 +4670,11 @@ begin
|
||||
LCLObject := GetLCLObject(ClientWidget);
|
||||
if (LCLObject is TWinControl) and (TWinControl(LCLObject).Parent = nil)
|
||||
and not (csDesigning in TWinControl(LCLObject).ComponentState) then
|
||||
Exit(TWinControl(LCLObject).BoundsRect.TopLeft);
|
||||
begin
|
||||
WidgetInfo := GetWidgetInfo(ClientWidget);
|
||||
if Assigned(WidgetInfo) and (WidgetInfo^.FormBorderStyle = 0) then
|
||||
Exit(TWinControl(LCLObject).BoundsRect.TopLeft);
|
||||
end;
|
||||
end;
|
||||
{$IFDEF DebugGDK}
|
||||
BeginGDKErrorTrap;
|
||||
|
Loading…
Reference in New Issue
Block a user