Fix gtk UI crash when switching to monitor (bz #1333424)
Fix sdl2 UI lockup lockup when switching to monitor Rebased to qemu-2.6.0-rc5
This commit is contained in:
parent
bc7ce050b0
commit
35faab4c45
@ -1,13 +1,9 @@
|
||||
From ce63c44a0e88db0ff6ea7eceb5ac56139b93ad89 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ce63c44a0e88db0ff6ea7eceb5ac56139b93ad89.1461326482.git.crobinso@redhat.com>
|
||||
From: Pavel Grunt <pgrunt@redhat.com>
|
||||
Date: Fri, 11 Mar 2016 14:40:59 +0100
|
||||
Subject: [PATCH] spice: F24 spice has backported gl support
|
||||
|
||||
Not for upstream, this just adjusts the version check to work with
|
||||
f24 backported spice gl support
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
include/ui/spice-display.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
@ -25,6 +21,3 @@ index 30ccfe3..00e4a0b 100644
|
||||
# define HAVE_SPICE_GL 1
|
||||
# include "ui/egl-helpers.h"
|
||||
# include "ui/egl-context.h"
|
||||
--
|
||||
2.7.3
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu, 5 May 2016 19:39:38 -0400
|
||||
Subject: [PATCH] ui: gtk: fix crash when terminal inner-border is NULL
|
||||
|
||||
VTE terminal inner-border can be NULL. The vte-0.36 (API 2.90)
|
||||
code checks for the condition too so I assume it's not just a bug
|
||||
|
||||
Fixes a crash on Fedora 24 with gtk 3.20
|
||||
---
|
||||
ui/gtk.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/ui/gtk.c b/ui/gtk.c
|
||||
index f372a6d..9876d89 100644
|
||||
--- a/ui/gtk.c
|
||||
+++ b/ui/gtk.c
|
||||
@@ -340,10 +340,12 @@ static void gd_update_geometry_hints(VirtualConsole *vc)
|
||||
geo.min_height = geo.height_inc * VC_TERM_Y_MIN;
|
||||
mask |= GDK_HINT_MIN_SIZE;
|
||||
gtk_widget_style_get(vc->vte.terminal, "inner-border", &ib, NULL);
|
||||
- geo.base_width += ib->left + ib->right;
|
||||
- geo.base_height += ib->top + ib->bottom;
|
||||
- geo.min_width += ib->left + ib->right;
|
||||
- geo.min_height += ib->top + ib->bottom;
|
||||
+ if (ib) {
|
||||
+ geo.base_width += ib->left + ib->right;
|
||||
+ geo.base_height += ib->top + ib->bottom;
|
||||
+ geo.min_width += ib->left + ib->right;
|
||||
+ geo.min_height += ib->top + ib->bottom;
|
||||
+ }
|
||||
geo_widget = vc->vte.terminal;
|
||||
#endif
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri, 6 May 2016 12:36:46 -0400
|
||||
Subject: [PATCH] ui: sdl2: Release grab before opening console window
|
||||
|
||||
sdl 2.0.4 currently has a bug which causes our UI shortcuts to fire
|
||||
rapidly in succession:
|
||||
|
||||
https://bugzilla.libsdl.org/show_bug.cgi?id=3287
|
||||
|
||||
It's a toss up whether ctrl+alt+f or ctrl+alt+2 will fire an
|
||||
odd or even number of times, thus determining whether the action
|
||||
succeeds or fails.
|
||||
|
||||
Opening monitor/serial windows is doubly broken, since it will often
|
||||
lock the UI trying to grab the pointer:
|
||||
|
||||
0x00007fffef3720a5 in SDL_Delay_REAL () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef3688ba in X11_SetWindowGrab () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef2f2da7 in SDL_SendWindowEvent () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef2f080b in SDL_SetKeyboardFocus () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef35d784 in X11_DispatchFocusIn.isra.8 () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef35dbce in X11_DispatchEvent () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef35ee4a in X11_PumpEvents () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef2eea6a in SDL_PumpEvents_REAL () at /lib64/libSDL2-2.0.so.0
|
||||
0x00007fffef2eeab5 in SDL_WaitEventTimeout_REAL () at /lib64/libSDL2-2.0.so.0
|
||||
0x000055555597eed0 in sdl2_poll_events (scon=0x55555876f928) at ui/sdl2.c:593
|
||||
|
||||
We can work around that hang by ungrabbing the pointer before launching
|
||||
a new window. This roughly matches what our sdl1 code does
|
||||
---
|
||||
ui/sdl2.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/ui/sdl2.c b/ui/sdl2.c
|
||||
index d042442..909038f 100644
|
||||
--- a/ui/sdl2.c
|
||||
+++ b/ui/sdl2.c
|
||||
@@ -357,6 +357,10 @@ static void handle_keydown(SDL_Event *ev)
|
||||
case SDL_SCANCODE_7:
|
||||
case SDL_SCANCODE_8:
|
||||
case SDL_SCANCODE_9:
|
||||
+ if (gui_grab) {
|
||||
+ sdl_grab_end(scon);
|
||||
+ }
|
||||
+
|
||||
win = ev->key.keysym.scancode - SDL_SCANCODE_1;
|
||||
if (win < sdl2_num_outputs) {
|
||||
sdl2_console[win].hidden = !sdl2_console[win].hidden;
|
13
qemu.spec
13
qemu.spec
@ -39,7 +39,7 @@
|
||||
%endif
|
||||
|
||||
# Release candidate version tracking
|
||||
%global rcver rc4
|
||||
%global rcver rc5
|
||||
%if 0%{?rcver:1}
|
||||
%global rcstr -%{rcver}
|
||||
%endif
|
||||
@ -83,6 +83,12 @@ Source21: 50-kvm-s390x.conf
|
||||
# Adjust spice gl version check to expect F24 backported version
|
||||
# Not for upstream, f24 only
|
||||
Patch0001: 0001-spice-F24-spice-has-backported-gl-support.patch
|
||||
# Fix gtk UI crash when switching to monitor (bz #1333424)
|
||||
# Not upstream yet
|
||||
Patch0002: 0002-ui-gtk-fix-crash-when-terminal-inner-border-is-NULL.patch
|
||||
# Fix sdl2 UI lockup lockup when switching to monitor
|
||||
# Not upstream yet
|
||||
Patch0003: 0003-ui-sdl2-Release-grab-before-opening-console-window.patch
|
||||
|
||||
|
||||
BuildRequires: SDL2-devel
|
||||
@ -1192,6 +1198,11 @@ getent passwd qemu >/dev/null || \
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon May 09 2016 Cole Robinson <crobinso@redhat.com> - 2:2.6.0-0.2.rc5
|
||||
- Fix gtk UI crash when switching to monitor (bz #1333424)
|
||||
- Fix sdl2 UI lockup lockup when switching to monitor
|
||||
- Rebased to qemu-2.6.0-rc5
|
||||
|
||||
* Mon May 02 2016 Cole Robinson <crobinso@redhat.com> 2:2.6.0-0.2.rc4
|
||||
- Rebased to version 2.6.0-rc4
|
||||
- Fix test suite on big endian hosts (bz 1330174)
|
||||
|
Loading…
x
Reference in New Issue
Block a user