From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefan Weil <sw@weilnetz.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui
Date: Mon, 20 Feb 2012 18:20:05 -0600 [thread overview]
Message-ID: <4F42E335.3040303@codemonkey.ws> (raw)
In-Reply-To: <4F42B0DB.8060704@weilnetz.de>
On 02/20/2012 02:45 PM, Stefan Weil wrote:
> Am 20.02.2012 00:45, schrieb Anthony Liguori:
>> This is minimalistic and just contains the basic widget infrastructure. The GUI
>> consists of a menu and a GtkNotebook. To start with, the notebook has its tabs
>> hidden which provides a UI that looks very similar to SDL with the exception of
>> the menu bar.
>>
>> The menu bar allows a user to toggle the visibility of the tabs. Cairo is used
>> for rendering.
>>
>> I used gtk-vnc as a reference. gtk-vnc solves the same basic problems as QEMU
>> since it was originally written as a remote display for QEMU. So for the most
>> part, the approach to rendering and keyboard handling should be pretty solid for
>> GTK.
>>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>> Makefile | 2 +
>> Makefile.objs | 1 +
>> configure | 25 +++-
>> console.h | 4 +
>> sysemu.h | 1 +
>> ui/gtk.c | 551 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 6 files changed, 583 insertions(+), 1 deletions(-)
>> create mode 100644 ui/gtk.c
>>
>
> This patch compiles, but does not provide the minimalistic interface
> because the hooks in vl.c are missing. Parts of patch 6 might be
> moved to patch 2.
Yes, that's intentional in order to avoid bad bisecting. I could make a
-display gtk flag though and just not make it the default until the last patch.
I'll update accordingly.
> Patch 2 could also be improved by removing the dependency on VTE.
> For some platforms (w32), providing VTE is really a big challenge.
> I did not find a precompiled version and still did not succeed
> in compiling it because of a large and still incomplete dependency
> chain...
I'm not a big fan of this. Would hosting dependencies on qemu.org help address
this problem?
In order to do this, we would have to have mirror all of the dependencies onto
git.qemu.org and create a super repository with submodules and a build script to
cross compile all of the dependencies. I don't think it's a huge effort.
> What about offering compilation without VTE also in the "final"
> version of the GTK gui (--enable-vte, --disable-vte)?
That's a pretty significant reduction in functionality. I'd rather try to
provide the dependencies directly.
>
> These includes in ui/gtk.c were not needed:
>
> +#include <vte/vte.h>
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <sys/un.h>
> +#include <sys/wait.h>
> +#include <pty.h>
>
> If the version using VTE needs them, qemu_socket.h should be
> used (needed for w32 which does neither have sys/socket.h
> nor pty.h). Maybe most of these includes are not needed at all
> (relict from VNC?).
They are needed but not in this patch. I missed this bit as I was extracting
patches.
>
> With a patched vl.c and ui/gtk.c, the new GUI starts on w32
> but does not work stable.
> After some minutes, the GUI freezes (no more updates, menu no
> longer working).
My guess is that this has to do with the way the Win32 main loops work. I'm
not sure how to fix this since IIUC, the problem is that we basically have two
loops for Win32, one that calls select() on fds and another that uses
WaitForEvent or whatever the win32 function is.
> The configuration support still does not work as expected:
>
> configure should support --enable-gtk, --disable-gtk with the
> usual semantic (no GTK UI if --disable-gtk was given, fail if
> --enable-gtk was given and GTK is not found, provide help message).
Oh, I'll look into that. I expect that it should work.
> The GTK user interface is a good starting point for a more
> powerful and user friendly interface.
>
> Nevertheless SDL should not be removed for the next few years.
> I would not mind if buggy features like zooming were removed
> from SDL again, but having a GUI which also works with framebuffers
> (without X) and which has much less requirements than GTK+-2.0
> (and perhaps also a reduced risk of security problems)
> is a good feature.
As I mentioned in another thread, I'd be very happy to keep the SDL interface if
we removed the ugly bits (like the virtual console emulation).
>
> Cheers,
> Stefan Weil
>
> PS: git complains about whitespace at eol in some of the patches,
> and checkpatch.pl is also very noisy :-)
Yes, I'm aware. I'll address it in the next round.
Thanks for the feedback.
Regards,
Anthony Liguori
>
>
next prev parent reply other threads:[~2012-02-21 0:20 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 23:44 [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility Anthony Liguori
2012-02-19 23:44 ` [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI Anthony Liguori
2012-02-20 9:17 ` Gerd Hoffmann
2012-02-20 13:45 ` Anthony Liguori
2012-02-20 13:59 ` Gerd Hoffmann
2012-02-20 14:11 ` Anthony Liguori
2012-02-20 14:27 ` Gerd Hoffmann
2012-02-20 15:10 ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui Anthony Liguori
2012-02-20 20:45 ` Stefan Weil
2012-02-21 0:20 ` Anthony Liguori [this message]
2012-02-19 23:45 ` [Qemu-devel] [PATCH 3/6] gtk: add virtual console support Anthony Liguori
2012-02-20 21:13 ` Stefan Weil
2012-02-25 16:21 ` Stefan Weil
2012-02-25 19:49 ` Anthony Liguori
2012-02-25 20:22 ` Stefan Weil
2012-02-25 21:18 ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 4/6] gtk: add support for input grabbing Anthony Liguori
2012-02-20 0:09 ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 5/6] gtk: add support for screen scaling and full screen Anthony Liguori
2012-02-20 7:41 ` Paolo Bonzini
2012-02-20 13:45 ` Anthony Liguori
2012-02-25 15:49 ` Stefan Weil
2012-02-19 23:45 ` [Qemu-devel] [PATCH 6/6] gtk: make default UI Anthony Liguori
2012-02-20 0:15 ` Roy Tam
2012-02-20 1:10 ` Anthony Liguori
2012-02-20 1:50 ` Roy Tam
2012-02-20 2:22 ` Anthony Liguori
2012-02-20 2:24 ` Brad Smith
2012-02-20 2:44 ` Anthony Liguori
2012-02-20 2:50 ` Roy Tam
2012-02-20 2:52 ` Brad Smith
2012-02-20 3:04 ` Anthony Liguori
2012-02-20 14:06 ` Stefano Stabellini
2012-02-20 14:07 ` Anthony Liguori
2012-02-20 14:44 ` Stefano Stabellini
2012-02-20 14:46 ` Roy Tam
2012-02-19 23:59 ` [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility Anthony Liguori
2012-02-20 12:17 ` Kevin Wolf
2012-02-20 12:47 ` Kevin Wolf
2012-02-20 14:08 ` Anthony Liguori
2012-02-20 14:04 ` Anthony Liguori
2012-02-20 14:33 ` Kevin Wolf
2012-02-25 17:02 ` Stefan Weil
2012-02-25 20:11 ` Anthony Liguori
2012-02-25 21:15 ` Stefan Weil
2012-02-25 21:47 ` [Qemu-devel] Very small VGA window sizes (was: Re: [PATCH 0/6] Add GTK UI to enable basic accessibility) Stefan Weil
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=4F42E335.3040303@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).