| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Remove the distinction between --full-screen and --full-screen=auto-conf. Just
make --full-screen behave like auto-conf did. There's really no advantage to
having two slightly different fullscreen startup modes.
|
|
|
|
|
|
|
|
|
|
|
| |
Whether the hotkeys are set through command line, controller or file, we
should get the same keybinding result (clear unspecified, and enable
global bindings)
However, when started from command line arguments, without --hotkey
argument, it will have basic non-global default bindings.
https://bugzilla.redhat.com/show_bug.cgi?id=1023447
|
|
|
|
| |
This avoid confusion with other fullscreen state property
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In kiosk mode, we don't want new monitors windows that wouldn't fit on
the client monitors to come up.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
See man page update for details.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Let's get out of auto-conf mode whenever user tricks display visibility.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=864026
|
| |
|
| |
|
|
|
|
|
| |
The current code will forcefully reset fullscreen all windows
when a new window is created
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This also makes the code consistent with its surroundings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
If the string is different, the GLib log handler will not log all
messages.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
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
|