[virt-tools-list] [PATCH virt-viewer] rhbz#1111514: Fix un-shrinkable displays on windows guests
Christophe Fergeau
cfergeau at redhat.com
Mon Jun 23 16:33:58 UTC 2014
Hey,
On Fri, Jun 20, 2014 at 03:02:28PM -0500, Jonathon Jongsma wrote:
> Commit 6edde5786 introduced a regression wrt shrinking windows on windows
> guests. This seems to be because resizing a display often causes the notebook
> widget to switch to the status page temporarily (often so quickly that it's not
> noticeable to the eye). This causes a quick 'unmap' and 'map' event sequence on
> the display widget. Apparently the timing of these events varies enough between
> linux and windows guests that it is only noticeable on windows gueststhe timing
> of these events varies enough between linux and windows guests that it is only
> noticeable on windows guests. The exact sequence that causes the bug appears to
> be as follows:
Could you set up your editor so that it wraps text at 72 columns or so?
Git log indents the log by 4 spaces so this makes these lines too long.
An explicit mention in the log of the fact that it's a gtk+2 issue only
would be useful as well
> ---
> src/virt-viewer-display.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
> index c5170c4..e91450f 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -38,6 +38,7 @@ struct _VirtViewerDisplayPrivate
> {
> #if !GTK_CHECK_VERSION(3, 0, 0)
> gboolean dirty;
> + gboolean mapped_once;
> #endif
> guint desktopWidth;
> guint desktopHeight;
> @@ -452,9 +453,16 @@ virt_viewer_display_make_resizable(VirtViewerDisplay *self)
> static void
> virt_viewer_display_map(GtkWidget *widget)
> {
> + VirtViewerDisplay* self = VIRT_VIEWER_DISPLAY(widget);
> +
> GTK_WIDGET_CLASS(virt_viewer_display_parent_class)->map(widget);
>
> - virt_viewer_display_queue_resize(VIRT_VIEWER_DISPLAY(widget));
> + if (!self->priv->mapped_once)
> + virt_viewer_display_queue_resize(self);
> + else
> + virt_viewer_display_make_resizable(self);
> +
> + self->priv->mapped_once = TRUE;
Not familiar at all with this code, but why not... ACK if noone objects
soon ;)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140623/5edf1d24/attachment.sig>
More information about the virt-tools-list
mailing list