summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-display.h
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2013-10-24 15:04:54 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2013-11-27 10:35:22 -0600
commit33614f86db490364339ef69e0eb76f98a4ac8138 (patch)
treead415dcf85c7b98883e07dc0b33242764a2d75ec /src/virt-viewer-display.h
parentc57f0f3df9a4e68d66e0aa3644e66557d423cfdb (diff)
downloadvirt-viewer-33614f86db490364339ef69e0eb76f98a4ac8138.tar.gz
virt-viewer-33614f86db490364339ef69e0eb76f98a4ac8138.tar.xz
virt-viewer-33614f86db490364339ef69e0eb76f98a4ac8138.zip
Do all display alignment in virt-viewer
Don't rely on spice-gtk to do any alignment of displays. This patch sets the disable-display-align property on the SpiceMainChannel, and makes the VirtViewerSession in charge of doing all alignment. This means that every display has to tell the VirtViewerSession when its "virtual monitor" has changed configuration (and wants to reconfigure its display on the guest), rather than sending it directly to the Main Channel. The session will then align the displays (if necessary), and the spice session will send down new configuration for all displays at once. This solves a couple of problems: 1. It allows the session to send down absolute coordinates only in the case where *all* windows are fullscreen (so that we can still support vertically-stacked displays, etc). But it auto-aligns displays if only a subset of the displays are in fullscreen mode. This solves the problem of overlapping regions on different displays when one monitor is in fullscreen because only one monitor's configuration was updated and the others were not aligned. 2. Allows us to always align based on the current position of each display. This contrasts with the earlier behavior where the position used for alignment was the window's position at the time when it was last resized. This caused displays to be arranged in a seemingly non-deterministic manner if one window was moved and then another window was resized (causing a display re-configuration). Solves rhbz#1002156
Diffstat (limited to 'src/virt-viewer-display.h')
-rw-r--r--src/virt-viewer-display.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/virt-viewer-display.h b/src/virt-viewer-display.h
index 99844c4..195eeee 100644
--- a/src/virt-viewer-display.h
+++ b/src/virt-viewer-display.h
@@ -124,8 +124,10 @@ void virt_viewer_display_release_cursor(VirtViewerDisplay *display);
void virt_viewer_display_close(VirtViewerDisplay *display);
void virt_viewer_display_set_enabled(VirtViewerDisplay *display, gboolean enabled);
+gboolean virt_viewer_display_get_enabled(VirtViewerDisplay *display);
gboolean virt_viewer_display_get_selectable(VirtViewerDisplay *display);
void virt_viewer_display_queue_resize(VirtViewerDisplay *display);
+void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay *self, GdkRectangle* preferred);
G_END_DECLS