Fix virt-viewer fullscreen widget (bz #1036824)

This commit is contained in:
Cole Robinson 2014-10-29 15:17:38 -04:00
parent b6a0a2c095
commit d6011d26f0
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 3bbaa914d9bfafaf5a4d78867a578bddf5fc9134 Mon Sep 17 00:00:00 2001
Message-Id: <3bbaa914d9bfafaf5a4d78867a578bddf5fc9134.1414608565.git.crobinso@redhat.com>
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Wed, 29 Oct 2014 16:13:46 +0000
Subject: [PATCH] Enable double buffering on GTK3
---
src/vncdisplay.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index c47f8ee..b990f97 100644
--- a/gtk-vnc-0.5.3/src/vncdisplay.c
+++ b/gtk-vnc-0.5.3/src/vncdisplay.c
@@ -2186,7 +2186,19 @@ static void vnc_display_init(VncDisplay *display)
GDK_LEAVE_NOTIFY_MASK |
GDK_SCROLL_MASK |
GDK_KEY_PRESS_MASK);
+ /* We already have off-screen buffers we render to
+ * but with GTK-3 there are problems with overlaid
+ * windows. We end up rendering over the top of the
+ * child overlaid windows despite having a clip
+ * mask set :-( We've turned on GTK3's built-in
+ * double buffering to work around this until we
+ * find a better idea.
+ */
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_set_double_buffered(widget, TRUE);
+#else
gtk_widget_set_double_buffered(widget, FALSE);
+#endif
priv = display->priv = VNC_DISPLAY_GET_PRIVATE(display);
memset(priv, 0, sizeof(VncDisplayPrivate));
--
2.1.0

View File

@ -20,10 +20,13 @@
Summary: A GTK2 widget for VNC clients
Name: gtk-vnc
Version: 0.5.3
Release: 5%{?dist}%{?extra_release}
Release: 6%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz
# Fix virt-viewer fullscreen widget (bz #1036824)
Patch0001: 0001-Enable-double-buffering-on-GTK3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL: http://live.gnome.org/gtk-vnc
Requires: gvnc = %{version}-%{release}
@ -154,6 +157,9 @@ Libraries, includes, etc. to compile with the gtk-vnc library
%prep
%setup -q -n gtk-vnc-%{version} -c
# Fix virt-viewer fullscreen widget (bz #1036824)
%patch0001 -p1
%if %{with_gtk3}
cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
%endif
@ -323,6 +329,9 @@ rm -fr %{buildroot}
%endif
%changelog
* Wed Oct 29 2014 Cole Robinson <crobinso@redhat.com> - 0.5.3-6
- Fix virt-viewer fullscreen widget (bz #1036824)
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild