forked from AuroraMiddleware/gtk
macos: add re-entrancy check when monitors change
This commit is contained in:
parent
e9abcde031
commit
e5238bf54f
@ -75,6 +75,7 @@ struct _GdkMacosSurface
|
|||||||
guint geometry_dirty : 1;
|
guint geometry_dirty : 1;
|
||||||
guint next_frame_set : 1;
|
guint next_frame_set : 1;
|
||||||
guint show_on_next_swap : 1;
|
guint show_on_next_swap : 1;
|
||||||
|
guint in_change_monitor : 1;
|
||||||
guint in_frame : 1;
|
guint in_frame : 1;
|
||||||
guint awaiting_frame : 1;
|
guint awaiting_frame : 1;
|
||||||
};
|
};
|
||||||
|
@ -1061,6 +1061,11 @@ _gdk_macos_surface_monitor_changed (GdkMacosSurface *self)
|
|||||||
|
|
||||||
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
|
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
|
||||||
|
|
||||||
|
if (self->in_change_monitor)
|
||||||
|
return;
|
||||||
|
|
||||||
|
self->in_change_monitor = TRUE;
|
||||||
|
|
||||||
_gdk_macos_surface_cancel_frame (self);
|
_gdk_macos_surface_cancel_frame (self);
|
||||||
|
|
||||||
rect.x = self->root_x;
|
rect.x = self->root_x;
|
||||||
@ -1129,6 +1134,8 @@ _gdk_macos_surface_monitor_changed (GdkMacosSurface *self)
|
|||||||
|
|
||||||
_gdk_macos_surface_configure (self);
|
_gdk_macos_surface_configure (self);
|
||||||
gdk_surface_invalidate_rect (GDK_SURFACE (self), NULL);
|
gdk_surface_invalidate_rect (GDK_SURFACE (self), NULL);
|
||||||
|
|
||||||
|
self->in_change_monitor = FALSE;
|
||||||
_gdk_macos_surface_request_frame (self);
|
_gdk_macos_surface_request_frame (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user