Re: [PATCH 3/5] virt-viewer-display-spice: Pass proper x and y coordinates in windowed mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Wed, Feb 6, 2013 at 2:39 PM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> This stops monitor order from the guest from being re-arranged in multi-
> monitor setups when switching between fullscreen and windowed mode.

Isn't this the contrary of what you describe?: changing monitor
position when in window mode will rearrange them.

I still disagree with this approach. We might want to re-align
monitors when we leave fullscreen, but not when the window is
moved&resize.

If you change the patch to only update position when we leave
fullscreen, that would make more sense to me as the position of
monitor will not change later on.


> Note this relies on spice-gtk's auto monitor alignment code, which currently
> does not properly handle setups where there is more then 1 row of monitors,
> ie 2x1 - 5x1 will work fine, but 2x2 will not.
>
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  src/virt-viewer-display-spice.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
> index d15f415..1e17ca5 100644
> --- a/src/virt-viewer-display-spice.c
> +++ b/src/virt-viewer-display-spice.c
> @@ -209,6 +209,13 @@ virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self,
>          y = monitor.y;
>          dw = monitor.width;
>          dh = monitor.height;
> +    } else {
> +        GtkWidget *top = gtk_widget_get_toplevel(GTK_WIDGET(self));
> +        gtk_window_get_position(GTK_WINDOW(top), &x, &y);
> +        if (x < 0)
> +            x = 0;
> +        if (y < 0)
> +            y = 0;
>      }
>
>      if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) {
> --
> 1.8.1
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list



-- 
Marc-André Lureau

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux