summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-display.c
Commit message (Collapse)AuthorAgeFilesLines
* display: only un-constrain display size once it is mappedMarc-André Lureau2012-11-271-1/+2
| | | | | | Wait until the widget is actually on screen before removing its size constrain. This solves 50x50 window secondary window size when connecting to a multi-monitor spice guest.
* spice: avoid rounding issues when scaling up displayMarc-André Lureau2012-10-171-2/+2
| | | | | | | | | | | | Fix some unwanted guest resize due to rounding issues (at least when scaling up) We may want to save the original remote desktop size, instead of always checking widget requisition. That way zooming shouldn't resize guest at all, but it seems tricky to handle that special case vs user window resize that should trigger guest resize. https://bugzilla.redhat.com/show_bug.cgi?id=856678
* Simplify display flag handlingMarc-André Lureau2012-07-231-10/+10
|
* Add VirtViewerDisplay::selectable propertyMarc-André Lureau2012-07-231-0/+23
| | | | | | | This property will be set when the display can be selected to be "enabled" and shown (this can involve creating/connecting an additional guest monitor, and may need guest agent cooperation for example).
* Add a DISABLED display hintMarc-André Lureau2012-07-231-0/+15
| | | | | | | | This flag will help to track whether the display has been removed/closed and whether it really has a valid display. Ready in contrast, is used to "hide" temporarily the display (when starting or redrawing the display, to avoid artifacts)
* Run-time check values before doing bad computationMarc-André Lureau2012-07-231-1/+5
|
* Turn display:show-hint into flags typeMarc-André Lureau2012-07-231-10/+16
|
* Fix scaling of window to avoid integer truncationDaniel P. Berrange2012-04-191-2/+3
| | | | | Use round() instead of integer truncation when scaling the window, to avoid floating point precision problems on i386
* Minor simplification/optimization of VirtViewerDisplayZeeshan Ali (Khattak)2012-04-051-9/+5
|
* Fix close of VNC displaysDaniel P. Berrange2012-04-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When clicking the close button on a virt-viewer window with a VNC session open, while the VNC session terminates, the window does not go away. The problem is that the virt_viewer_session_vnc_disconnected method never gets invoked. The close button triggers a call to virt_viewer_session_clear_displays which unrefs the VirtViewerDisplayVnc instance. This in turn triggers a call to gtk_container_destroy, which destroys all widgets it contains, ie the VncDisplay * object. With the VncDisplay object in its dispose phase, no signals will ever be emitted, thus the 'vnc-disconnected' signal never gets seen. The design issue is that VirtViewerDisplayVnc is assuming it owns the VncDisplay, whereas in fact the real owner is the VirtViewerSessionVnc object. The solution is to introduce a new virt_viewer_display_close method which can be used to de-parent the widget before VirtViewerDisplay is unref'd. The VirtViewerSessionVnc object also needs to hold a full ref on the VncDisplay object, not merely a floating reference * virt-viewer-display-spice.c, virt-viewer-display.c, virt-viewer-display.h: Add virt_viewer_display_close * virt-viewer-display-vnc.c: Deparent VNC widget in virt_viewer_display_close impl * virt-viewer-session-vnc.c: Improve logging * virt-viewer-session.c: Call virt_viewer_display_close before unrefing display * virt-viewer-window.c: Improve logging Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* virt-viewer-display: Use a borrowed reference to sessionHans de Goede2012-03-061-1/+1
| | | | | | | | | | | | | | Before this patch there was a cyclic reference between VirtViewerSesion and VirtViewerDisplay, since all VirtViewerDisplays are created / destroyed by VirtViewerSession it is safe to assume that lifetime of VirtViewerSession >= VirtViewerDisplay, so VirtViewerDisplay can take a borrowed reference breaking the circle, and allowing proper cleanup on exit. Note that there is no g_object_unref removed from virt-viewer-display, this because there is no finalize / dispose and before this patch VirtViewerDisplay never unref-ed the reference it hold to the session. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add smartcard-{insert,remove} and release-cursor virtual methodsMarc-André Lureau2012-02-221-0/+12
|
* Do not resize guest desktop if !auto-resizeMarc-André Lureau2012-02-081-0/+16
| | | | | | | | | If auto-resize is enabled, the guest desktop size will be resized to match current window*zoom size. This can be a problem if the user explicitely set the desktop size to a different resolution and want to keep it. Disabling auto-resize sounds like a simple way to allow that.
* Implement SPICE desktop resizing that takes account of zoom levelDaniel P. Berrange2012-02-081-0/+42
| | | | | | | | | | | | | The standard SPICE widget guest resize implementation does not take into account the zoom level settings in virt-viewer, because it has no knowledge of this functionality. The guest resize can, however, be done by calling spice_main_set_display() directly. This allows virt-viewer to resize the guest taking into account zoom levels. ie, if virt-viewer is run with --zoom 50 and the window is resized to 400x300, then the guest agent should be told to set its resolution to 800x600
* Revert support for resizing guest desktopDaniel P. Berrange2012-02-071-19/+2
| | | | | | | The SpiceDisplay widget has built-in support for resizing the guest desktop, but this does not know that virt-viewer has a zoom level setting. This makes the virt-viewer zoom completely inoperable. Revert use of the 'resize-guest' property.
* Update copyright headersDaniel P. Berrange2012-02-061-2/+2
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-360/+360
|
* Grab the focus when showing the displayMarc-André Lureau2012-02-061-0/+11
| | | | | | | Override the grab_focus() method in the display class. Since both VNC and Spice displays are the direct child, let's just grab the child. It can be that this behaviour need to be overriden if Spice or VNC display become more complex (using sub-childs or different objects)
* Tune the first argument in calls to g_type_class_add_private()Guannan Ren2012-01-311-1/+1
|
* Resize guest desktop with SPICEMarc-André Lureau2012-01-311-2/+19
| | | | | This is the method we prefer, even though we can't keep aspect ratio. We could eventually support aspect ration in spice-gtk.
* Emit display-desktop-resize from set_desktop_size()Marc-André Lureau2011-11-071-0/+5
|
* Add show-hint property to displayMarc-André Lureau2011-07-261-3/+34
|
* Split VirtViewerApp window into VirtViewerWindowMarc-André Lureau2011-07-261-1/+19
|
* Split pull part of VirtViewerDisplay out into VirtViewerSessionDaniel P. Berrange2011-07-111-113/+0
| | | | | | To facilitate introduction of multi-head support, pull some of the VirtViewerDisplay class out into a new VirtViewerSession class.
* Remove circular dependancy between VirtViewerDisplay and VirtViewerDaniel P. Berrange2011-07-111-13/+141
| | | | | | | Add many signals to VirtViewerDisplay which are emitted when various events occur. This lets us remove all the code in the VirtViewerDisplay subclasses which call back into VirtViewer methods. Instead VirtViewer can simply connect signals to the display
* Turn VirtViewerDisplay into a proper Gtk widgetDaniel P. Berrange2011-07-111-22/+370
| | | | | Turn VirtViewerDisplay into a Gtk widget instead of just a GObject, by merging the functionality from VirtViewerAlign
* Introduce standard naming convention to files & methodsDaniel P. Berrange2011-07-011-0/+90
All source files must be named virt-viewer-XXXX All methods named virt_viewer_XXX