# HG changeset patch # User Jiri Bohac # Date 1544139022 -3600 # Node ID 87640dd90e16bcada17c08ec9894c4f226400978 # Parent b20a96b979a3f0d3060998371f498ccb9134f2c2 Fix fullscreen spanning multiple monitors Commit a16635c ("Fix fullscreen - remove all the garbage which breaks things and let Gtk do its job.") broke fullscreen spanning multiple monitors. Fix this for GTK3 by using gdk_window_set_fullscreen_mode(). Fixes #650. Unfortunately, GTK2 has no equivalent. diff -r b20a96b979a3 -r 87640dd90e16 src/fullscreen.c --- a/src/fullscreen.c Sat Nov 03 17:53:31 2018 +0000 +++ b/src/fullscreen.c Fri Dec 07 00:30:22 2018 +0100 @@ -248,13 +248,6 @@ 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) { @@ -281,6 +274,22 @@ 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);