From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Cc: qemu-devel@nongnu.org, kraxel@redhat.com, mst@redhat.com
Subject: Re: [RFC PATCH 1/2] gtk: Make sure widget is realized before updating
Date: Fri, 10 Mar 2023 09:20:18 +0400 [thread overview]
Message-ID: <CAMxuvaxej1ALDJy4jJvf8D8TucbW3ZNWNo3o1E0Bys3PdAaGMA@mail.gmail.com> (raw)
In-Reply-To: <20230308162548.1766359-2-dhobsong@igel.co.jp>
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
On Wed, Mar 8, 2023 at 8:26 PM Damian Hobson-Garcia <dhobsong@igel.co.jp>
wrote:
> Check that a widget has a window before trying
> to update its contents.
> ---
> ui/gtk.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index fd82e9b1ca..e4e0980323 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -340,6 +340,10 @@ static void gd_update_full_redraw(VirtualConsole *vc)
> {
> GtkWidget *area = vc->gfx.drawing_area;
> int ww, wh;
> +
> + if (!gtk_widget_get_realized(area)) {
> + return;
> + }
> ww = gdk_window_get_width(gtk_widget_get_window(area));
> wh = gdk_window_get_height(gtk_widget_get_window(area));
> #if defined(CONFIG_OPENGL)
> --
> 2.25.1
>
>
[-- Attachment #2: Type: text/html, Size: 1422 bytes --]
next prev parent reply other threads:[~2023-03-10 5:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 16:25 [RFC PATCH 0/2] Enable additional display heads on guest launch Damian Hobson-Garcia
2023-03-08 16:25 ` [RFC PATCH 1/2] gtk: Make sure widget is realized before updating Damian Hobson-Garcia
2023-03-10 5:20 ` Marc-André Lureau [this message]
2023-03-08 16:25 ` [RFC PATCH 2/2] virtio-gpu: Add an option to connect all outputs on startup Damian Hobson-Garcia
2023-03-29 20:57 ` Damian Hobson-Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMxuvaxej1ALDJy4jJvf8D8TucbW3ZNWNo3o1E0Bys3PdAaGMA@mail.gmail.com \
--to=marcandre.lureau@redhat.com \
--cc=dhobsong@igel.co.jp \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).