forked from AuroraMiddleware/gtk
popover: use GtkNative opaque region API
This updates GtkPopover to use the new GtkNative abstraction for reporting opaque regions of the window, in hopes that it can speed up compositors for things like animated lists, menu transitions, and more. Fixes #4689
This commit is contained in:
parent
f8e7ecfde1
commit
f3999f7ebf
@ -957,6 +957,8 @@ gtk_popover_realize (GtkWidget *widget)
|
||||
priv->renderer = gsk_renderer_new_for_surface (priv->surface);
|
||||
|
||||
gtk_native_realize (GTK_NATIVE (popover));
|
||||
|
||||
gtk_native_update_opaque_region (GTK_NATIVE (popover), priv->contents_widget, TRUE, TRUE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1392,6 +1394,9 @@ gtk_popover_update_shape (GtkPopover *popover)
|
||||
gdk_surface_set_input_region (priv->surface, region);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
if (_gtk_widget_get_realized (GTK_WIDGET (popover)))
|
||||
gtk_native_update_opaque_region (GTK_NATIVE (popover), priv->contents_widget, TRUE, TRUE, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user