aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ui/console.h2
-rw-r--r--ui/gtk.c6
-rw-r--r--vl.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index 4307b5fe88..f1d79f92a4 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -339,6 +339,6 @@ int index_from_keycode(int code);
/* gtk.c */
void early_gtk_display_init(void);
-void gtk_display_init(DisplayState *ds);
+void gtk_display_init(DisplayState *ds, bool full_screen);
#endif
diff --git a/ui/gtk.c b/ui/gtk.c
index 63f6081913..e314dba343 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1435,7 +1435,7 @@ static const DisplayChangeListenerOps dcl_ops = {
.dpy_cursor_define = gd_cursor_define,
};
-void gtk_display_init(DisplayState *ds)
+void gtk_display_init(DisplayState *ds, bool full_screen)
{
GtkDisplayState *s = g_malloc0(sizeof(*s));
char *filename;
@@ -1511,6 +1511,10 @@ void gtk_display_init(DisplayState *ds)
gtk_widget_show_all(s->window);
+ if (full_screen) {
+ gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item));
+ }
+
register_displaychangelistener(&s->dcl);
global_state = s;
diff --git a/vl.c b/vl.c
index 180fddea39..169c8072aa 100644
--- a/vl.c
+++ b/vl.c
@@ -4348,7 +4348,7 @@ int main(int argc, char **argv, char **envp)
#endif
#if defined(CONFIG_GTK)
case DT_GTK:
- gtk_display_init(ds);
+ gtk_display_init(ds, full_screen);
break;
#endif
default: