GTK3: Fixed setting cursor on widgets.

Closes: #40374. Thanks To: Anton Kavalenka.

When the widget doesn't have a window, we fall back to parent's one.
This commit is contained in:
Abou Al Montacir 2023-11-24 19:59:54 +01:00
parent fa8e8eeecf
commit 3256ff9246

View File

@ -3203,7 +3203,10 @@ begin
SetWindowCursor(GetContainerWidget^.window, ACursor, False, True)
else
if Widget^.get_has_window and Gtk3IsGdkWindow(Widget^.window) then
SetWindowCursor(Widget^.window, ACursor, False, True);
SetWindowCursor(Widget^.window, ACursor, False, True)
else // fallback for window-less widgets
if Assigned(self.getParent) then
Self.getParent.SetCursor(ACursor);
end;
end;