Commit Graph

677 Commits

Author SHA1 Message Date
Marc-André Lureau
e2dce44aa2 Make zoom-reset a global key binding 2013-07-30 21:09:30 +02:00
Marc-André Lureau
323d85d18a spice: if zoom-level is changed, resize guest, even in fullscreen 2013-07-30 21:09:16 +02:00
Marc-André Lureau
dc59eeb3b8 spice: factor out spice resize code from gtk signal handler
This will allow that part of the code to be called with a different
resize-guest setting.
2013-07-30 21:09:12 +02:00
Marc-André Lureau
c8e5b8e3b0 msi: use ProductVersion compatible with Windows Installer
Windows Installer expects version of form major.minor.build in order to
perform updates.

Following Daniel Berrange suggestion, compute a ProductVersion
compatible with this scheme by shifting virt-viewer "micro" release
number and adding the extra "buildid".
2013-07-30 21:08:26 +02:00
Marc-André Lureau
460a463c81 wxs: add usb.ids and keyboard-shortcuts.png 2013-07-30 21:05:14 +02:00
Marc-André Lureau
e46a4d6759 Hide extra monitors that don't fit in auto-conf
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
2013-07-30 20:33:45 +02:00
Marc-André Lureau
00d523bdf8 Realize the display when it's added to the window
Make sure the widget get some dimensions, so if the display is enabled
before it is actually shown, it will have non-zero size
2013-07-30 20:33:42 +02:00
Marc-André Lureau
24c762b113 Initialize fullscreen_monitor to invalid value
This makes it easier to debug when a window has no associated monitor.
2013-07-30 20:28:31 +02:00
Marc-André Lureau
072e6957c2 Disable auto-conf when user toggle display
Let's get out of auto-conf mode whenever user tricks display visibility.
2013-07-30 20:28:27 +02:00
Marc-André Lureau
05333f0e93 Remove dead function 2013-07-30 20:26:35 +02:00
Daniel P. Berrange
4f31e16ba5 Remove typo \\n in de.po translation
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-07-29 12:03:35 +01:00
Ján Tomko
cf92350bf7 Unregister events and callbacks on dispose
Without these libvirtd reports an error on virt-viewer shutdown:
virNetSocketReadWire:1377 : End of file while reading data: Input/output
error
2013-07-29 11:17:10 +02:00
Christophe Fergeau
59ca6bd8a7 virt-viewer: Allow TLS-only SPICE connections
When trying to connect to a VM which uses SPICE with only a tls port
set:
<graphics type='spice' tlsPort='-1' autoport='no' listen='0' keymap='en-us'>
    <listen type='address' address='0'/>
</graphics>
the connection will fail with
"Cannot determine the graphic address for the guest spice"

virt_viewer_extract_connect_info() indeed assumes that if no
non-TLS port is set, then this means we are trying to connect through
an already open socket, and otherwise the connection fails.
The presence of a TLS port is only checked when a non-TLS port is set.

This commit reworks that logic to start by extracting both the non-TLS
and TLS ports (only when using SPICE for the latter), and by only trying
to parse the socket to use if none of these 2 ports is set

This fixes rhbz#982840
2013-07-11 08:50:08 +02:00
Daniel P. Berrange
ac4c71a3f0 Refresh translations from transifex
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-07-09 21:12:23 +01:00
Marc-André Lureau
008779488b vnc: implement release_cursor()
Error reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=904094
2013-07-08 20:02:51 +02:00
Marc-André Lureau
307009954a app: always use maybe_quit()
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
2013-07-08 20:02:51 +02:00
Hans de Goede
999b734865 usbredir: Don't depend on channel ordering
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>
2013-07-06 09:03:30 +02:00
Marc-André Lureau
9da9305554 Use display fullscreen state instead of app state
This is a recent regression introduced by independant fullscreen windows
support, which reopened the bug "Resolution higher than native could not
be set in fullscreen"

