summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-app.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix 'quiting' typo in VirtViewerApp private memberChristophe Fergeau2013-10-291-3/+3
|
* Don't disable fullscreen if kiosk mode is offJonathon Jongsma2013-10-181-1/+2
| | | | | | This conflicts with the --full-screen switch, because if kiosk mode is disabled, it sets disables fullscreen mode, which overrides the earlier call to enable fullscreen.
* Make 'Cancel' the default action in exit dialogChristophe Fergeau2013-10-161-0/+1
| | | | | | | | | In the 'Do you want to close the session dialog?', the default focus is currently on the 'Do not ask me again' checkbox. The purpose of this dialog is to make sure that the user does not inadvertantly exit remote-viewer, this commit changes the default action in this dialog to be 'cancel' rather than switching the 'Do not ask me again 'checkbox.
* Add ability to send Secure attention sequence via keyboardJonathon Jongsma2013-09-101-0/+4
| | | | | | | | On Windows, the OS doesn't allow applications to handle Ctrl+Alt+Del, because it's handled by the OS at a much lower level. Although we have a menu item to send this sequence to the guest, it's not possible to send via the keyboard (in the windows client). So add an alternative key sequence (defaulting to Ctrl+Alt+End) to send this sequence to the guest.
* kiosk: don't open extra monitorsMarc-André Lureau2013-08-201-2/+11
| | | | | In kiosk mode, we don't want new monitors windows that wouldn't fit on the client monitors to come up.
* kiosk: add --kiosk-quit optionMarc-André Lureau2013-08-201-1/+43
| | | | | | In kiosk mode, it's useful to keep the app alive, even if the remote session ended for example. Ie, we want to prevent the app from quiting itself, even if the remote end closed, lost network, or crashed etc.
* kiosk: use less verbose window/display statusMarc-André Lureau2013-08-201-2/+7
| | | | | | | | | We want extra windows to remain blank after connection. For example, if the remote has a single monitor, and client has more, we don't want extra client monitors to say "Connected to graphic server" all the time on other monitors. Instead, we leave them empty/black in kiosk mode.
* kiosk: open a window on each client monitorMarc-André Lureau2013-08-201-0/+15
| | | | | | | Open a window on each client monitor in fullscreen. If the remote display has less monitors than the client, the extra client monitors will still be used to prevent the user from accessing the windows or desktop below, and also to show some status messages when necessary.
* kiosk: add app kiosk option, pass it down to windowMarc-André Lureau2013-08-201-0/+37
| | | | See man page update for details.
* Return existing window in app_window_new()Marc-André Lureau2013-08-201-0/+4
| | | | | | | | Since the returned window is weak, it can already returns existing windows (instead of creating one and failing to insert). This allows the following set_kiosk() function to create a main window before the app constructor is called.
* Define the min/max zoom levels, so all values are syncMarc-André Lureau2013-08-201-2/+2
|
* Try to share more GOption code between r-v and v-vMarc-André Lureau2013-08-201-0/+61
|
* Enable smartcard shortcuts when a software reader is presentChristophe Fergeau2013-07-311-6/+74
| | | | | | | At the moment, smartcard keyboard accelerators are always enabled when specified, even if no software smartcard reader is in use. This commit only enables the smartcard keyboard accelerators when a smartcard reader has been found. This fixes rhbz#866944
* Make zoom-reset a global key bindingMarc-André Lureau2013-07-301-0/+1
|
* Hide extra monitors that don't fit in auto-confMarc-André Lureau2013-07-301-1/+4
| | | | | | | | | | Virt-viewer sometimes opens one too many windows if the guest is configured with more monitors than the client (the spice monitor configuration request and the current config aren't related, so there is some race). Instead, let's hide extra monitors that wouldn't fit in auto-conf. https://bugzilla.redhat.com/show_bug.cgi?id=985898
* Disable auto-conf when user toggle displayMarc-André Lureau2013-07-301-0/+2
| | | | Let's get out of auto-conf mode whenever user tricks display visibility.
* app: always use maybe_quit()Marc-André Lureau2013-07-081-1/+1
| | | | | | | Now that closing a window is like quiting, there is no reason to ask or skip the confirm dialog depending on how you quit (menu/toolbar/window). https://bugzilla.redhat.com/show_bug.cgi?id=905684
* usbredir: Don't depend on channel orderingHans de Goede2013-07-061-5/+13
| | | | | | | | | | | | | 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>
* app: move display on client monitors with --full-screenMarc-André Lureau2013-05-221-7/+3
| | | | | | | | | | | There used to be a check to fullscreen the only visible display on current monitor, by checking the number of visible monitors. Now that fullscreen is independant for each display, and goes on current monitor, it's useless. However, this code path is still used for the app --full-screen, at startup time. And it is still nicer to open the display on respective client monitors, rather than all on current monitor.
* Show connect dialog again if connection from dialog failedMarc-André Lureau2013-05-171-15/+19
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=864026
* Move connect dialog to remote-viewer.cMarc-André Lureau2013-05-171-3/+1
|
* Remove the "container" logic used by legacy browser pluginMarc-André Lureau2013-05-161-39/+4
|
* Only fullscreen the new windowMarc-André Lureau2013-05-161-14/+26
| | | | | The current code will forcefully reset fullscreen all windows when a new window is created
* Exit virt-viewer when trying to close any windowChristophe Fergeau2013-04-251-42/+47
| | | | | | | | Currently, in multi-screen scenarios, when closing one remote-viewer window, the corresponding screen gets disabled in the guest OS. This can be confusing as this behaves very differently from File/Quit. This commit will exit the whole application when the user tries to close one of virt-viewer window.
* Remove redundant check, g_strdup(NULL) is allowedChristophe Fergeau2013-04-131-1/+1
| | | | This also makes the code consistent with its surroundings.
* Fix memory leak on remote-viewer exitChristophe Fergeau2013-04-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | When exiting remote-viewer, VirtViewepApp::dispose() calls virt_viewer_app_set_connect_info() with NULL parameters to free all internal fields. However, _set_connect_info() calls virt_viewer_app_update_pretty_address() which will always allocate a new string even if the fields it's using to fill the string are NULL. This commit fixes the leak by checking if the fields have non-NULL values before creating the newly-allocated string. ==24180== 14 bytes in 1 blocks are definitely lost in loss record 540 of 8,671 ==24180== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==24180== by 0x32D2B0A187: __vasprintf_chk (vasprintf_chk.c:80) ==24180== by 0x32D52845AA: g_vasprintf (stdio2.h:210) ==24180== by 0x32D52640DC: g_strdup_vprintf (gstrfuncs.c:517) ==24180== by 0x32D526417B: g_strdup_printf (gstrfuncs.c:543) ==24180== by 0x4136E6: virt_viewer_app_update_pretty_address (virt-viewer-app.c:1681) ==24180== by 0x414100: virt_viewer_app_set_connect_info (virt-viewer-app.c:1902) ==24180== by 0x4141D0: virt_viewer_app_free_connect_info (virt-viewer-app.c:1910) ==24180== by 0x4127C6: virt_viewer_app_dispose (virt-viewer-app.c:1353) ==24180== by 0x425488: remote_viewer_dispose (remote-viewer.c:131) ==24180== by 0x32D5E14787: g_object_unref (gobject.c:2986) ==24180== by 0x4280AF: main (remote-viewer-main.c:323)
* virt-viewer-app: Always allow users to close displays from the displays menuHans de Goede2013-04-051-2/+2
| | | | | | | | | | | | Marking display menu items as non sensitive for shown displays make no sense, since the user can always close them through the window-manager. Having a window for a display shown when the display is not selectable nor ready, can happen when the agent goes away. This happens for example when using a dual monitor config with a Linux guest and then switching to a text console inside the guest. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Make display menu item sensitive againMarc-André Lureau2013-03-281-2/+1
| | | | | | | | Even if the display has not been explicitely disabled, as long as the display is "selectable" Fix regression introduced with "Do not disable extra client monitors" 3b981d953f270662360e5b0c78183924276a18ed
* Remove gtk_window_present() callMarc-André Lureau2013-03-261-1/+0
| | | | | | | | | | | | | | | | | | gtk_window_present() may forcefully call gdk_window_show(), which will call ShowWindow(). Although gdk call is not supposed to move the window if it's already visible, it does restore the window position on Vista+. For example, a snapped window will be moved back to its previous position. Gtk+ ShowWindow() is currently using SW_SHOWNOACTIVATE, it should probably use SW_SHOWNA instead, but that didn't help anyway for a snapped window. Since virt_viewer_window_show() already ensure the window is visible, I am not sure why gtk_window_present() is there in the first place, so just remove it. https://bugzilla.redhat.com/show_bug.cgi?id=912713
* app: add get_fullscreen_auto_conf()Marc-André Lureau2013-03-251-1/+9
|
* Reuse existing 'displays' submenu rather than recreating itChristophe Fergeau2013-03-251-4/+32
| | | | | | | | | | | Because of what apparently is a gtk+2 bug , we cannot recreate the submenu every time we need to refresh it, otherwise the application may get frozen with the keyboard and mouse grabbed if gtk_menu_item_set_submenu is called while the menu is displayed. Reusing the same menu every time works around this issue. https://bugzilla.redhat.com/show_bug.cgi?id=922712
* virt-viewer-app: Call virt_viewer_app_update_menu_displays on show_hint changeHans de Goede2013-03-211-0/+1
| | | | | | | | | | | | | | | Since the sensitivity of the display menu-check-items depends on show_hint, we need to call virt_viewer_app_update_menu_displays on show_hint change. This fixes the following scenario: 1) Linux guest with upto 4 displays on a single qxl dev 2) Configure it for 2 displays 3) Switch to a text-console in the guest (ie send ctrl+alt+F3) 4) All displays except for disp 1 are now not sensitve in the menu 5) Switch back to X 6) The second display in the view->displays menu is still not sensitive Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* virt_viewer_window_enter_fullscreen: Pass in monitor for fullscreen windowHans de Goede2013-03-201-3/+1
| | | | | | | | | | Rather then passing in a move boolean + coordinates to move the window to for fullscreen mode, simply pass in the monitor, so that the underlying objects can also use the monitors size to determine the display size. Note: pass in -1 to use the monitor the window is currently on. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Don't override G_LOG_DOMAIN=allMarc-André Lureau2013-03-131-1/+2
| | | | | If the string is different, the GLib log handler will not log all messages.
* Allow app_initial_connect() to raise an errorMarc-André Lureau2013-03-081-23/+23
|
* Fix "Do not ask me again" checkbox settings savingMarc-André Lureau2013-02-071-17/+22
| | | | | | | | | | | | | | | | | Based on bug report by Hans: The code block for saving was below this check: if (priv->session) { virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session)); if (priv->connected) { priv->quiting = TRUE; return; } } Which means it never executes when quiting virt-viewer while conneced, causing the "Do not ask me again" checkbox settings to not be saved.
* usbredir: Fix usbredir menu always being grayed out on monitor 2+Hans de Goede2013-02-061-0/+4
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add a "Do not ask me again" checkbox when closing appMarc-André Lureau2013-01-311-2/+62
|
* Always ask user about closing sessionMarc-André Lureau2013-01-311-11/+2
| | | | | | | | Currently, virt-viewer doesn't ask for user confirmation when closing a single monitor session. Always ask before closing, as requested by user. https://bugzilla.redhat.com/show_bug.cgi?id=803912
* vnc: add connection by fileMarc-André Lureau2013-01-181-1/+1
| | | | | | | | | | | | | | | Learn to connect to a VNC server with the connection details file, ex: [virt-viewer] type=vnc host=localhost port=2356 password=foobar v2: - add username/password support https://bugzilla.redhat.com/show_bug.cgi?id=843410
* Add a virt_viewer_app_set_hotkeys() helper functionHans de Goede2012-12-211-0/+53
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* "Unable to connect to the graphic server" error on guest shutdownMarc-André Lureau2012-11-201-4/+6
| | | | | | | | | | In virt_viewer_app_activate(), priv->connected is set to FALSE when the connect/active is successfull. However, we rely on it to know whether the virt_viewer_app_disconnected() is an error, so only set it to FALSE when connection failed. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=875697
* Reconnect to libvirtd after connection breaksMichal Privoznik2012-11-131-0/+2
| | | | | | | | Currently, if user wants to reconnect to a domain he can use '-r' cmd line argument. This makes virt-viewer listen to domain events. However, if connection to libvirtd breaks somehow, we will receive no longer any event. Hence we must reconnect to the libvirt.
* spice: only autoresize once with screen size in fullscreenMarc-André Lureau2012-10-181-0/+8
| | | | | | | | | | | | 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
* Allow user to set a window title for remote-viewerDaniel P. Berrange2012-10-091-3/+17
| | | | | | | | | Currently the remote viewer windows get the URI as their title. Provide a --title STRING arg to remote-viewer to let the user override the title with something more meaningful to them. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Append \n to message in virt_viewer_app_traceChristophe Fergeau2012-09-181-8/+9
| | | | | | | Callers manually add a trailing \n when they call virt_viewer_app_trace, but it's sometimes forgotten, leading to rhbz#822794. This commit removes the \n from all callers (it was missing in a few of them) and adds it in virt_viewer_app_trace.
* Add VirtViewerSession::session-display-updatedMarc-André Lureau2012-07-231-0/+9
| | | | | Rebuild menu when agent is connected. Only when the agent is running may a display be enabled/disabled.
* Make the display submenu insensitive if display can't be selectedMarc-André Lureau2012-07-231-1/+17
|
* Number display starting from 1Marc-André Lureau2012-07-231-1/+1
|
* Add a DISABLED display hintMarc-André Lureau2012-07-231-5/+7
| | | | | | | | 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)