gtk: make default UI (v5)
A user can still enable SDL with '-sdl' or '-display sdl' but start making the default display GTK by default. I'd also like to deprecate the SDL display and remove it in a few releases. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1361367806-4599-9-git-send-email-aliguori@us.ibm.com
This commit is contained in:
parent
834574ea89
commit
15546425c5
48
vl.c
48
vl.c
@ -2206,6 +2206,13 @@ static DisplayType select_display(const char *p)
|
|||||||
#else
|
#else
|
||||||
fprintf(stderr, "Curses support is disabled\n");
|
fprintf(stderr, "Curses support is disabled\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
#endif
|
||||||
|
} else if (strstart(p, "gtk", &opts)) {
|
||||||
|
#ifdef CONFIG_GTK
|
||||||
|
display = DT_GTK;
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "GTK support is disabled\n");
|
||||||
|
exit(1);
|
||||||
#endif
|
#endif
|
||||||
} else if (strstart(p, "none", &opts)) {
|
} else if (strstart(p, "none", &opts)) {
|
||||||
display = DT_NONE;
|
display = DT_NONE;
|
||||||
@ -3999,6 +4006,28 @@ int main(int argc, char **argv, char **envp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (using_spice) {
|
||||||
|
display_remote++;
|
||||||
|
}
|
||||||
|
if (display_type == DT_DEFAULT && !display_remote) {
|
||||||
|
#if defined(CONFIG_GTK)
|
||||||
|
display_type = DT_GTK;
|
||||||
|
#elif defined(CONFIG_SDL) || defined(CONFIG_COCOA)
|
||||||
|
display_type = DT_SDL;
|
||||||
|
#elif defined(CONFIG_VNC)
|
||||||
|
vnc_display = "localhost:0,to=99";
|
||||||
|
show_vnc_port = 1;
|
||||||
|
#else
|
||||||
|
display_type = DT_NONE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_GTK)
|
||||||
|
if (display_type == DT_GTK) {
|
||||||
|
early_gtk_display_init();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
socket_init();
|
socket_init();
|
||||||
|
|
||||||
if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, 1) != 0)
|
if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, 1) != 0)
|
||||||
@ -4227,20 +4256,6 @@ int main(int argc, char **argv, char **envp)
|
|||||||
/* just use the first displaystate for the moment */
|
/* just use the first displaystate for the moment */
|
||||||
ds = get_displaystate();
|
ds = get_displaystate();
|
||||||
|
|
||||||
if (using_spice)
|
|
||||||
display_remote++;
|
|
||||||
if (display_type == DT_DEFAULT && !display_remote) {
|
|
||||||
#if defined(CONFIG_SDL) || defined(CONFIG_COCOA)
|
|
||||||
display_type = DT_SDL;
|
|
||||||
#elif defined(CONFIG_VNC)
|
|
||||||
vnc_display = "localhost:0,to=99";
|
|
||||||
show_vnc_port = 1;
|
|
||||||
#else
|
|
||||||
display_type = DT_NONE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* init local displays */
|
/* init local displays */
|
||||||
switch (display_type) {
|
switch (display_type) {
|
||||||
case DT_NOGRAPHIC:
|
case DT_NOGRAPHIC:
|
||||||
@ -4258,6 +4273,11 @@ int main(int argc, char **argv, char **envp)
|
|||||||
case DT_SDL:
|
case DT_SDL:
|
||||||
cocoa_display_init(ds, full_screen);
|
cocoa_display_init(ds, full_screen);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_GTK)
|
||||||
|
case DT_GTK:
|
||||||
|
gtk_display_init(ds);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user