https://bugzilla.redhat.com/show_bug.cgi?id=864929
2013-07-05 13:24:01 +02:00
Marc-André Lureau
933c39e80a window: set display fullscreen state 2013-07-05 13:24:01 +02:00
Marc-André Lureau
8e3ffc932c display: add fullscreen property
Now that fullscreen state is no longer global to application, we need to
have the current state per display
2013-07-05 13:21:09 +02:00
Marc-André Lureau
eeadf5bc53 Remove debugging leftover 2013-07-05 13:20:00 +02:00
Marc-André Lureau
85892affca data/remote-viewer.desktop: Fix missing trailing ;
data/remote-viewer.desktop: error: value
"x-scheme-handler/spice;application/x-virt-viewer" for string list key
"MimeType" in group "Desktop Entry" does not have a semicolon (';') as
trailing character
2013-07-04 16:30:22 +02:00
Christophe Fergeau
9ca68938da Use -H instead of -h for the short --hotkeys
-h conflicts with the short version of --help.

Fixes rhbz#980846
2013-07-03 21:18:41 +02:00
Marc-André Lureau
9cad9ae00c Fix build --without-spice-gtk 2013-06-28 16:47:27 +02:00
Guido Günther
fda35e6976 Use format string
to fix

virt-viewer.c: In function 'virt_viewer_connect':
virt-viewer.c:686:13: error: format not a string literal and no format arguments [-Werror=format-security]
             g_warning(error->message);
2013-06-26 10:13:08 +02:00
Christophe Fergeau
7c0967fc8c ovirt: Set host subject if needed
For some VMs, setting host subject on SpiceSession is needed to
be able to connect to it using SPICE/SSL. Until recently, this
was not exposed in oVirt REST API/libgovirt. Since
oVirt 3.2/libgovirt 0.1.0, the host subject is available, this
patch makes use of it.
This should fix connection to oVirt VMs that were migrated to a
different host than the one they were started on.
2013-06-11 15:54:37 +02:00
Christophe Fergeau
16df26cf5f spec: Add missing % in %if 0{?fedora}
This was missing in previous commit.
2013-06-04 18:26:13 +02:00
Christophe Fergeau
18636794dc spec: Deprecate spice-client
This has been true for quite some time, it's high time we stop
building spicec and have remote-viewer replace it on upgrades.
2013-06-04 18:13:16 +02:00
Marc-André Lureau
df30f9730d Support Spice controller "auto-display-res" flag
The controller "auto-display-res" flag should be use to reconfigure
guest to match client configuration. This is what the
--fullscreen=auto-conf option is already made for.

https://bugzilla.redhat.com/show_bug.cgi?id=967154
2013-05-27 15:29:45 +02:00
Marc-André Lureau
9ddce05ce7 man: document auto-conf fullscreen option
https://bugzilla.redhat.com/show_bug.cgi?id=875559
2013-05-24 17:40:47 +02:00
Marc-André Lureau
f0f52f9406 Use a more descriptive FileDescription
This field is used to invite the user to close running instances, when
updating the installation with an MSI. "A remote desktop client" isn't
specific enough, use a VirtViewer specific description.
2013-05-23 17:31:05 +02:00
Marc-André Lureau
2c1e7c18bf build-sys: add debug-helper rule 2013-05-23 17:30:59 +02:00
Marc-André Lureau
d9035d0535 app: move display on client monitors with --full-screen
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.
2013-05-22 21:36:15 +02:00
Marc-André Lureau
17e3c48d0a Fix trivial critical
GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL'

Committed without review under trivial rule.
2013-05-21 18:25:16 +02:00
Marc-André Lureau
240baeeb44 Show connect dialog again if connection from dialog failed
https://bugzilla.redhat.com/show_bug.cgi?id=864026
2013-05-17 14:15:06 +02:00
Marc-André Lureau
6ed73f150c spice-session: use a more robust signal connect
The Spice session may outlive the virt-viewer session, due to it's async
nature. Use the more robust virt_viewer_signal_connect_object() to fix
delayed potential crashes.
2013-05-17 14:15:06 +02:00
Marc-André Lureau
79255e80d5 Move connect dialog to remote-viewer.c 2013-05-17 14:15:06 +02:00
Marc-André Lureau
93ac885838 Silence unused arguments warnings
In file included from virt-viewer-session-spice.c:41:
gbinding.c: In function 'on_source_notify':
gbinding.c:381: warning: unused parameter 'gobject'
gbinding.c: In function 'on_target_notify':
gbinding.c:422: warning: unused parameter 'gobject'
gbinding.c: In function 'g_binding_init':
gbinding.c:709: warning: unused parameter 'binding'
2013-05-16 21:54:48 +02:00
Marc-André Lureau
ccd2882cce Rename variable, fix gcc warning
virt-viewer-main.c:61: warning: declaration of 'basename' shadows a global declaration
2013-05-16 21:54:48 +02:00
Marc-André Lureau
d0d8a9fba0 Remove the "container" logic used by legacy browser plugin 2013-05-16 21:54:48 +02:00
Marc-André Lureau
79fd2ea3d0 window: wait until mapped before fullscreen
On RHEL6, when starting virt-viewer --full-screen, metacity will
remaximize & force-fullscreen when leaving fullscreen, which prevents
user from accessing window titlebar, and end up with an incorrect
fullscreen state.

