summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-session.c
Commit message (Collapse)AuthorAgeFilesLines
* Add virt_viewer_session_can_share_folder()Marc-André Lureau2015-03-051-0/+11
| | | | | Functions name says it all, it is only implement for Spice, checking for webdav channel presence.
* Add a few session properties for share folderMarc-André Lureau2015-03-041-0/+59
| | | | See properties comments for details.
* Don't try to re-configure displays when there are noneJonathon Jongsma2014-10-271-0/+3
| | | | | | virt_viewer_session_on_monitor_geometry_changed() gets called immediately upon agent connection, but sometimes this is before any displays have been received. Simply return early when this is the case.
* Shift top-left display to originJonathon Jongsma2014-10-271-0/+2
| | | | | | | | | | | | | | When using a custom fullscreen display configuration, it's possible to specify that e.g. a single screen should be fullscreen on client monitor #4. Since we send down absolute positions and disable alignment when all windows are in fullscreen, we can send configurations with a very large offset to the top-left corner. This could result in the guest trying to create a screen that was much larger than necessary. For example when sending a configuration of 1280x1024+4240+0, the guest would need to allocate a screen of size 5520x1024, which might fail if video memory was too low. To avoid this issue, we shift all displays so that the minimum X coordinate for all screens is at x=0, and the minimum y coordinate is at y=0.
* Move monitor alignment function to util headerJonathon Jongsma2014-10-241-50/+1
|
* Force displays to update geometry when agent connectsFabiano Fidêncio2014-08-191-0/+4
| | | | | | | | We have to force displays to update geometry when the agent connects to ensure the client will have the guest with the right resolution when the guest has rebooted or the agent has crashed. https://bugzilla.redhat.com/sho_bug.cgi?id=1021841
* app: report disconnection error detailsMarc-André Lureau2014-07-081-2/+3
| | | | | | It may be useful to provide more detailed reason for disconnection. https://bugzilla.redhat.com/show_bug.cgi?id=1115986
* Don't use C99 for loopsChristophe Fergeau2014-06-261-2/+3
| | | | | | | | Declaring a local variable as part as a for loop such as 'for (unsigned int i; i < N; i++)' is a C99 specific feature. Running configure with --enable-compile-warnings=minimal does not add -std=c99 to the compile flags, so it's better if the codebase does not require C99 support from the compiler.
* Create a sparse array for monitor-geometry-changedJonathon Jongsma2013-11-271-1/+10
| | | | | | | | It's possible to have only display N enabled without having all of the displays before it. I experienced this a couple times with a windows guest where display 1 would show up before display 0 and we'd hit a warning that nth is not less than nmonitors. So find the highest display ID and then create an array of that size, leaving missing displays initialized to 0
* Do all display alignment in virt-viewerJonathon Jongsma2013-11-271-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add VirtViewerSession::software-smartcard-reader propertyChristophe Fergeau2013-07-311-1/+15
| | | | | | | This property will be set to TRUE when a software smartcard reader is available, and FALSE otherwise. This property can only be TRUE when using SPICE and when smartcard support is enabled, and when both smartcard certificates and smartcard db directory are set.
* Remove dead functionMarc-André Lureau2013-07-301-7/+0
|
* usbredir: Don't depend on channel orderingHans de Goede2013-07-061-7/+32
| | | | | | | | | | | | | Before this patch-set virt-viewer was calling spice_session_has_channel_type( session, SPICE_CHANNEL_USBREDIR) from the session-initialized signal handler, So as soon as the display channel gets added to the session, the check was done. This causes the check to return FALSE for usbredir capable vms if the usbredir channel(s) get added to the session after the display channed. This patch refactors things to not depend on channel creation order. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Allow app_initial_connect() to raise an errorMarc-André Lureau2013-03-081-2/+2
|
* Add VirtViewerSession:file propertyMarc-André Lureau2012-11-271-0/+39
| | | | | | | | | | If VirtViewerSession:file is set, it should be used to define the connection parameters. Also correct the mime type used in this case. The mime type is needed to identify the kind of resources we are adding to the recent list. The recent list can then be filtered and various application handling that type may attempt to access that resource.
* session: add virt_viewer_session_mime_type()Marc-André Lureau2012-11-271-0/+12
|
* Add VirtViewerSession::session-display-updatedMarc-André Lureau2012-07-231-0/+10
| | | | | Rebuild menu when agent is connected. Only when the agent is running may a display be enabled/disabled.
* Prevent from adding the same display several time in the sessionMarc-André Lureau2012-07-231-0/+3
| | | | | In virt_viewer_session_spice_display_monitors(), we (re)add the display unconditionnaly every time we receive a new MonitorConfig.
* Fix close of VNC displaysDaniel P. Berrange2012-04-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* remote-viewer: add a simple connection dialogMarc-André Lureau2012-03-291-0/+13
| | | | | | If the user doesn't provide URI, let's show a simple dialog to enter it. Also save & list recently used URLs in that dialog.
* spice: implement --fullscreen=auto-confMarc-André Lureau2012-03-211-1/+29
| | | | | | | - auto-conf is an optionnal argument to --fullscreen: it will set the guest display configuration to match the client display configuration, by sending the client monitors size and position to capable guests.
* Add smartcard-{insert,remove} and release-cursor virtual methodsMarc-André Lureau2012-02-221-0/+30
|
* Extract tlsPort for SPICE and use it to enable secure connectionsDaniel P. Berrange2012-02-141-3/+3
|
* Update copyright headersDaniel P. Berrange2012-02-061-2/+2
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-237/+236
|
* Only make the USB device selection sensitive when the vm is USB capableHans de Goede2012-02-061-0/+13
|
* Add a menu entry for USB device selectionHans de Goede2012-02-061-0/+13
|
* Register a new signal session-cancelledGuannan Ren2012-01-311-0/+9
|
* Tune the first argument in calls to g_type_class_add_private()Guannan Ren2012-01-311-1/+1
|
* Enable spice auto-usbredirMarc-André Lureau2012-01-311-7/+82
|
* Add error dialog for USB redirection failureMarc-André Lureau2012-01-311-0/+10
|
* Add virt_viewer_session_open_uriMarc-André Lureau2012-01-301-0/+12
|
* Split pull part of VirtViewerDisplay out into VirtViewerSessionDaniel P. Berrange2011-07-111-0/+256
To facilitate introduction of multi-head support, pull some of the VirtViewerDisplay class out into a new VirtViewerSession class.