From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BlFcg-0002zG-TG for qemu-devel@nongnu.org; Thu, 15 Jul 2004 19:26:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BlFcg-0002yq-60 for qemu-devel@nongnu.org; Thu, 15 Jul 2004 19:26:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlFcg-0002yn-2x for qemu-devel@nongnu.org; Thu, 15 Jul 2004 19:26:42 -0400 Received: from [38.113.3.61] (helo=babyruth.hotpop.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlFZp-0006aa-UG for qemu-devel@nongnu.org; Thu, 15 Jul 2004 19:23:46 -0400 Received: from phreaker.net (kubrick.hotpop.com [38.113.3.103]) by babyruth.hotpop.com (Postfix) with SMTP id C64C66C5452 for ; Thu, 15 Jul 2004 22:37:22 +0000 (UTC) Received: from jbrown.mylinuxbox.org (pcp03144805pcs.midval01.tn.comcast.net [68.59.228.236]) by smtp-1.hotpop.com (Postfix) with ESMTP id 576801A01C8 for ; Thu, 15 Jul 2004 22:14:56 +0000 (UTC) Date: Thu, 15 Jul 2004 19:23:38 -0400 From: "Jim C. Brown" Subject: Re: [Qemu-devel] no-sdl-grab patch Message-ID: <20040715232338.GA6710@jbrown.mylinuxbox.org> References: <20040715225908.GA6237@jbrown.mylinuxbox.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: <20040715225908.GA6237@jbrown.mylinuxbox.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 15, 2004 at 06:59:08PM -0400, Jim C. Brown wrote: > I'm looking into adding this into the monitor, so you can toggle this in a > running qemu session. > Simplier than I thought. Attached is the patch to toggle it in the monitor. Just type "sdl_grab_toggle" or "sdl" for short. Apply on top of my previous patch. -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu.diff" --- fresh.qemu/monitor.c Thu Jul 15 13:17:52 2004 +++ qemu/monitor.c Thu Jul 15 19:11:17 2004 @@ -681,6 +681,12 @@ qemu_system_reset_request(); } +static void do_sdl_grab_toggle(void) +{ + grab_with_sdl = !grab_with_sdl; + term_printf("Grab with SDL is now set to: %s\n", grab_with_sdl ? "On" : "Off"); +} + static term_cmd_t term_cmds[] = { { "help|?", "s?", do_help, "[cmd]", "show the help" }, @@ -723,6 +729,8 @@ "keys", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1')" }, { "system_reset", "", do_system_reset, "", "reset the system" }, + { "sdl|sdl_grab_toggle", "", do_sdl_grab_toggle, + "", "toggles SDL mouse grabbing vs mouse pointer following" }, { NULL, NULL, }, }; --IS0zKkzwUGydFO0o--