mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +02:00
* Fix for 7892 by Paul Ishenin
git-svn-id: trunk@10682 -
This commit is contained in:
parent
8e235a6696
commit
231cfe8497
@ -4607,11 +4607,29 @@ end;
|
|||||||
procedure ReleaseMouseCapture;
|
procedure ReleaseMouseCapture;
|
||||||
var
|
var
|
||||||
OldMouseCaptureWidget: PGtkWidget;
|
OldMouseCaptureWidget: PGtkWidget;
|
||||||
|
Info: PWidgetInfo;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseMouseCapture}
|
{$IFDEF VerboseMouseCapture}
|
||||||
DebugLn('ReleaseMouseCapture ',dbgs(ord(MouseCaptureType)),' MouseCaptureWidget=[',GetWidgetDebugReport(MouseCaptureWidget),']');
|
DebugLn('ReleaseMouseCapture ',dbgs(ord(MouseCaptureType)),' MouseCaptureWidget=[',GetWidgetDebugReport(MouseCaptureWidget),']');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if MouseCaptureType=mctGTK then exit;
|
if MouseCaptureType=mctGTK then
|
||||||
|
begin
|
||||||
|
Info := GetWidgetInfo(gtk_grab_get_current, false);
|
||||||
|
if (Info <> nil) and (Info^.CoreWidget <> nil) then
|
||||||
|
begin
|
||||||
|
if GtkWidgetIsA(Info^.CoreWidget, gtk_list_get_type) then
|
||||||
|
begin
|
||||||
|
// Paul Ishenin:
|
||||||
|
// listbox grabs pointer and other control for itself, when we click on lisebox item
|
||||||
|
// aslo it change its state to drag_selection
|
||||||
|
// this is not expected in LCL and as result cause bugs, such as 7892
|
||||||
|
// so we need end drag selection manually
|
||||||
|
OldMouseCaptureWidget := Info^.CoreWidget;
|
||||||
|
gtk_list_end_drag_selection(PGtkList(OldMouseCaptureWidget));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
OldMouseCaptureWidget:=MouseCaptureWidget;
|
OldMouseCaptureWidget:=MouseCaptureWidget;
|
||||||
MouseCaptureWidget:=nil;
|
MouseCaptureWidget:=nil;
|
||||||
MouseCaptureType:=mctGTK;
|
MouseCaptureType:=mctGTK;
|
||||||
|
Loading…
Reference in New Issue
Block a user