diff --git a/src/app-grid-folder-button.c b/src/app-grid-folder-button.c index 05e4b28798082b6f08e2a488db6652b1f661eaab..bed953a4b05ccabc0cc5d1634283e4da014cd042 100644 --- a/src/app-grid-folder-button.c +++ b/src/app-grid-folder-button.c @@ -116,6 +116,7 @@ build_2x2_grid_icon (PhoshAppGridFolderButton *self) image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON); } + gtk_image_set_pixel_size (GTK_IMAGE (image), 16); gtk_widget_set_visible (image, TRUE); gtk_grid_attach (self->grid, image, i % 2, i >= 2, 1, 1); } diff --git a/src/background-manager.c b/src/background-manager.c index 47b99397cfae5d6cd7b7de8320a6e588ee7b590b..7250d02efceaa960b5764549a42766c29cca44fe 100644 --- a/src/background-manager.c +++ b/src/background-manager.c @@ -449,6 +449,11 @@ phosh_background_manager_get_data (PhoshBackgroundManager *self, PhoshBackground width = phosh_layer_surface_get_configured_width (PHOSH_LAYER_SURFACE (background)); height = phosh_layer_surface_get_configured_height (PHOSH_LAYER_SURFACE (background)); + if (width <= 0 || height <= 0) { + g_critical ("Layer surface not yet configured"); + return g_steal_pointer (&bg_data); + } + g_assert (GNOME_BG_IS_SLIDE_SHOW (self->slideshow)); /* TODO: handle actual slideshows (fixed == false) */ diff --git a/src/background.c b/src/background.c index 178ce225b9a0f5bee327ed55639f873f50f97f88..5333aa47af5400e963e5f70fc89a4c139677de4f 100644 --- a/src/background.c +++ b/src/background.c @@ -455,5 +455,12 @@ phosh_background_needs_update (PhoshBackground *self) { g_return_if_fail (PHOSH_IS_BACKGROUND (self)); + /* Skip update if layer surface isn't yet configured, it will + * trigger on layer_surface.configured anyway */ + if (phosh_layer_surface_get_configured_width (PHOSH_LAYER_SURFACE (self)) <= 0 || + phosh_layer_surface_get_configured_height (PHOSH_LAYER_SURFACE (self)) <= 0) { + return; + } + trigger_update (self); }