diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-06-01 10:29:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-04 15:15:00 +0100 |
commit | dfc9dd521bedc0ab2591c22d699be5cc6e159e57 (patch) | |
tree | c499c2e87c59ef6e3b5a55e9e0a8b1babb8a0d24 /meta/recipes-devtools/qemu/qemu/disable-grabs.patch | |
parent | f1eb044403b543e1122656d89280ea5202783a78 (diff) | |
download | poky-dfc9dd521bedc0ab2591c22d699be5cc6e159e57.tar.gz |
qemu: refresh patches with devtool and make them applicable with git
(From OE-Core rev: e8fb42f3a54e8b8d68ae216a48534fa745ea99f1)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@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.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch deleted file mode 100644 index 77117890f4..0000000000 --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls | ||
2 | XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already | ||
3 | a pointer grab (screen is locked, a menu is open) then qemu will hang until the | ||
4 | grab can be taken. In the specific case of a headless X server on an autobuilder, once | ||
5 | the screensaver has kicked in any qemu instance that appears underneath the | ||
6 | pointer will hang. | ||
7 | |||
8 | I'm not entirely sure why pointer grabs are required (the documentation | ||
9 | explicitly says it doesn't do grabs when using a tablet, which we are) so wrap | ||
10 | them in a conditional that can be set by the autobuilder environment, preserving | ||
11 | the current grabbing behaviour for everyone else. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
15 | |||
16 | From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001 | ||
17 | From: Ross Burton <ross.burton@intel.com> | ||
18 | Date: Wed, 18 Sep 2013 14:04:54 +0100 | ||
19 | Subject: [PATCH] sdl.c: allow user to disable pointer grabs | ||
20 | |||
21 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
22 | Signed-off-by: Eric BĂ©nard <eric@eukrea.com> | ||
23 | --- | ||
24 | ui/sdl.c | 12 ++++++++++-- | ||
25 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
26 | |||
27 | Index: qemu-2.11.1/ui/sdl.c | ||
28 | =================================================================== | ||
29 | --- qemu-2.11.1.orig/ui/sdl.c | ||
30 | +++ qemu-2.11.1/ui/sdl.c | ||
31 | @@ -63,6 +63,10 @@ static SDL_PixelFormat host_format; | ||
32 | static int scaling_active = 0; | ||
33 | static Notifier mouse_mode_notifier; | ||
34 | static int idle_counter; | ||
35 | +#ifndef True | ||
36 | +#define True 1 | ||
37 | +#endif | ||
38 | +static doing_grabs = True; | ||
39 | |||
40 | #define SDL_REFRESH_INTERVAL_BUSY 10 | ||
41 | #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \ | ||
42 | @@ -431,14 +435,16 @@ static void sdl_grab_start(void) | ||
43 | } | ||
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 | @@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds, | ||
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", | ||