Thanks Owen Taylor for help debugging this:

<owen> elmarco: So the interesting thing here is that the "legacy" isn't
       triggered off a configure request to a particular size, mutter seems to
       constrain the window back to fullscreen size on its own when it sees a
       change to WM_NORMAL_HINTS
<owen> commit 4943d79d6844af3f7fc0a15ceadb69d95c4c5c61
<owen> Author: Peter Bloomfield <PeterBloomfield@BellSouth.net>
<owen> Date:   Wed Jan 20 10:59:07 2010 -0500
<owen>     prevent window self-maximisation
<owen> Is not in rhel6 metacity
<owen> So probably that's the main difference
<owen> can you just make your program not fullscreen initially but wait until
       it's mapped? (gets map-event on the toplevel)
<elmarco> owen that seems to work
<owen> I don't have a better solution to offer - sorry for the ugliness (code and
       initial mapping appearance)

https://bugzilla.redhat.com/show_bug.cgi?id=876445
2013-05-16 21:54:48 +02:00
Marc-André Lureau
63ad7719b9 Only fullscreen the new window
The current code will forcefully reset fullscreen all windows
when a new window is created
2013-05-16 21:54:48 +02:00
Marc-André Lureau
a8c71751cd window: leave fullscreen on current window
Since fdaa9b0ca, virt-viewer allows to fullscreen a single window. It
feels more symetric to leave a single window from fullscreen as well,
unless the application was started in fullscreen.
2013-05-14 14:49:35 +02:00
Marc-André Lureau
0f6dd1f379 window: fix send key menu popup position
Fix send key menu popup position.

The current code wasn't correctly translating the menu coordinates
based on the toplevel windows position, it was always using origin 0.

https://bugzilla.redhat.com/show_bug.cgi?id=913601
2013-05-14 02:29:08 +02:00
Marc-André Lureau
b0557015a9 man: document running remote-viewer without URI
https://bugzilla.redhat.com/show_bug.cgi?id=882133
2013-05-13 14:26:45 +02:00
Marc-André Lureau
9b1ad0b118 Add -- to seperate program arguments to server in man / --help
Since some of the arguments are expecting following value, make it more
explicit in the man and --help that -- can seperate options from server
name or location.

https://bugzilla.redhat.com/show_bug.cgi?id=843103
2013-05-13 14:26:45 +02:00
Marc-André Lureau
fdaa9b0ca8 Allow to fullscreen and position display independently
Currently, going from window to fullscreen mode changes all display to
fullscreen and realize automatic positionning on corresponding client
monitor. However, it allows for much more flexibility to allow entering
fullscreen on the current monitor each windows seperately. This way the
user can decide on arbitrary monitor arrangement.

https://bugzilla.redhat.com/show_bug.cgi?id=558241
2013-05-13 14:26:45 +02:00
Marc-André Lureau
f3003c6aa6 spice: make sure display ready hint is sync after creation
The ready state can be set during construction time and
not notified immediately.
2013-05-13 14:26:45 +02:00
Marc-André Lureau
3293be3f93 misc: fix typo 2013-05-13 14:26:45 +02:00
Marc-André Lureau
d1fd8c3f66 Do not restrict disabling display to != 0
Virt-viewer hides the display window 0, but doesn't disable the display.
This is inconsistent with other displays, and prevent the guest OS from
reconfiguring the main display.

(for monitor 0 to be really disabled in multi-monitor guest, the agent
need to support sparse monitor config. If not, the first display windows
will be reopened to match the new un-sparse configuration)

Note also the current Linux vdagent crashes when disabling 1st monitor,
to be solved seperately.

Related bug:
https://bugzilla.redhat.com/show_bug.cgi?id=958550
2013-05-13 14:26:45 +02:00