Create the keyboard surface every time it is needed

Icons are still blurry the first time the keyboard is shown after
rotation.
This commit is contained in:
David Boddie
2019-07-24 14:04:28 +00:00
parent ea15f69e73
commit 1246776328

View File

@ -697,11 +697,12 @@ eek_renderer_real_render_keyboard (EekRenderer *self,
g_return_if_fail (priv->allocation_width > 0.0);
g_return_if_fail (priv->allocation_height > 0.0);
if (!priv->keyboard_surface) {
priv->keyboard_surface = cairo_surface_create_for_rectangle (
cairo_get_target (cr), 0, 0,
priv->allocation_width, priv->allocation_height);
}
if (priv->keyboard_surface)
cairo_surface_destroy (priv->keyboard_surface);
priv->keyboard_surface = cairo_surface_create_for_rectangle (
cairo_get_target (cr), 0, 0,
priv->allocation_width, priv->allocation_height);
render_keyboard_surface (self);