summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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).
* 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.
* Update user-visible copyright informationChristophe Fergeau2014-04-041-1/+1
| | | | | Years in copyright notices in the about dialog and man pages is at most 2012, let's set it to 2014
* 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>
* 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-131-1/+4
| | | | | | | | 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.
* 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
|
* 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>
* Display warning if UI file failsJonathon Jongsma2014-02-111-1/+6
| | | | | | | | | | | When trying to load ui files, we try to find the file in several directories. If a file is not found in one directory, try to load it from the next directory. However, if a file is found in a directory but we are not able to load it (e.g. due to unsupported versions of glade used to generate it, etc), we should print a warning to the terminal to help the developer debug the issue. This is an unexpected failure (whereas not finding the file in that directory at all is an 'expected' failure).
* Fix virt-viewer.exe on win32Daniel P. Berrange2014-01-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Libvirt uses gnulib for making winsock look like POSIX sockets. This means that in the libvirt event handle callbacks the application will be given a file descriptor rather than a winsock HANDLE object. The g_io_channel_unix_new method will detect that it is an FD and delegate to the g_io_channel_win32_new_fd method. Unfortunately the glib Win32 event loop impl is not very good at dealing with FD objects, simulating poll() by doing a read() on the FD :-( The API docs for g_io_channel_win32_new_fd say "All reads from the file descriptor should be done by this internal GLib thread. Your code should call only g_io_channel_read()." This isn't going to fly for libvirt, since it has zero knowledge of glib at all, so is just doing normal read(). Fortunately we can work around this problem by turning the FD we get from libvirt back into a HANDLE using the _get_osfhandle() method. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Load ui files first from installed locationJonathon Jongsma2014-01-202-11/+19
| | | | | | | virt_viewer_util_load_ui() looks first in the current directory, and then looks in the system data dirs for a ui file to load, but if you install virt-viewer in a different prefix, it will load the system UI file rather than the one from the install prefix. Try to load the ui file from pkgdatadir first.
* Clear global zoom-reset hotkey tooMarc-André Lureau2014-01-071-0/+1
|
* Fix rebuild of accelerators menu when loading from fileMarc-André Lureau2014-01-073-4/+13
| | | | | | | | | It's not enough to set the property to notify of its change. Add a virt_viewer_app_set_enable_accel() helper, and call it after the changes to accelerators are made when loading from file. I verified the menu is correctly built when connection from controller or command line too.
* Enable the display before showing the windowJonathon Jongsma2013-12-161-2/+2
| | | | | | | | This ensures that the display is enabled when it gets its first Allocate event (which causes a display reconfiguration). If the display is not enabled at this point, it won't send down a new monitors_config message until the second allocation, which may result in the display being disabled until a window is resized.
* app: remove useless warningMarc-André Lureau2013-12-111-1/+0
| | | | | | This warning should have been removed with 20eb200c. https://bugzilla.redhat.com/show_bug.cgi?id=1021350
* Remove obsolete function declarationJonathon Jongsma2013-12-101-1/+0
| | | | | This function was removed in bd914bdea2e85d62d5f67eb567ce200f526c6bab, but the declaration was missed.
* 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
* Don't re-configure displays when show-hint changesJonathon Jongsma2013-11-271-2/+0
| | | | | | This caused secondary displays on a windows guest to flicker under some circumstances. The old code didn't re-configure displays in this case either, so it shouldn't have been included in the display alignment refactor.
* Do all display alignment in virt-viewerJonathon Jongsma2013-11-276-76/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Ensure all windows obey initial --zoom settingJonathon Jongsma2013-11-211-6/+4
| | | | | | | | | | | | | | There are cases where multiple VirtViewerWindow objects are created before the VirtViewerApp constructor has a chance to run. Since the constructor has not yet run, priv->main_window will still be NULL, the test in virt_viewer_app_window_new() will fail, and they will not get their initial zoom level set. When the constructor finally runs, it set the zoom level of the main window to the value set on the command line, but all other windows that had already been created retained the default 100% zoom level. By creating the main_window in the instance init function, we ensure that the main window is created before we get any 'session-display-added' signals and all displays will start out with consistent zoom levels.
* Remove non-functional VIRT_VIEWER_HIDE env behaviorJonathon Jongsma2013-11-211-3/+0
| | | | | | | VIRT_VIEWER_HIDE could be set as an environment variable to (theoretically) hide displays whenever they were not ready. Unfortunately, this bit of functionality appears bitrotten and doesn't work anymore (it prevents windows from opening when you click 'view > displays > display 2', for instance).
* separate fullscreen_set_active into a separate functionJonathon Jongsma2013-11-201-8/+12
|
* Ensure auto-conf is only done onceJonathon Jongsma2013-11-201-0/+9
| | | | | | Auto-conf should only happen at startup. It is triggered from several places due to the somewhat unreliable ordering of events, but that doesn't mean we want to run it several times. This patch ensures that we only do it once.
* Add ability to define custom display->monitor mapping per vmJonathon Jongsma2013-11-205-28/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fullscreen mode generally just assigns display 1 to monitor 1, display 2 to monitor 2, etc. For custom setups, you can define a monitor mapping in the settings keyfile per-vm. This requires a vm uuid (so only works in virt-viewer or on versions of spice-server that send the uuid over the wire). The format is pretty basic: [6485b20f-e9da-614c-72b0-60a7857e7886] monitor-mapping=2;3 The group name ("6485b20f-e9da-614c-72b0-60a7857e7886") is the uuid id of the vm. This group has a single key: monitor-mapping. This key is an array of integers describing the order in which to assign the monitors to a guest display. Any monitors that are not listed in this array will not be configured at startup. For instance: monitor-mapping=2;1 will attempt to configure 2 displays on the guest and assign the first display to monitor 2 and the second display to monitor 1. monitor-mapping=2 will only configure a single display on the guest and place it on the second monitor. Any monitor numbers listed in the keyfile are greater than the number of monitors that are physically present, they will be ignored.
* Fix leak of VirtViewerApp::windows hash table keyChristophe Fergeau2013-11-201-1/+2
| | | | | | | | | | | | | The VirtViewerApp::windows hash table owns the memory for both the keys and values it stores. virt_viewer_app_remove_nth_window() uses g_hash_table_steal() which does not call the 'free' function neither for the key nor for the value. This method takes care of releasing the reference for the value it extracted from the hash table, but not for the key. This commit fixes by explicitly taking a reference on the value rather than stealing the one held by the hash table. We can then replace the use of g_hash_table_steal() with g_hash_table_remove() which will take care of freeing the removed key.
* session: Don't hold VirtViewerDisplay refs on channel destroyChristophe Fergeau2013-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VirtViewerSessionSpice creates a reference-holding VirtViewerDisplay array and associates it with the display SpiceChannel with g_object_set_data(channel, "virt-viewer-displays"). When virt_viewer_session_spice_channel_destroy() is called and the display channel is being destroyed, we should ensure these VirtViewerDisplay references are dropped or the displays could outlive the session. In my testing (start qemu with a f20 live cd, connect to it, when the kernel has started booting and qxl is initialized (4 displays listed in the display submenu), kill qemu), I was getting "invalid unclassed pointer in cast to 'VirtViewerSessionSpice'" warnings through #0 0x00000035bac504e9 in g_logv (log_domain=0x35bb039aa4 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffc7c0) at gmessages.c:989 #1 0x00000035bac5063f in g_log ( log_domain=log_domain@entry=0x35bb039aa4 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x35bb041010 "invalid unclassed pointer in cast to '%s'") at gmessages.c:1025 #2 0x00000035bb032e09 in g_type_check_instance_cast (type_instance=0x665580, iface_type=<optimized out>) at gtype.c:4025 #3 0x0000000000426e9f in get_main (self=0x894190) at virt-viewer-display-spice.c:92 #4 0x0000000000426ece in show_hint_changed (self=0x894190) at virt-viewer-display-spice.c:100 #5 0x00000035bb010298 in g_closure_invoke (closure=0x9f47c0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffcad0, invocation_hint=invocation_hint@entry=0x7fffffffca70) at gclosure.c:777 #6 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x651f60, detail=detail@entry=1782, instance=instance@entry=0x894190, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcad0) at gsignal.c:3586 #7 0x00000035bb02a0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffcc60) at gsignal.c:3330 #8 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #9 0x00000035bb014945 in g_object_dispatch_properties_changed (object=0x894190, n_pspecs=92, pspecs=0x0) at gobject.c:1047 #10 0x00000035bb017019 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x894190) at gobject.c:1141 #11 g_object_notify (object=0x894190, property_name=<optimized out>) at gobject.c:1183 #12 0x000000000041b617 in virt_viewer_display_set_show_hint (self=0x894190, mask=1, enable=0) at virt-viewer-display.c:659 #13 0x000000000042712c in update_display_ready (self=0x894190) at virt-viewer-display-spice.c:156 #14 0x00000035bb010298 in g_closure_invoke (closure=0x6ba480, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffcfb0, invocation_hint=invocation_hint@entry=0x7fffffffcf50) at gclosure.c:777 #15 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x651f60, detail=detail@entry=1798, instance=instance@entry=0xa2c250, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcfb0) at gsignal.c:3586 #16 0x00000035bb02a0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd140) at gsignal.c:3330 #17 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #18 0x00000035bb014945 in g_object_dispatch_properties_changed (object=0xa2c250, n_pspecs=92, pspecs=0x0) at gobject.c:1047 #19 0x00000035bb017019 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0xa2c250) at gobject.c:1141 #20 g_object_notify (object=0xa2c250, property_name=<optimized out>) at gobject.c:1183 #21 0x00007ffff7044d9a in update_ready (display=0xa2c250) at spice-widget.c:257 #22 0x00007ffff7044df0 in set_monitor_ready (self=0xa2c250, ready=0) at spice-widget.c:265 #23 0x00007ffff7049bb3 in primary_destroy (channel=0x9f40b0, data=0xa2c250) at spice-widget.c:2131 #24 0x00007ffff704afd5 in channel_destroy (s=0x892880, channel=0x9f40b0, data=0xa2c250) at spice-widget.c:2444 #25 0x00000035bb010298 in g_closure_invoke (closure=0xa27850, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffd570, invocation_hint=invocation_hint@entry=0x7fffffffd510) at gclosure.c:777 #26 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x7cf600, detail=detail@entry=0, instance=instance@entry=0x892880, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd570) at gsignal.c:3586 #27 0x00000035bb02a0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd700) at gsignal.c:3330 #28 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #29 0x00007ffff6ceba87 in spice_session_channel_destroy (session=0x892880, channel=0x9f40b0) at spice-session.c:1923 #30 0x00007ffff6cecf05 in spice_channel_dispose (gobject=0x9f40b0) at spice-channel.c:149 #31 0x00007ffff6cf912c in spice_display_channel_dispose (object=0x9f40b0) at channel-display.c:136 #32 0x00000035bb014ee8 in g_object_unref (_object=0x9f40b0) at gobject.c:3160 #33 0x00007ffff6cf300c in spice_channel_delayed_unref (data=0x9f40b0) at spice-channel.c:2135 #34 0x00000035bac492a6 in g_main_dispatch (context=0x67a6b0) at gmain.c:3066 #35 g_main_context_dispatch (context=context@entry=0x67a6b0) at gmain.c:3642 #36 0x00000035bac49628 in g_main_context_iterate (context=0x67a6b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713 #37 0x00000035bac49a3a in g_main_loop_run (loop=0x7baf60) at gmain.c:3907 #38 0x00000035bfdaa2d5 in gtk_main () at gtkmain.c:1158 #39 0x000000000042caf1 in main (argc=1, argv=0x7fffffffdc78) at remote-viewer-main.c:179 In that backtrace, the last ref to the VirtViewerDisplay instances is held by the SpiceChannel:virt-viewer-displays object data which will only be released after completion of spice_display_channel_dispose()
* Remove obsolete use of SpiceChannel:virt-viewer-display object dataChristophe Fergeau2013-11-201-2/+1
| | | | | | | Commit 0d58d9c72 removed the setting of the SpiceChannel:virt-viewer-display object data, but there was still a call to g_object_get_data() trying to use it. Since it's only used to output a debug log, we can remove this call and fix up the debug log.
* Hide all windows on disconnectionChristophe Fergeau2013-11-131-0/+14
| | | | | | | | | | | | | | | When starting remote-viewer without argument, we are showing a window where the user can enter connection details. We then go on to try and connect to the URI the user specified, and if the connection fails, we disconnect from the remote server, and then we show again the connection window so that the user can correct the URI if he entered it wrong. However, when this happens, the window for the previous connection will still be visible even if connection failed. To avoid this, this commit makes sure we hide all windows when we get a disconnection event. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024309
* Reshow connection dialog on errorsChristophe Fergeau2013-11-131-0/+5
| | | | | | | | | | | | | | | remote-viewer behaviour is currently inconsistent in the connection dialog: if the user enters a valid URI, but then remote-viewer fails to connect to it, then we'll show again the connection dialog through a call to virt_viewer_app_start() in remote_viewer_deactivated(). If instead we enter an invalid URI in the connection dialog, then remote-viewer will report an error and quit. This commit makes sure in the latter case, we report the error and show again the connection dialog. The user can press 'Cancel' in the connection dialog to get out of remote-viewer as in this case, we return directly FALSE rather than going through the cleanup: label and looping.