summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* kiosk: remove invalid unrefMarc-André Lureau2014-06-161-1/+0
| | | | | | This unref doesn't seem to be related to any reference, although it was probably introduced in the first place to clear the floating ref, wrongly. See following commit for a working solution.
* util: fix glib_check_version() conditionMarc-André Lureau2014-06-121-1/+1
| | | | glib_check_version() returns NULL if version is higher or equal.
* Fix tiny window when resetting zoom factor in gtk2 buildJonathon Jongsma2014-06-111-1/+8
| | | | | | | | | | | | | | | rhbz#1104064 had a couple of symptoms. The first was fixed in 6edde57862ac30e74ce6412c93a2fa925ae4ea67. The second symptom is that displays could also become tiny when clicking 'View > Zoom > Normal Size'. This was because VirtViewerDisplay returned early from _display_set_zoom_level() if the zoom level was being set to the current zoom setting. However, the calling function (_window_set_zoom_level()) also tries to queue a resize event for itself after setting the zoom level on the display. If the display doesn't queue a resize event for itself, its size request will only be 50x50 during the window resize negotiation. This causes the display to become tiny and zoomed out. Queueing a resize on the display widget ensures that it will request the proper size during the next allocation.
* window: take zoom-level into account for display limitsMarc-André Lureau2014-06-111-4/+9
| | | | | | Fixes guest can not be resized to expected window size after zoom out. https://bugzilla.redhat.com/show_bug.cgi?id=1105528
* Fix tiny windows for secondary displays in gtk2 buildJonathon Jongsma2014-06-101-1/+1
| | | | | | | | | | | | | | | | | | When enabling a new display on linux guests, the new window would be tiny (50x50) and zoomed way out. This was caused by the fact that when the display widget received the 'map' event, it unconditionally cleared the 'dirty' flag, which meant that it would only request 50x50 size. This behavior was intended to fix a bug on the windows client which wprevented windows from resized smaller than the guest display resolution. Unfortunately, due to the timing of the 'map' and allocate events, the widget became very small. Instead of clearing the 'dirty' flag directly when a widget is mapped, we now queue a resize event, which will guarantee that the widget attains its desired size and will then clear its dirty flag (allowing it to be resized). Testing on windows indicates that this fix still solves the 'unshrinkable window' problem while also preventing the tiny secondary display bug. Resolves: rhbz#1104064
* util: get rid of ARRAY_CARDINALITYMarc-André Lureau2014-06-102-3/+1
|
* Use a custom log handler to silence debug messagesMarc-André Lureau2014-06-101-0/+14
| | | | | | | On RHEL6, with old glib, all g_log messages are printed. Filter the messages with a custom handler instead. https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* kiosk: don't attempt to hide windows when disconnectingMarc-André Lureau2014-06-101-1/+3
| | | | | | | Get rid of the following warning: (virt-viewer:7262): virt-viewer-WARNING **: Can't hide windows in kiosk mode https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* Replace DEBUG_LOG with g_debugMarc-André Lureau2014-06-1011-93/+92
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* Remove warning when removing displayMarc-André Lureau2014-06-101-1/+3
| | | | | | | | | | | Some display have no associated window (for ex, if it doesn't fit on client monitors). (remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_window_set_display: assertion `VIRT_VIEWER_IS_WINDOW(self)' failed (remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_app_remove_nth_window: assertion `win != NULL' failed https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* msi: move up micro version in x.x.build productversionMarc-André Lureau2014-06-101-1/+3
| | | | | | | This allows 12 bits to form a buildid, ex in RHEVM builds: --with-buildid=$(release << 4 + zrelease) https://bugzilla.redhat.com/show_bug.cgi?id=1105650
* Don't connect to localhost when using --directChristophe Fergeau2014-06-103-1/+10
| | | | | | | | | | | | | | | | | | Trying to connect to a remote virtual machine using virt-viewer -c qemu+ssh://example.com/system --direct $vm_name will currently fail with an error message saying it's not possible to localhost. This happens with VMs which listen on a wildcard address (eg '0.0.0.0'). This was introduced by commit 74b1b62 which changes the host to connect to to 'localhost' when trying to connect through ssh to a VM listening on a wildcard address. This is only valid when using a ssh tunnel, and should not be done with --direct. The fallback code which uses the hostname from the libvirt URI is what makes the most sense in this situation (wildcard listen address + --direct). This commit introduces a virt_viewer_app_get_direct() so that this can be implemented. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1079211
* Fix 'title' leak in virt_viewer_file_fill_app()Christophe Fergeau2014-06-101-3/+5
| | | | virt_viewer_file_get_title() returns a newly allocated string.
* Set freed variables to NULL in remote_viewer_start()Jonathon Jongsma2014-06-031-0/+2
| | | | | | | Coverity warns that 'type' can sometimes be used or free after already having been freed. This can happen when open_recent_dialog is true and we jump back up to the retry_dialog label. To prevent this, make sure the freed variables are set to NULL after freeing.
* Improve remote-viewer connection dialogJonathon Jongsma2014-06-031-12/+75
| | | | Based on the new design for the 'connect to server' dialog from Nautilus.
* Fix race with metacity in fullscreenMarc-André Lureau2014-04-171-2/+9
| | | | | To avoid some races with metacity, the window should be placed as early as possible, before it is (re)allocated & mapped (rhbz#809546).
* build-sys: man Makefile.am misc improvementsMarc-André Lureau2014-04-171-3/+3
| | | | | | | Make it silent. Ship man files in tarball. Use maintainer-clean instead of distclean (which is for files generated by configure in general).
* man: remove Perl headerMarc-André Lureau2014-04-171-1/+1
| | | | Remove "User Contributed Perl Documentation" header.
* Fix gtk2 buildJonathon Jongsma2014-04-083-14/+30
| | | | | | | Previous commit accidentally broke gtk2 build by using gtk_widget_get_preferred_size(). We can't simply use gtk_widget_size_request() for the gtk2 build since this will generally return 50x50 whenever we're not in the middle of a resize, so we need to add a compatibility function.
* man: Use nicer link to GPLv2Christophe Fergeau2014-04-072-2/+2
| | | | | | | As pointed out by Eric Blake, https://www.gnu.org/licenses/gpl-2.0.html and https://www.gnu.org/licenses/old-licenses/gpl-2.0.html both point to the same location, with the former being nicer to read.
* man: Fix 'concatonated' typoChristophe Fergeau2014-04-041-1/+1
| | | | This also removes an extra 'are' in the same sentence.
* man: Fix link to GPLv2 textChristophe Fergeau2014-04-042-4/+4
| | | | | The unversionned http links point to the GLPv3 text while virt-viewer is still licensed under the GPLv2.
* man: Add missing '.' at end of one sentenceChristophe Fergeau2014-04-041-1/+1
|
* Update user-visible copyright informationChristophe Fergeau2014-04-043-3/+3
| | | | | Years in copyright notices in the about dialog and man pages is at most 2012, let's set it to 2014
* build-sys: Always prepend '-' to build idChristophe Fergeau2014-04-043-6/+7
| | | | | | | | | | | | | | | | | When using the --with-buildid configure paramater, the build id which is substituted in the MSI wxs file is automatically prepended by a '-', but the build id which is used in the C files does not get this '-' automatically. Currently, the linux and mingw spec files prepend a '-' on their own to the --with-buildid argument, but this causes the MSI installer to show 2 '-' during installation: "Please wait while Windows configures VirtViewer 0.6.0--1" This commit always prepends a '-' to the buildid strings, and removes the '-' from the spec files. This is to ensure the separator between version number and buildid is not forgotten, which could give a confusing version number.
* Fix regression with enabling additional displaysJonathon Jongsma2014-03-271-16/+20
| | | | | | | | | | | | | | | | | Commit 8fa942 broke enabling of additional displays. We don't want to send down display re-configurations due to events that happen while setting up windows for enabled displays that we recieve from the server. However, by ignoring allocations on unmapped windows, we fail to send display configurations for new displays that a user is attempting to enable via the window menu. To discriminate between these two cases, we check whether the display is in the 'ready' state or not. - Unmapped displays with the 'ready' hint set can be assumed to be displays that are enabled on the server that we are attempting to create windows for on the client. In this case, we should *not* send a display configuration to the server - Unmapped displays with the 'ready' hint cleared can be assumed to be displays that are not yet enabled on the server that we are trying to enable in the client. In this case, we *should* send a display configuration to the server
* Fix building with older spice-gtkMartin Kletzander2014-03-141-4/+9
| | | | | | | | | | | | | | | | | | | Due to spice-gtk-0.23 missing SPICE_GTK_CHECK_VERSION macro, the condition: causes the following error: virt-viewer-session-spice.c: In function 'virt_viewer_session_spice_main_channel_event': virt-viewer-session-spice.c:525:64: error: missing binary operator before token "(" #if defined(SPICE_GTK_CHECK_VERSION) && SPICE_GTK_CHECK_VERSION(0, 23, 21) ^ Also one more warning is fixed in this patch: virt-viewer-session-spice.c:476:19: warning: unused variable 'error' [-Wunused-variable] const GError *error; ^ Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
* Fix 'silentely' typo in remote-viewer man pageChristophe Fergeau2014-03-141-1/+1
|
* Don't show 'do you want to quit' dialog in kiosk modeChristophe Fergeau2014-03-141-5/+6
| | | | | | | | In some situation, (for example, guest without vdagent running), it's possible to pass key combinations to virt-viewer. When using alt+f4, this can cause the 'do you want to quit?' dialog to show while it's non-functional. This commit moves the check for kiosk mode to before we show this dialog.
* Fix broken 'release-cursor' accel when not specified in --hotkeysJonathon Jongsma2014-03-132-5/+11
| | | | | | | | | | | | | | | | | | | | | | When the --hotkeys option is given, all hotkeys that are not explicitly specified are disabled. The method used to disable hotkeys is to change the accel map entry to key=0, mods=0. However, when we decide whether to set a grab sequence on the spice dispay widget, we simply use the return value for gtk_accel_map_lookup_entry and assume that a TRUE value returned from this function means that the hotkey is enabled. In reality, this function will return TRUE for disabled hotkeys, but the 'key' variable will be set to key=0, mods=0. The result is that if I start virt-viewer like this: virt-viewer --hotkeys secure-attention=ctrl+alt+end ... and the guest that I'm attached to uses server mouse mode, it will be impossible to release the grab on the spice widget. Because we will explicitly disable the grab keys in the spice widget and handle the 'release-cursor' hotkey in virt-viewer, but the hotkey is an empty accel key. Instead of simply checking the return value of gtk_accel_map_lookup_entry, we have to inspect the return value for 'key' and check whether any keys are actually assigned.
* Don't create new windows at startup when kiosk mode is falseJonathon Jongsma2014-03-131-5/+5
| | | | | | virt_viewer_app_set_kiosk creates a new window at startup for each client monitor (regardless of whether the guest supports more than one display). This seems unnecessary. Only do this if kiosk mode is actually enabled.
* Remove special-case for getting window n=0Jonathon Jongsma2014-03-131-13/+9
| | | | | | virt_viewer_app_get_nth_window() will return the proper window when passed 0 for the 'nth' argument, so there's no need to avoid calling it in this case. It just complicates the code logic.
* Don't resize guest display on zoom changeJonathon Jongsma2014-03-131-1/+20
| | | | | | | | | | | | | | | | | | | | When the zoom level is changed, the virt-viewer window gets resized. But we don't want this to trigger a resize of the guest display. But occasionally rounding errors cause the guest display to be reconfigured when zooming out. To fix this, we first check whether the current size is the preferred size. If it is, we don't send down a resize command to the guest. In addition to preventing guest resizes in response to zooming, it also improves the behavior when the guest display resolution is changed from within the guest. Before this change, we'd have the following behavior: A. guest changes display to WxH B. client gets notified of change and resizes the window to WxH C. client responds to window resize by sending a new monitor config command to the guest With this change, the extra step C will be avoided because we're already at the preferred size. Resolves: rhbz#1004051
* Use a USB icon in the fullscreen toolbarMarc-André Lureau2014-03-135-4/+219
| | | | | | | | Replace the generic GTK_STOCK_PREFERENCES with a more appropriate USB icon. The icon was provided by Jakub Steiner <jsteiner@redhat.com> https://bugzilla.redhat.com/show_bug.cgi?id=804184
* Remove "Automatically resize" menuMarc-André Lureau2014-03-135-66/+2
| | | | | | | Remove "Automatically resize" menu item (always enabled for Spice display now) https://bugzilla.redhat.com/show_bug.cgi?id=1007649
* Silence a message about missing configuration fileMarc-André Lureau2014-03-131-2/+5
| | | | | | | Do not print a g_debug() error when the configuration file is missing, unless given the --debug option. https://bugzilla.redhat.com/show_bug.cgi?id=1006737
* Fix scaling of window upon resizeDaniel P. Berrange2014-03-121-9/+7
| | | | | | | | | The code to determine scaling of windows was incorrectly using the original desktop size instead of the host screen size. The 128 pixel fudge factor was also causing windows to be scaled when there was no need for them to be. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Revert "Don't resize guest display on zoom change"Jonathon Jongsma2014-03-061-14/+1
| | | | This reverts commit 895ef8029e794e7b74a45f27c7c741d1332bc02b.
* spec: Don't disable spice support on some archsChristophe Fergeau2014-02-271-5/+0
| | | | | Nowadays spice-gtk no longer has an ExclusiveArch: x86 x86_64 %{arm} virt-viewer can be built with spice-gtk support on all arches.
* Don't resize guest display on zoom changeJonathon Jongsma2014-02-261-1/+14
| | | | | | | | | | | | | | | | | | | | When the zoom level is changed, the virt-viewer window gets resized. But we don't want this to trigger a resize of the guest display. But occasionally rounding errors cause the guest display to be reconfigured when zooming out. To fix this, we first check whether the current size is the preferred size. If it is, we don't send down a resize command to the guest. In addition to preventing guest resizes in response to zooming, it also improves the behavior when the guest display resolution is changed from within the guest. Before this change, we'd have the following behavior: A. guest changes display to WxH B. client gets notified of change and resizes the window to WxH C. client responds to window resize by sending a new monitor config command to the guest With this change, the extra step C will be avoided because we're already at the preferred size. Resolves: rhbz#1004051
* spice: do not open in fullscreen with CONTROLLER_AUTO_DISPLAY_RESMarc-André Lureau2014-02-261-1/+1
| | | | | | This flag is always set when using the rhevm user portal. Best is probably to ignore it, now that fullscreen has simplified unique behaviour.
* spice: ask credentials for proxyMarc-André Lureau2014-02-241-5/+35
| | | | | If Spice proxy requires authentication, ask credentials and try connecting again.
* Fix a gcc warning when compiling with mingw32Marc-André Lureau2014-02-241-1/+1
|
* Fix german translation of send keyDaniel P. Berrange2014-02-241-2/+4
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Improve docs for --attach flag in virt-viewerDaniel P. Berrange2014-02-241-4/+7
| | | | | | | People seem to have a hard time understanding the --attach flag. Rewrite the docs in the hope that people figure it out this time. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* rhbz#1007306 - Don't free session if we're re-trying authJonathon Jongsma2014-02-131-2/+3
| | | | | | | deactivate() is called in response to a failed authentication attempt. If the session is cleared here, when a user attempts to re-authenticate, it will issue a warning and will not actually work. So only clear the session here if we're not going to re-try authentication.
* Don't set VNC display to ready until vnc is initializedJonathon Jongsma2014-02-132-2/+10
| | | | | | | We were setting the show_hint to READY as soon as we got the vnc-connected signal. But there may be an authentication step between vnc-connected and vnc-initialized. In this case, we switch to an empty black display during the authentication step instead of showing the 'waiting for display N' status.
* Don't hide the main window when disconnectingJonathon Jongsma2014-02-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | The main window (display #1) is treated a bit differently from other windows, since it is opened at app start and displays status messages while we attempt to connect to the remote guest. As such, it should really stay open as long as the app is running. The impetus for this change is the following: - user attempts to connect to a remote VNC display with a password - user types the wrong password - A dialog pops up indicating that authentication failed and asking if the user would like to try to re-connect. - User clicks 'Yes' - Because the connection was disconnected, all windows are closed - remote-viewer tries to reconnect again, at which point a new display window is opened, and the window gets placed by the window manager (possibly on another monitor altogether). As a user, I expect the program to simply re-use the existing window when trying to re-authenticate, instead of having the window disappear and then re-appear at a different location. This patch accomplishes that.
* Move vnc-specific auth logic to VirtViewerSessionVncJonathon Jongsma2014-02-133-109/+86
|
* Improve window title when connected to newer spice-serverJonathon Jongsma2014-02-117-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent spice servers send the guest vm name and uuid to the client. We can use these values to display the proper vm name in the window title if a title is not specified on the commandline. We can also be smarter about the title in virt-viewer as well. If a title is specified on the comamndline (-t/--title=foo), we use that. If not, we fall back to the vm name. If that is empty, we fall back to the uri of the connection. Comparison between old behavior and new behavior Using new spice-server Command Old title New title ------- --------- --------- remote-viewer -t xyz spice://host:port xyz xyz remote-viewer spice://host:port spice://host:port <vmname> virt-viewer <vmname> <vmname> <vmname> virt-viewer <uuid> <uuid> <vmname> Using old spice-server Command Old title New title ------- --------- --------- remote-viewer -t xyz spice://host:port xyz xyz remote-viewer spice://host:port spice://host:port spice://host:port virt-viewer <vmname> <vmname> <vmname> virt-viewer <uuid> <uuid> <vmname>