mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
apprt/gtk: only set cursor on shape change if its visible
This commit is contained in:
@ -803,8 +803,12 @@ pub fn setMouseShape(
|
||||
};
|
||||
errdefer c.g_object_unref(cursor);
|
||||
|
||||
// Set our new cursor
|
||||
c.gtk_widget_set_cursor(@ptrCast(self.gl_area), cursor);
|
||||
// Set our new cursor. We only do this if the cursor we currently
|
||||
// have is NOT set to "none" because setting the cursor causes it
|
||||
// to become visible again.
|
||||
if (c.gtk_widget_get_cursor(@ptrCast(self.gl_area)) != self.app.cursor_none) {
|
||||
c.gtk_widget_set_cursor(@ptrCast(self.gl_area), cursor);
|
||||
}
|
||||
|
||||
// Free our existing cursor
|
||||
if (self.cursor) |old| c.g_object_unref(old);
|
||||
|
Reference in New Issue
Block a user