Update to 6.0 release

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2017-08-15 15:13:32 +01:00
parent 52b6a9cca3
commit 1141ae79f0
3 changed files with 9 additions and 54 deletions

View File

@ -1,48 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jonathon Jongsma <jjongsma@redhat.com>
Date: Fri, 22 Jul 2016 16:43:41 -0500
Subject: [virt-viewer] Fix resizing problem with recent gtk versions
When using client-side decorations, as well as in certain other
situations (wayland, and windows in some cases), the window gradually
resizes larger and larger.
This is caused by a change in how gtk interprets the sizes passed to
gtk_window_resize(), particularly when client-side decorations (CSD) are
involved. For example, In the past this size was assumed to include the
size of the CSD, but now it it assumes that the sizes only represent the
size of the window's content, without any decorations. However,
gtk_widget_get_preferred_size() (when called on a GtkWindow*), returns a
size that includes the size of the CSD. So
virt_viewer_window_queue_resize() was essentially growing the window by
the size of the CSD every time it was called.
To work around this issue, we need to calculate the preferred size of
the window's child, not the size of the entire window (including CSD).
Then we add the width of the window's border (just to be safe) and pass
those values to gtk_window_resize().
---
src/virt-viewer-window.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 7e6b93f..99fd102 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -411,10 +411,14 @@ virt_viewer_window_queue_resize(VirtViewerWindow *self)
{
VirtViewerWindowPrivate *priv = self->priv;
GtkRequisition nat;
+ GtkWidget *child;
+ guint border;
+ border = gtk_container_get_border_width(GTK_CONTAINER(priv->window));
+ child = gtk_bin_get_child(GTK_BIN(priv->window));
gtk_window_set_default_size(GTK_WINDOW(priv->window), -1, -1);
- gtk_widget_get_preferred_size(priv->window, NULL, &nat);
- gtk_window_resize(GTK_WINDOW(priv->window), nat.width, nat.height);
+ gtk_widget_get_preferred_size(child, NULL, &nat);
+ gtk_window_resize(GTK_WINDOW(priv->window), nat.width + border, nat.height + border);
}
static void

View File

@ -1 +1 @@
b30d5ea7715a2f6e12e0e9727abe7cb4 virt-viewer-5.0.tar.gz SHA512 (virt-viewer-6.0.tar.gz) = 656d48f8ab387d025c406cb5f56164d79104c6c377fae37d9c524b90e512fe873d5d1d6c435d4ea95e71468b7d3384b89789495075cafb1a9e67f583f7d49ec2

View File

@ -16,8 +16,8 @@
%endif %endif
Name: virt-viewer Name: virt-viewer
Version: 5.0 Version: 6.0
Release: 4%{?dist}%{?extra_release} Release: 1%{?dist}%{?extra_release}
Summary: Virtual Machine Viewer Summary: Virtual Machine Viewer
Group: Applications/System Group: Applications/System
License: GPLv2+ License: GPLv2+
@ -38,13 +38,13 @@ BuildRequires: libtool
%endif %endif
BuildRequires: pkgconfig(glib-2.0) >= 2.38 BuildRequires: pkgconfig(glib-2.0) >= 2.38
BuildRequires: pkgconfig(gtk+-3.0) >= 3.10 BuildRequires: pkgconfig(gtk+-3.0) >= 3.12
BuildRequires: pkgconfig(libvirt) >= 0.10.0 BuildRequires: pkgconfig(libvirt) >= 0.10.0
BuildRequires: pkgconfig(libvirt-glib-1.0) >= 0.1.8 BuildRequires: pkgconfig(libvirt-glib-1.0) >= 0.1.8
BuildRequires: pkgconfig(libxml-2.0) >= 2.6.0 BuildRequires: pkgconfig(libxml-2.0) >= 2.6.0
BuildRequires: pkgconfig(gtk-vnc-2.0) >= 0.4.0 BuildRequires: pkgconfig(gtk-vnc-2.0) >= 0.4.0
%if %{with_spice} %if %{with_spice}
BuildRequires: pkgconfig(spice-client-gtk-3.0) >= 0.31 BuildRequires: pkgconfig(spice-client-gtk-3.0) >= 0.33
BuildRequires: pkgconfig(spice-protocol) >= 0.12.7 BuildRequires: pkgconfig(spice-protocol) >= 0.12.7
%endif %endif
BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2man
@ -119,7 +119,7 @@ fi
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README COPYING AUTHORS ChangeLog NEWS %doc README.md COPYING AUTHORS ChangeLog NEWS
%{_bindir}/%{name} %{_bindir}/%{name}
%{_bindir}/remote-viewer %{_bindir}/remote-viewer
%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/apps/*
@ -133,6 +133,9 @@ fi
%{_mandir}/man1/remote-viewer.1* %{_mandir}/man1/remote-viewer.1*
%changelog %changelog
* Tue Aug 15 2017 Daniel P. Berrange <berrange@redhat.com> - 6.0-1
- Update to 6.0 release
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0-4 * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild