Add upstream patch fixing flickering bug
Accessing wayland guests with Boxes/virt-manager gives a guest which keeps flickering. This patch fixes this. Resolves: rhbz#1266484remotes/origin/f23
parent
6192addf4b
commit
9966f6f37b
|
@ -0,0 +1,81 @@
|
||||||
|
From ec6bfc00f81afddbdcc0fac86d7039385d89c6b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
|
||||||
|
Date: Wed, 23 Mar 2016 17:11:08 +0100
|
||||||
|
Subject: [spice-gtk] main: don't update display timer for unchanged config
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
With virgl, set_monitor_ready() may be called each time the scanout is
|
||||||
|
updated to set the monitor area. This will call
|
||||||
|
spice_main_update_display(), and keep the timer postponed even if the
|
||||||
|
monitor configuration didn't change. Treat unchanged configuration as a
|
||||||
|
no-op and keep configuration timer unchanged. This fixes monitor
|
||||||
|
autoconfig with virgl (when the display is regularly updated).
|
||||||
|
|
||||||
|
It also solves/avoids problems with a guest running on wayland when the
|
||||||
|
"resize-guest" property is TRUE.
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1266484
|
||||||
|
|
||||||
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
|
||||||
|
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
src/channel-main.c | 29 ++++++++++++++++++-----------
|
||||||
|
1 file changed, 18 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/channel-main.c b/src/channel-main.c
|
||||||
|
index 8dd580a..4a1f58a 100644
|
||||||
|
--- a/src/channel-main.c
|
||||||
|
+++ b/src/channel-main.c
|
||||||
|
@@ -121,6 +121,14 @@ typedef enum {
|
||||||
|
DISPLAY_ENABLED,
|
||||||
|
} SpiceDisplayState;
|
||||||
|
|
||||||
|
+typedef struct {
|
||||||
|
+ int x;
|
||||||
|
+ int y;
|
||||||
|
+ int width;
|
||||||
|
+ int height;
|
||||||
|
+ SpiceDisplayState display_state;
|
||||||
|
+} SpiceDisplayConfig;
|
||||||
|
+
|
||||||
|
struct _SpiceMainChannelPrivate {
|
||||||
|
enum SpiceMouseMode mouse_mode;
|
||||||
|
bool agent_connected;
|
||||||
|
@@ -140,13 +148,7 @@ struct _SpiceMainChannelPrivate {
|
||||||
|
guint agent_msg_pos;
|
||||||
|
uint8_t agent_msg_size;
|
||||||
|
uint32_t agent_caps[VD_AGENT_CAPS_SIZE];
|
||||||
|
- struct {
|
||||||
|
- int x;
|
||||||
|
- int y;
|
||||||
|
- int width;
|
||||||
|
- int height;
|
||||||
|
- SpiceDisplayState display_state;
|
||||||
|
- } display[MAX_DISPLAY];
|
||||||
|
+ SpiceDisplayConfig display[MAX_DISPLAY];
|
||||||
|
gint timer_id;
|
||||||
|
GQueue *agent_msg_queue;
|
||||||
|
GHashTable *file_xfer_tasks;
|
||||||
|
@@ -2688,10 +2690,15 @@ void spice_main_update_display(SpiceMainChannel *channel, int id,
|
||||||
|
|
||||||
|
g_return_if_fail(id < SPICE_N_ELEMENTS(c->display));
|
||||||
|
|
||||||
|
- c->display[id].x = x;
|
||||||
|
- c->display[id].y = y;
|
||||||
|
- c->display[id].width = width;
|
||||||
|
- c->display[id].height = height;
|
||||||
|
+ SpiceDisplayConfig display = {
|
||||||
|
+ .x = x, .y = y, .width = width, .height = height,
|
||||||
|
+ .display_state = c->display[id].display_state
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ if (memcmp(&display, &c->display[id], sizeof(SpiceDisplayConfig)) == 0)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ c->display[id] = display;
|
||||||
|
|
||||||
|
if (update)
|
||||||
|
update_display_timer(channel, 1);
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Name: spice-gtk
|
Name: spice-gtk
|
||||||
Version: 0.30
|
Version: 0.30
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A GTK+ widget for SPICE clients
|
Summary: A GTK+ widget for SPICE clients
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
@ -10,6 +10,7 @@ License: LGPLv2+
|
||||||
URL: http://spice-space.org/page/Spice-Gtk
|
URL: http://spice-space.org/page/Spice-Gtk
|
||||||
#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
|
#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
|
||||||
Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
|
Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
|
||||||
|
Patch0: 0001-main-don-t-update-display-timer-for-unchanged-config.patch
|
||||||
|
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: gtk2-devel >= 2.14
|
BuildRequires: gtk2-devel >= 2.14
|
||||||
|
@ -127,7 +128,7 @@ spicy-screenshot is a tool to capture screen-shots of a SPICE desktop.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n spice-gtk-%{version}%{?_version_suffix} -c
|
%setup -n spice-gtk-%{version}%{?_version_suffix} -c
|
||||||
|
|
||||||
if [ -n '%{?_version_suffix}' ]; then
|
if [ -n '%{?_version_suffix}' ]; then
|
||||||
mv spice-gtk-%{version}%{?_version_suffix} spice-gtk-%{version}
|
mv spice-gtk-%{version}%{?_version_suffix} spice-gtk-%{version}
|
||||||
|
@ -135,6 +136,7 @@ fi
|
||||||
|
|
||||||
pushd spice-gtk-%{version}
|
pushd spice-gtk-%{version}
|
||||||
find . -name '*.stamp' | xargs touch
|
find . -name '*.stamp' | xargs touch
|
||||||
|
%autopatch -p1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cp -a spice-gtk-%{version} spice-gtk3-%{version}
|
cp -a spice-gtk-%{version} spice-gtk3-%{version}
|
||||||
|
@ -252,6 +254,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc
|
||||||
%{_bindir}/spicy-stats
|
%{_bindir}/spicy-stats
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 15 2016 Christophe Fergeau <cfergeau@redhat.com> - 0.30-2
|
||||||
|
- Add upstream patch fixing flickering bug
|
||||||
|
Resolves: rhbz#1266484
|
||||||
|
|
||||||
* Tue Oct 06 2015 Christophe Fergeau <cfergeau@redhat.com> 0.30-1
|
* Tue Oct 06 2015 Christophe Fergeau <cfergeau@redhat.com> 0.30-1
|
||||||
- Update to new 0.30 upstream release
|
- Update to new 0.30 upstream release
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue