From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqEaN-0006yn-Vc for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqEaG-0006BO-Ar for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqEaG-0006BE-2x for qemu-devel@nongnu.org; Mon, 09 Dec 2013 23:06:08 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBA467ko008100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Dec 2013 23:06:07 -0500 Received: from dreadlord-bne-redhat-com.bne.redhat.com (dhcp-40-7.bne.redhat.com [10.64.40.7]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBA460lX024007 for ; Mon, 9 Dec 2013 23:06:06 -0500 From: Dave Airlie Date: Tue, 10 Dec 2013 14:05:54 +1000 Message-Id: <1386648358-25892-5-git-send-email-airlied@gmail.com> In-Reply-To: <1386648358-25892-1-git-send-email-airlied@gmail.com> References: <1386648358-25892-1-git-send-email-airlied@gmail.com> Subject: [Qemu-devel] [PATCH 4/8] sdl2: add UI to toggle head 1 on/off List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Dave Airlie This just adds ctrl-alt-n to toggle head 1 on/off for testing and demo purposes. Signed-off-by: Dave Airlie --- ui/sdl2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index dd8cd2b..c52dcd9 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -522,6 +522,13 @@ static void handle_keydown(SDL_Event *ev) if (gui_key_modifier_pressed) { keycode = sdl_keyevent_to_keycode(&ev->key); switch (keycode) { + case 0x31: + /* spawn a new connected monitor if we have one */ + if (sdl2_console[1].surface) + graphic_hw_notify_state(sdl2_console[1].dcl.con, 0, 0, 0, 0); + else + graphic_hw_notify_state(sdl2_console[1].dcl.con, 0, 0, 1024, 768); + break; case 0x21: /* 'f' key on US keyboard */ toggle_full_screen(scon); gui_keysym = 1; -- 1.8.3.1