* [Qemu-devel] [PULL 0/1] gtk patch queue
@ 2015-06-11 9:58 Gerd Hoffmann
2015-06-11 9:58 ` [Qemu-devel] [PULL 1/1] gtk: don't exit early in case gtk init fails Gerd Hoffmann
2015-06-11 11:12 ` [Qemu-devel] [PULL 0/1] gtk patch queue Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-06-11 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
gtk patch queue featuring a single bugfix.
please pull,
Gerd
The following changes since commit 0e12e61ff9a3407d123d0dbc4d945aec98d60fdf:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150610-1' into staging (2015-06-10 18:13:58 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-gtk-20150611-1
for you to fetch changes up to 060ab76356fff6a420bc881a574c40a5dda086af:
gtk: don't exit early in case gtk init fails (2015-06-11 11:37:56 +0200)
----------------------------------------------------------------
gtk: don't exit early in case gtk init fails
----------------------------------------------------------------
Gerd Hoffmann (1):
gtk: don't exit early in case gtk init fails
ui/gtk.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 1/1] gtk: don't exit early in case gtk init fails
2015-06-11 9:58 [Qemu-devel] [PULL 0/1] gtk patch queue Gerd Hoffmann
@ 2015-06-11 9:58 ` Gerd Hoffmann
2015-06-11 11:12 ` [Qemu-devel] [PULL 0/1] gtk patch queue Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-06-11 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
---
ui/gtk.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 126326a..df2a79e 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1917,12 +1917,19 @@ static void gd_set_keycode_type(GtkDisplayState *s)
#endif
}
+static gboolean gtkinit;
+
void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
{
GtkDisplayState *s = g_malloc0(sizeof(*s));
char *filename;
GdkDisplay *window_display;
+ if (!gtkinit) {
+ fprintf(stderr, "gtk initialization failed\n");
+ exit(1);
+ }
+
s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
#if GTK_CHECK_VERSION(3, 2, 0)
s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -2003,7 +2010,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
void early_gtk_display_init(int opengl)
{
- gtk_init(NULL, NULL);
+ gtkinit = gtk_init_check(NULL, NULL);
+ if (!gtkinit) {
+ /* don't exit yet, that'll break -help */
+ return;
+ }
switch (opengl) {
case -1: /* default */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL 0/1] gtk patch queue
2015-06-11 9:58 [Qemu-devel] [PULL 0/1] gtk patch queue Gerd Hoffmann
2015-06-11 9:58 ` [Qemu-devel] [PULL 1/1] gtk: don't exit early in case gtk init fails Gerd Hoffmann
@ 2015-06-11 11:12 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2015-06-11 11:12 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 11 June 2015 at 10:58, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> gtk patch queue featuring a single bugfix.
>
> please pull,
> Gerd
>
> The following changes since commit 0e12e61ff9a3407d123d0dbc4d945aec98d60fdf:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150610-1' into staging (2015-06-10 18:13:58 +0100)
>
> are available in the git repository at:
>
>
> git://git.kraxel.org/qemu tags/pull-gtk-20150611-1
>
> for you to fetch changes up to 060ab76356fff6a420bc881a574c40a5dda086af:
>
> gtk: don't exit early in case gtk init fails (2015-06-11 11:37:56 +0200)
>
> ----------------------------------------------------------------
> gtk: don't exit early in case gtk init fails
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-11 11:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 9:58 [Qemu-devel] [PULL 0/1] gtk patch queue Gerd Hoffmann
2015-06-11 9:58 ` [Qemu-devel] [PULL 1/1] gtk: don't exit early in case gtk init fails Gerd Hoffmann
2015-06-11 11:12 ` [Qemu-devel] [PULL 0/1] gtk patch queue Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).