All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] Move getting XWindow ID from baum driver to graphical backend
Date: Wed, 26 Oct 2016 12:17:44 +0200	[thread overview]
Message-ID: <1477477064.18984.39.camel@redhat.com> (raw)
In-Reply-To: <20161023195433.20102-4-samuel.thibault@ens-lyon.org>

On So, 2016-10-23 at 21:54 +0200, Samuel Thibault wrote:
> This adds two console functions, qemu_console_set_window_id and
> qemu_graphic_console_get_window_id, to let graphical backend record the
> window id in the QemuConsole structure, and let the baum driver read it.
> 
> We can then move the SDL code from the baum driver to the sdl ui code,
> and add SDL2 and Gtk versions of the code.

Patches 1+2 look good to me, but I don't feel like rushing this one
before the freeze.  Also splitting this up would be nice.

> +int qemu_graphic_console_get_window_id(void)
> +{
> +    int i;
> +    for (i = 0; i < nb_consoles; i++) {
> +        if (consoles[i]->console_type == GRAPHIC_CONSOLE) {
> +            return consoles[i]->window_id;
> +        }
> +    }
> +    return -1;
> +}

No loop needed here.  qemu sorts consoles so the graphic ones come
first.

> +    gdk_window = gtk_widget_get_window(s->window);
> +#ifdef GDK_WINDOWING_X11
> +    window_id = GDK_WINDOW_XID(gdk_window);
> +#elif defined(GDK_WINDOWING_WIN32)
> +    window_id = gdk_win32_window_get_impl_hwnd(gdk_window);
> +#endif
> +    for (i = 0; ; i++) {
> +        /* All consoles share the same window */

No.  That is the default setup, but try "View / Detach tab".  Window ID
changing at runtime ...

cheers,
  Gerd

  reply	other threads:[~2016-10-26 10:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 19:54 [Qemu-devel] [PATCHv2 0/3] baum driver update v2 Samuel Thibault
2016-10-23 19:54 ` [Qemu-devel] [PATCH 1/3] Add dots keypresses support to the baum braille device Samuel Thibault
2016-10-26 12:37   ` Gerd Hoffmann
2016-10-26 15:14     ` Samuel Thibault
2016-10-27 11:29       ` Gerd Hoffmann
2016-10-23 19:54 ` [Qemu-devel] [PATCH 2/3] Defer BrlAPI tty acquisition to when guest starts using device Samuel Thibault
2016-10-23 19:54 ` [Qemu-devel] [PATCH 3/3] Move getting XWindow ID from baum driver to graphical backend Samuel Thibault
2016-10-26 10:17   ` Gerd Hoffmann [this message]
2016-10-26 11:35     ` Samuel Thibault
2016-10-26 12:24       ` Gerd Hoffmann
2016-10-30 15:24     ` Samuel Thibault
2016-11-01 10:03       ` Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2016-10-23 18:47 [Qemu-devel] [PATCH 0/3] baum driver update Samuel Thibault
2016-10-23 18:47 ` [Qemu-devel] [PATCH 3/3] Move getting XWindow ID from baum driver to graphical backend Samuel Thibault

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=1477477064.18984.39.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.