summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
diff options
context:
space:
mode:
authorCristian Iorga <cristian.iorga@intel.com>2014-01-08 12:13:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:16:48 +0000
commit37a0775984ea89e03c6d30a487bf069af75d3c83 (patch)
tree342d114adaac0067c666bc5b477b56b83a20b30d /meta/recipes-devtools/qemu/qemu/disable-grabs.patch
parentae1ca61bd4b0f2f742040ca35fc7a562e80c89ae (diff)
downloadpoky-37a0775984ea89e03c6d30a487bf069af75d3c83.tar.gz
qemu: upgrade to 1.7.0
linux-user-Handle-SOCK_CLOEXEC-NONBLOCK-if-unavailab.patch file no longer needed, included in upstream. qemu-native tested on all architectures, host machine is Ubuntu Linux 13.10 x86-64. Basic X11 and networking tests performed. (From OE-Core rev: 0f81a4b17ab9ea1b3cc69629aec3f3d2176f8153) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/disable-grabs.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/disable-grabs.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
new file mode 100644
index 0000000000..41726b1c87
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -0,0 +1,72 @@
1When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
2XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
3a pointer grab (screen is locked, a menu is open) then qemu will hang until the
4grab can be taken. In the specific case of a headless X server on an autobuilder, once
5the screensaver has kicked in any qemu instance that appears underneath the
6pointer will hang.
7
8I'm not entirely sure why pointer grabs are required (the documentation
9explicitly says it doesn't do grabs when using a tablet, which we are) so wrap
10them in a conditional that can be set by the autobuilder environment, preserving
11the current grabbing behaviour for everyone else.
12
13Upstream-Status: Pending
14Signed-off-by: Ross Burton <ross.burton@intel.com>
15
16From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
17From: Ross Burton <ross.burton@intel.com>
18Date: Wed, 18 Sep 2013 14:04:54 +0100
19Subject: [PATCH] sdl.c: allow user to disable pointer grabs
20
21Signed-off-by: Ross Burton <ross.burton@intel.com>
22Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
23---
24 ui/sdl.c | 12 ++++++++++--
25 1 file changed, 10 insertions(+), 2 deletions(-)
26
27diff --git a/ui/sdl.c b/ui/sdl.c
28index 39a42d6..9b8abe5 100644
29--- a/ui/sdl.c
30+++ b/ui/sdl.c
31@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
32 static SDL_PixelFormat host_format;
33 static int scaling_active = 0;
34 static Notifier mouse_mode_notifier;
35+#ifndef True
36+#define True 1
37+#endif
38+static doing_grabs = True;
39
40 static void sdl_update(DisplayChangeListener *dcl,
41 int x, int y, int w, int h)
42@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
43 SDL_WarpMouse(guest_x, guest_y);
44 } else
45 sdl_hide_cursor();
46- SDL_WM_GrabInput(SDL_GRAB_ON);
47+ if (doing_grabs)
48+ SDL_WM_GrabInput(SDL_GRAB_ON);
49 gui_grab = 1;
50 sdl_update_caption();
51 }
52
53 static void sdl_grab_end(void)
54 {
55- SDL_WM_GrabInput(SDL_GRAB_OFF);
56+ if (doing_grabs)
57+ SDL_WM_GrabInput(SDL_GRAB_OFF);
58 gui_grab = 0;
59 sdl_show_cursor();
60 sdl_update_caption();
61@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
62 * This requires SDL >= 1.2.14. */
63 setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
64
65+ doing_grabs = (getenv("QEMU_DONT_GRAB") == NULL);
66+
67 flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
68 if (SDL_Init (flags)) {
69 fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
70--
711.8.3.1
72