mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:36:17 +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);
|
||||
var
|
||||
WidgetInfo: PWidgetInfo;
|
||||
NewCursor: HCURSOR;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetCursor')
|
||||
then Exit;
|
||||
|
||||
if ACursor <> Screen.Cursors[crDefault] then
|
||||
NewCursor := ACursor
|
||||
else
|
||||
NewCursor := 0;
|
||||
WidgetInfo := GetWidgetInfo({%H-}Pointer(AWinControl.Handle));
|
||||
if WidgetInfo^.ControlCursor <> NewCursor then
|
||||
if WidgetInfo^.ControlCursor <> ACursor then
|
||||
begin
|
||||
WidgetInfo^.ControlCursor := NewCursor;
|
||||
WidgetInfo^.ControlCursor := ACursor;
|
||||
TGtkPrivateWidgetClass(AWinControl.WidgetSetClass.WSPrivate).UpdateCursor(WidgetInfo);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user