mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
lcl: don't compare old capture control with new in SetCaptureControl, do it in any case. Read description in comment. Fixes issue #13615.
git-svn-id: trunk@19705 -
This commit is contained in:
parent
4a1309f268
commit
469effabc4
@ -2646,7 +2646,7 @@ end;
|
|||||||
|
|
||||||
procedure SetCaptureControl(Control: TControl);
|
procedure SetCaptureControl(Control: TControl);
|
||||||
var
|
var
|
||||||
OldCaptureWinControl: TWinControl;
|
// OldCaptureWinControl: TWinControl;
|
||||||
NewCaptureWinControl: TWinControl;
|
NewCaptureWinControl: TWinControl;
|
||||||
begin
|
begin
|
||||||
//DebugLn('SetCaptureControl Old=',DbgSName(CaptureControl),' New=',DbgSName(Control));
|
//DebugLn('SetCaptureControl Old=',DbgSName(CaptureControl),' New=',DbgSName(Control));
|
||||||
@ -2663,7 +2663,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OldCaptureWinControl := FindOwnerControl(GetCapture);
|
// OldCaptureWinControl := FindOwnerControl(GetCapture);
|
||||||
if Control is TWinControl then
|
if Control is TWinControl then
|
||||||
NewCaptureWinControl := TWinControl(Control)
|
NewCaptureWinControl := TWinControl(Control)
|
||||||
else
|
else
|
||||||
@ -2680,16 +2680,22 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if NewCaptureWinControl = OldCaptureWinControl then
|
// Paul: don't uncomment. Intf call is needed since some widgetsets can install
|
||||||
begin
|
// capture themselves and release capture. Thus we can be in situation when we
|
||||||
{$IFDEF VerboseMouseCapture}
|
// get widgetset installed capture and don't install our own, later widgetset
|
||||||
DebugLN('SetCaptureControl Keep WinControl ',DbgSName(NewCaptureWinControl),
|
// releases its own capture and we have no capture. Such behavior was registered
|
||||||
' switch Control ',DbgSName(Control));
|
// on windows and it cased a bug #13615
|
||||||
{$ENDIF}
|
|
||||||
// just change the CaptureControl, intf call not needed
|
// if NewCaptureWinControl = OldCaptureWinControl then
|
||||||
CaptureControl := Control;
|
// begin
|
||||||
Exit;
|
// {$IFDEF VerboseMouseCapture}
|
||||||
end;
|
// DebugLN('SetCaptureControl Keep WinControl ',DbgSName(NewCaptureWinControl),
|
||||||
|
// ' switch Control ',DbgSName(Control));
|
||||||
|
// {$ENDIF}
|
||||||
|
// CaptureControl := Control;
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
|
||||||
// switch capture control
|
// switch capture control
|
||||||
{$IFDEF VerboseMouseCapture}
|
{$IFDEF VerboseMouseCapture}
|
||||||
|
Loading…
Reference in New Issue
Block a user