Include a Other Software section in Help file
[geeqie.git] / src / fullscreen.c
index 4ae884c..54b2160 100644 (file)
@@ -240,6 +240,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
                                      &screen, &fs->same_region);
 
        fs->window = window_new(GTK_WINDOW_TOPLEVEL, "fullscreen", NULL, NULL, _("Full screen"));
+       DEBUG_NAME(fs->window);
 
        g_signal_connect(G_OBJECT(fs->window), "delete_event",
                         G_CALLBACK(fullscreen_delete_cb), fs);
@@ -248,14 +249,6 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
        gtk_window_set_decorated(GTK_WINDOW(fs->window), FALSE);
        gtk_container_set_border_width(GTK_CONTAINER(fs->window), 0);
 
-       /* make window fullscreen -- let Gtk do it's job, don't screw it in any way */
-       gtk_window_fullscreen(GTK_WINDOW(fs->window));
-
-       /* move it to requested screen */
-       if (options->fullscreen.screen >= 0) {
-               gtk_window_set_screen(GTK_WINDOW(fs->window), screen);
-       }
-
        /* keep window above others, if requested */
        if (options->fullscreen.above) {
                gtk_window_set_keep_above(GTK_WINDOW(fs->window), TRUE);
@@ -281,6 +274,23 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
                        GDK_HINT_WIN_GRAVITY | GDK_HINT_USER_POS | GDK_HINT_USER_SIZE);
 
        gtk_widget_realize(fs->window);
+#if GTK_CHECK_VERSION(3,8,0)
+       if ((options->fullscreen.screen % 100) == 0)
+               {
+               GdkWindow *gdkwin;
+               gdkwin = gtk_widget_get_window(fs->window);
+               if (gdkwin != NULL)
+                       gdk_window_set_fullscreen_mode(gdkwin, GDK_FULLSCREEN_ON_ALL_MONITORS);
+               }
+#endif
+       /* make window fullscreen -- let Gtk do it's job, don't screw it in any way */
+       gtk_window_fullscreen(GTK_WINDOW(fs->window));
+
+       /* move it to requested screen */
+       if (options->fullscreen.screen >= 0)
+               {
+               gtk_window_set_screen(GTK_WINDOW(fs->window), screen);
+               }
 
        fs->imd = image_new(FALSE);
 
@@ -300,12 +310,12 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
 
        if (fs->same_region)
                {
-               DEBUG_0("Original window is not visible, enabling std. fullscreen mode");
+               DEBUG_2("Original window is not visible, enabling std. fullscreen mode");
                image_move_from_image(fs->imd, fs->normal_imd);
                }
        else
                {
-               DEBUG_0("Original window is still visible, enabling presentation fullscreen mode");
+               DEBUG_2("Original window is still visible, enabling presentation fullscreen mode");
                image_copy_from_image(fs->imd, fs->normal_imd);
                }
 
@@ -323,14 +333,15 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
        /* set timer to block screen saver */
        fs->saver_block_id = g_timeout_add(60 * 1000, fullscreen_saver_block_cb, fs);
 
-       /* hide normal window
-        * FIXME: properly restore this window on show
+       /* hide normal window */
+        /** @FIXME properly restore this window on show
         */
        if (fs->same_region)
                {
-#ifdef HIDE_WINDOW_IN_FULLSCREEN
-               gtk_widget_hide(fs->normal_window);
-#endif
+               if (options->hide_window_in_fullscreen)
+                       {
+                       gtk_widget_hide(fs->normal_window);
+                       }
                image_change_fd(fs->normal_imd, NULL, image_zoom_get(fs->normal_imd));
                }
 
@@ -350,9 +361,10 @@ void fullscreen_stop(FullScreenData *fs)
        if (fs->same_region)
                {
                image_move_from_image(fs->normal_imd, fs->imd);
-#ifdef HIDE_WINDOW_IN_FULLSCREEN
-               gtk_widget_show(fs->normal_window);
-#endif
+               if (options->hide_window_in_fullscreen)
+                       {
+                       gtk_widget_show(fs->normal_window);
+                       }
                if (options->stereo.enable_fsmode)
                        {
                        image_stereo_set(fs->normal_imd, options->stereo.mode);
@@ -646,6 +658,7 @@ GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value,
        if (!screen_value) return NULL;
 
        vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       DEBUG_NAME(vbox);
        hbox = pref_box_new(vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        if (text) pref_label_new(hbox, text);