summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-display-spice.c
Commit message (Collapse)AuthorAgeFilesLines
* virt-viewer-display-spice: Pass proper x and y coordinates in windowed modeHans de Goede2013-02-061-0/+7
| | | | | | | | | | | This stops monitor order from the guest from being re-arranged in multi- monitor setups when switching between fullscreen and windowed mode. 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@redhat.com>
* virt-viewer-display-spice: Use real monitor coordinates in fullscreenHans de Goede2013-02-061-1/+8
| | | | | | | | | Now that we pass the real monitor coordinates, tell spice-gtk to use them, rather then to use the passed coordinates as input for its automatic monitor alignment. This fixes ie monitors in a 2x2 grid, showing up as a 4x1 configuration in the guest. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* virt-viewer-display-spice: Pass real monitor coordinates in fullscreenHans de Goede2013-02-061-1/+4
| | | | | | Rather then always passing +0+0 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Remove unused variableChristophe Fergeau2013-01-241-1/+0
| | | | 'window' is no longer used after 412bcf6f.
* virt-viewer-display-spice: Get monitor under our windowHans de Goede2013-01-221-1/+2
| | | | | | | | | | | When getting monitor info for going fullscreen, Get the monitor under *our* window rather then under the root-window. Noticed this not working properly when testing the monitor coordinates stuff, but this should also help people seeing problems when using non equally sized monitors. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Improve check for overridden grab key combinationChristophe Fergeau2012-12-201-1/+2
| | | | | | | | | remote-viewer can either use the default grab/ungrab handled by spice-gtk, or override it and use the standard gtk+ accelerator mechanism. However, the code currently assumes that if any accelerator is set in remote-viewer, then the grab key has been overridden. This commit makes sure the grab key is actually overridden before assuming so.
* Don't leak SpiceGrabSequence in enable_accel_changedChristophe Fergeau2012-12-201-2/+3
|
* Use monitor geometry, not screen sizeMarc-André Lureau2012-12-071-2/+6
| | | | | | | | | | | | | In a recent commit, 3bb6f5ec805ecfe78eba6d4d98e3ffcab195273a, I introduced a regression: going fullscreen would no longer match client and guest resolution correctly. A GdkScreen is not necessarily the physical screen monitor size. Lookup the physical monitor size using gdk_screen_get_monitor_geometry(). Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=881020
* spice: only autoresize once with screen size in fullscreenMarc-André Lureau2012-10-181-2/+29
| | | | | | | | | | | | It's currently not possible to configure guest with higher resolution than native, as it will switch back to native, since the gtk widget allocation will always end up being the size of the screen. We special-case fullscreen mode, and only resize when entering fullscreen. Furthermore, it avoids sending extra unnecessary resize events to the guest whenever gtk+ call size allocate in various stages, with different values. https://bugzilla.redhat.com/show_bug.cgi?id=864929
* spice: avoid rounding issues when scaling up displayMarc-André Lureau2012-10-171-2/+3
| | | | | | | | | | | | 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-8/+1
|
* spice: factor out main channel lookup codeMarc-André Lureau2012-07-231-5/+17
|
* Add VirtViewerDisplay::selectable propertyMarc-André Lureau2012-07-231-0/+16
| | | | | | | 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).
* Hook up handling of MonitorsMarc-André Lureau2012-07-231-8/+12
| | | | | | Rely on spice-gtk display channel monitors property to manage displays. The same display channel may now provide several monitors, the SpiceDisplay widget must be told which monitor to display
* Use SpiceDisplay:ready property instead of channel markMarc-André Lureau2012-07-231-23/+15
| | | | | | The display can now check several conditions before the display can be shown, use that instead of display mark, which was not high-level enough.
* Add a DISABLED display hintMarc-André Lureau2012-07-231-0/+20
| | | | | | | | 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)
* spice: disconnect signal handlers when either object is destroyedMarc-André Lureau2012-07-231-14/+12
| | | | | | | | | | | Use virt_viewer_signal_connect_object(), a copy of telepathy utility function tp_g_signal_connect_object(). This function will take care of removing signal handler if any of emitter or attached object are destroyed. The following patches will have this condition met, since there is no longer 1-1 relation between channel and display. The channels can continue to be around when some of the display are removed.
* spice: use weak references to display channelMarc-André Lureau2012-05-171-8/+9
| | | | | | | | | | | | Fix switch-host migration with Spice. spice-gtk doesn't like channels staying around when they should be destroyed/finalized, ie removed from session. spice-gtk should probably learned to handle better the case of non cooperating clients, and be able to dissociate a channel from a session without waiting for it to be disposed, but for now, the relation is quite tight.
* Ensure windows are destroyed when display closesDaniel P. Berrange2012-05-041-1/+1
| | | | | | | | | | | When running virt-viewer with the --reconnect argument, when the session closes, the VirtViewerWindow instances were being freed, but not the GtkWindow itself. So the orphaned window stayed around doing nothing. The GtkBuilder instance was also leaked. Fix these two leaks & also add some debugging to help future troubleshooting
* Fix close of VNC displaysDaniel P. Berrange2012-04-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Display correct key bindings to release cursorMarc-André Lureau2012-03-211-0/+18
| | | | | If the accels are enabled (with Spice controller custom bindings), show the configured keybinding in the title bar.
* spice: implement smartcard-{insert,remove} virtual methodsMarc-André Lureau2012-02-221-0/+11
|
* Do not resize guest desktop if !auto-resizeMarc-André Lureau2012-02-081-0/+3
| | | | | | | | | 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.
* Resize Spice guest display to the container sizeMarc-André Lureau2012-02-081-3/+3
| | | | | | | | | The SpiceDisplay doesn't receive the full allocation, because VirtViewerDisplay maintains current aspect ratio. However, the guest display can be resize up to its container size. This fixes going full-screen and not getting native resolution for instance.
* Implement SPICE desktop resizing that takes account of zoom levelDaniel P. Berrange2012-02-081-1/+33
| | | | | | | | | | | | | 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-3/+1
| | | | | | | 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.
* Add config.h to every source fileDaniel P. Berrange2012-02-061-0/+2
|
* Update copyright headersDaniel P. Berrange2012-02-061-2/+2
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-92/+91
|
* Tune the first argument in calls to g_type_class_add_private()Guannan Ren2012-01-311-1/+1
|
* Remove usage of deprecated propertyMarc-André Lureau2012-01-311-1/+0
|
* Resize guest desktop with SPICEMarc-André Lureau2012-01-311-1/+3
| | | | | 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-1/+0
|
* Wire up SpiceDisplay grab signalsDaniel P. Berrange2011-10-111-0/+31
| | | | | | To ensure that we can put the key release sequence message in the title bar, wire up VirtViewerDisplaySpice to the grab signals in SpiceDisplay
* Show display and rise its window when we have the display show hintMarc-André Lureau2011-07-261-12/+24
| | | | Track event for Spice, and imitate it for VNC.
* Split VirtViewerApp window into VirtViewerWindowMarc-André Lureau2011-07-261-5/+9
|
* Split pull part of VirtViewerDisplay out into VirtViewerSessionDaniel P. Berrange2011-07-111-237/+53
| | | | | | To facilitate introduction of multi-head support, pull some of the VirtViewerDisplay class out into a new VirtViewerSession class.
* Fix reconnecting of SPICE displayDaniel P. Berrange2011-07-111-13/+26
|
* Skip non-primary monitors in SPICEMarc-André Lureau2011-07-111-0/+3
|
* Remove circular dependancy between VirtViewerDisplay and VirtViewerDaniel P. Berrange2011-07-111-25/+17
| | | | | | | 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-80/+7
| | | | | 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/+405
All source files must be named virt-viewer-XXXX All methods named virt_viewer_XXX