* [Qemu-devel] [PULL for-2.3 0/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized
@ 2015-03-26 17:03 Gerd Hoffmann
2015-03-26 17:03 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2015-03-26 19:31 ` [Qemu-devel] [PULL for-2.3 0/1] " Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-03-26 17:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 1/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized
2015-03-26 17:03 [Qemu-devel] [PULL for-2.3 0/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized Gerd Hoffmann
@ 2015-03-26 17:03 ` Gerd Hoffmann
2015-03-26 19:31 ` [Qemu-devel] [PULL for-2.3 0/1] " Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-03-26 17:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau, Gerd Hoffmann
From: Hervé Poussineau <hpoussin@reactos.org>
This prevents gtk_widget_get_window to return a NULL pointer.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 6a81076..51abac9 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL for-2.3 0/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized
2015-03-26 17:03 [Qemu-devel] [PULL for-2.3 0/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized Gerd Hoffmann
2015-03-26 17:03 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
@ 2015-03-26 19:31 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2015-03-26 19:31 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 26 March 2015 at 17:03, Gerd Hoffmann <kraxel@redhat.com> wrote:
> 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(+)
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-26 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 17:03 [Qemu-devel] [PULL for-2.3 0/1] gtk: do not call gtk_widget_get_window if drawing area is not initialized Gerd Hoffmann
2015-03-26 17:03 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2015-03-26 19:31 ` [Qemu-devel] [PULL for-2.3 0/1] " 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).