gtk: do not call gtk_widget_get_window if drawing area is not initialized
Hi,
gtk patch queue with a single fix.
please pull,
Gerd
The following changes since commit 054903a832b865eb5432d79b5c9d1e1ff31b58d7:
Update version for v2.3.0-rc1 release (2015-03-24 16:34:16 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-gtk-20150326-1
for you to fetch changes up to 4cdfc93526364bc9b20a21c9edd802d737cec85f:
gtk: do not call gtk_widget_get_window if drawing area is not initialized (2015-03-26 17:58:12 +0100)
----------------------------------------------------------------
gtk: do not call gtk_widget_get_window if drawing area is not initialized
----------------------------------------------------------------
Hervé Poussineau (1):
gtk: do not call gtk_widget_get_window if drawing area is not initialized
ui/gtk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
From: Hervé Poussineau <[email protected]>
This prevents gtk_widget_get_window to return a NULL pointer.
--- ui/gtk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
ui/gtk.c +12 -0
@@ -294,6 +294,10 @@ static void gd_update_cursor(VirtualConsole *vc)return ; } +if (!gtk_widget_get_realized (vc->gfx.drawing_area)) { +return ; + } + window =gtk_widget_get_window (GTK_WIDGET (vc->gfx.drawing_area));if (s->full_screen ||qemu_input_is_absolute () || s->ptr_owner == vc) {gdk_window_set_cursor (window, s->null_cursor);
@@ -458,6 +462,10 @@ static void gd_update(DisplayChangeListener *dcl,trace_gd_update (vc->label, x, y, w, h); +if (!gtk_widget_get_realized (vc->gfx.drawing_area)) { +return ; + } +if (vc->gfx.convert) { pixman_image_composite(PIXMAN_OP_SRC, vc->gfx.ds->image, NULL, vc->gfx.convert,
@@ -540,6 +548,10 @@ static void gd_cursor_define(DisplayChangeListener *dcl,GdkPixbuf *pixbuf;GdkCursor *cursor; +if (!gtk_widget_get_realized (vc->gfx.drawing_area)) { +return ; + } + pixbuf = gdk_pixbuf_new_from_data((guchar *)(c->data), GDK_COLORSPACE_RGB, true, 8, c->width, c->height, c->width * 4,
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 22 lines · Gerd Hoffmann
Hi,
gtk patch queue with a single fix.
please pull,
GerdThe following changes since commit
054903a832b865eb5432d79b5c9d1e1ff31b58d7:Update version for v2.3.0-rc1 release (2015-03-24 16:34:16 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/pull-gtk-20150326-1for you to fetch changes up to
4cdfc93526364bc9b20a21c9edd802d737cec85f:gtk: do not call
gtk_widget_get_windowif drawing area is not initialized (2015-03-26 17:58:12 +0100)----------------------------------------------------------------
gtk: do not callgtk_widget_get_windowif drawing area is not initialized
Quoted 7 lines
----------------------------------------------------------------
Hervé Poussineau (1):
gtk: do not callgtk_widget_get_windowif drawing area is not initializedui/gtk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Applied, thanks.
-- PMM