Skip to content

Commit

Permalink
Make fullscreen mode actually use the full screen.
Browse files Browse the repository at this point in the history
Use override-redirect to ensure fullscreen windows are drawn over any
docks and panels.

Bug: http://sourceforge.net/support/tracker.php?aid=2925034
Bug-Ubuntu: https://launchpad.net/bugs/788321
  • Loading branch information
vanvugt authored and zas committed Aug 16, 2012
1 parent b0a5325 commit 04b70c6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/fullscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
gint x, y;
gint w, h;
GdkGeometry geometry;
GdkWindow *gdkwin;

if (!window || !imd) return NULL;

Expand Down Expand Up @@ -244,15 +245,14 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
*/
gtk_window_fullscreen(GTK_WINDOW(fs->window));
}
else if (options->fullscreen.above)
else
{
/* request to be above other windows */
gtk_window_set_keep_above(GTK_WINDOW(fs->window), TRUE);
gtk_window_set_screen(GTK_WINDOW(fs->window), screen);
if (options->fullscreen.above)
gtk_window_set_keep_above(GTK_WINDOW(fs->window), TRUE);
}

gtk_window_set_resizable(GTK_WINDOW(fs->window), FALSE);

gtk_window_set_screen(GTK_WINDOW(fs->window), screen);
gtk_container_set_border_width(GTK_CONTAINER(fs->window), 0);
g_signal_connect(G_OBJECT(fs->window), "delete_event",
G_CALLBACK(fullscreen_delete_cb), fs);
Expand All @@ -279,6 +279,11 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
gtk_window_set_default_size(GTK_WINDOW(fs->window), w, h);
gtk_window_move(GTK_WINDOW(fs->window), x, y);

gtk_widget_realize(fs->window);
gdkwin = gtk_widget_get_window(fs->window);
if (gdkwin != NULL)
gdk_window_set_override_redirect(gdkwin, TRUE);

fs->imd = image_new(FALSE);

gtk_container_add(GTK_CONTAINER(fs->window), fs->imd->widget);
Expand Down

0 comments on commit 04b70c6

Please sign in to comment.