mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
mir: don't ensure_surface if window not visible
This commit is contained in:
parent
064f28fcbc
commit
bd71b801de
@ -418,7 +418,7 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
|
||||
{
|
||||
cairo_surface = cairo_image_surface_create (pixel_format, window->width, window->height);
|
||||
}
|
||||
else
|
||||
else if (impl->visible)
|
||||
{
|
||||
ensure_surface (window);
|
||||
|
||||
@ -431,6 +431,8 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
|
||||
region.height,
|
||||
region.stride);
|
||||
}
|
||||
else
|
||||
cairo_surface = cairo_image_surface_create (pixel_format, 0, 0);
|
||||
|
||||
impl->cairo_surface = cairo_surface_reference (cairo_surface);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user