mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:09:19 +02:00
LCL-GTK2: Change the mouse cursor when moving over controls. Issue #30728.
git-svn-id: trunk@53101 -
This commit is contained in:
parent
897ddc96eb
commit
ca343fe6d1
@ -784,19 +784,14 @@ end;
|
|||||||
class procedure TGtk2WSWinControl.SetCursor(const AWinControl: TWinControl; const ACursor: HCursor);
|
class procedure TGtk2WSWinControl.SetCursor(const AWinControl: TWinControl; const ACursor: HCursor);
|
||||||
var
|
var
|
||||||
WidgetInfo: PWidgetInfo;
|
WidgetInfo: PWidgetInfo;
|
||||||
NewCursor: HCURSOR;
|
|
||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(AWinControl, 'SetCursor')
|
if not WSCheckHandleAllocated(AWinControl, 'SetCursor')
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
if ACursor <> Screen.Cursors[crDefault] then
|
|
||||||
NewCursor := ACursor
|
|
||||||
else
|
|
||||||
NewCursor := 0;
|
|
||||||
WidgetInfo := GetWidgetInfo({%H-}Pointer(AWinControl.Handle));
|
WidgetInfo := GetWidgetInfo({%H-}Pointer(AWinControl.Handle));
|
||||||
if WidgetInfo^.ControlCursor <> NewCursor then
|
if WidgetInfo^.ControlCursor <> ACursor then
|
||||||
begin
|
begin
|
||||||
WidgetInfo^.ControlCursor := NewCursor;
|
WidgetInfo^.ControlCursor := ACursor;
|
||||||
TGtkPrivateWidgetClass(AWinControl.WidgetSetClass.WSPrivate).UpdateCursor(WidgetInfo);
|
TGtkPrivateWidgetClass(AWinControl.WidgetSetClass.WSPrivate).UpdateCursor(WidgetInfo);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user