Fix #1037: Fullscreen loads black
authorColin Clark <colin.clark@cclark.uk>
Tue, 25 Oct 2022 14:09:35 +0000 (15:09 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 25 Oct 2022 14:09:35 +0000 (15:09 +0100)
The problem occurs when zoom is set to Original Size.
An extra reload is required to force the image to be displayed.
This is probably not the correct solution.

src/img-view.cc
src/layout-image.cc

index 60b209a..aa34677 100644 (file)
@@ -989,6 +989,7 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat
         * The problem occurs when zoom is set to Original Size and Preload
         * Next Image is set.
         * An extra reload is required to force the image to be displayed.
+        * See also layout-image.cc layout_image_full_screen_start()
         * This is probably not the correct solution.
         **/
        image_reload(vw->imd);
index b60a81d..ca19282 100644 (file)
@@ -103,6 +103,14 @@ void layout_image_full_screen_start(LayoutWindow *lw)
 
        image_osd_copy_status(lw->full_screen->normal_imd, lw->image);
        layout_image_animate_update_image(lw);
+
+       /** @FIXME This is a hack to fix #1037 Fullscreen loads black
+        * The problem occurs when zoom is set to Original Size.
+        * An extra reload is required to force the image to be displayed.
+        * See also image-view.cc real_view_window_new()
+        * This is probably not the correct solution.
+        **/
+       image_reload(lw->image);
 }
 
 void layout_image_full_screen_stop(LayoutWindow *lw)