From patchwork Sun Feb 19 23:45:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 142089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7878FB6FA8 for ; Mon, 20 Feb 2012 10:59:39 +1100 (EST) Received: from localhost ([::1]:39519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzGSw-00040K-Qf for incoming@patchwork.ozlabs.org; Sun, 19 Feb 2012 18:46:50 -0500 Received: from eggs.gnu.org ([140.186.70.92]:54096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzGRh-0000dT-8F for qemu-devel@nongnu.org; Sun, 19 Feb 2012 18:45:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzGRf-0000mG-BA for qemu-devel@nongnu.org; Sun, 19 Feb 2012 18:45:33 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:39006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzGRe-0000m3-Oi for qemu-devel@nongnu.org; Sun, 19 Feb 2012 18:45:31 -0500 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 19 Feb 2012 16:45:29 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 19 Feb 2012 16:45:27 -0700 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 786331FF0048 for ; Sun, 19 Feb 2012 16:45:26 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1JNjQYU157454 for ; Sun, 19 Feb 2012 16:45:26 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1JNjPd2002263 for ; Sun, 19 Feb 2012 16:45:25 -0700 Received: from titi.austin.rr.com (sig-9-65-240-157.mts.ibm.com [9.65.240.157]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q1JNj64h001215; Sun, 19 Feb 2012 16:45:23 -0700 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Sun, 19 Feb 2012 17:45:04 -0600 Message-Id: <1329695104-15174-7-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1329695104-15174-1-git-send-email-aliguori@us.ibm.com> References: <1329695104-15174-1-git-send-email-aliguori@us.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12021923-6148-0000-0000-000003952E70 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.110.153 Cc: Anthony Liguori , Alex Graf Subject: [Qemu-devel] [PATCH 6/6] gtk: make default UI X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org A user can still enable SDL with '-sdl' or '-display sdl' but start making the default display GTK by default. I'd also like to deprecate the SDL display and remove it in a few releases. Signed-off-by: Anthony Liguori --- vl.c | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/vl.c b/vl.c index d8a521a..ad0b726 100644 --- a/vl.c +++ b/vl.c @@ -3220,6 +3220,25 @@ int main(int argc, char **argv, char **envp) add_device_config(DEV_VIRTCON, "vc:80Cx24C"); } + if (display_type == DT_DEFAULT) { +#if defined(CONFIG_GTK) + display_type = DT_GTK; +#elif defined(CONFIG_SDL) || defined(CONFIG_COCOA) + display_type = DT_SDL; +#elif defined(CONFIG_VNC) + vnc_display = "localhost:0,to=99"; + show_vnc_port = 1; +#else + display_type = DT_NONE; +#endif + } + +#if defined(CONFIG_GTK) + if (display_type == DT_GTK) { + early_gtk_display_init(); + } +#endif + socket_init(); if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, 1) != 0) @@ -3418,20 +3437,6 @@ int main(int argc, char **argv, char **envp) /* just use the first displaystate for the moment */ ds = get_displaystate(); - if (using_spice) - display_remote++; - if (display_type == DT_DEFAULT && !display_remote) { -#if defined(CONFIG_SDL) || defined(CONFIG_COCOA) - display_type = DT_SDL; -#elif defined(CONFIG_VNC) - vnc_display = "localhost:0,to=99"; - show_vnc_port = 1; -#else - display_type = DT_NONE; -#endif - } - - /* init local displays */ switch (display_type) { case DT_NOGRAPHIC: @@ -3450,6 +3455,11 @@ int main(int argc, char **argv, char **envp) cocoa_display_init(ds, full_screen); break; #endif +#if defined(CONFIG_GTK) + case DT_GTK: + gtk_display_init(ds); + break; +#endif default: break; }