Commit Graph

25 Commits

Author SHA1 Message Date
Jonathon Jongsma
8fa5e004ec Shift top-left display to origin
When using a custom fullscreen display configuration, it's possible to
specify that e.g. a single screen should be fullscreen on client
monitor #4. Since we send down absolute positions and disable alignment
when all windows are in fullscreen, we can send configurations with a
very large offset to the top-left corner. This could result in the guest
trying to create a screen that was much larger than necessary. For
example when sending a configuration of 1280x1024+4240+0, the guest
would need to allocate a screen of size 5520x1024, which might fail if
video memory was too low. To avoid this issue, we shift all displays
so that the minimum X coordinate for all screens is at x=0, and the
minimum y coordinate is at y=0.
2014-10-27 10:37:31 -05:00
Jonathon Jongsma
221d5f5cd4 Move monitor alignment function to util header 2014-10-24 09:14:09 -05:00
Fabiano Fidêncio
dc3db6302e Don't check for NULL when it never can happen 2014-08-19 18:10:03 +02:00
Marc-André Lureau
6b997e5696 Only filter virt-viewer debug messages
Filter only our own debug messages.

https://bugzilla.redhat.com/show_bug.cgi?id=1118365
2014-07-21 18:47:36 +02:00
Marc-André Lureau
48d8fa788d util: fix glib_check_version() condition
glib_check_version() returns NULL if version is higher or equal.
2014-06-12 12:01:38 +02:00
Marc-André Lureau
2bd835fb05 Use a custom log handler to silence debug messages
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
2014-06-10 18:13:56 +02:00
Jonathon Jongsma
bee13a6a59 Display warning if UI file fails
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).
2014-02-11 11:56:37 -06:00
Jonathon Jongsma
9f6878c35a Load ui files first from installed location
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.
2014-01-20 16:10:12 -06:00
Jonathon Jongsma
d574197a70 Add ability to use 'End' key in hotkeys
ctrl_key_to_gtk_key() capitalizes all key names not explicitly specified in the
translation table.  So 'end' becomes 'END', which is not a valid key name
according to GTK+.  Un-comment out the 'end' item from the table and set it to
the properly capitalized key name ("End").

This allows users to specify e.g. "ctrl+alt+end" as a hotkey for
sending the secure attention sequence.
2013-09-10 08:06:13 +02:00
Marc-André Lureau
49c242f526 Add virt_viewer_compare_version() 2013-03-08 16:54:01 +01:00
Marc-André Lureau
ef9b142dd9 Add VIRT_VIEWER_ERROR GError 2013-03-08 16:54:01 +01:00
Marc-André Lureau
4bf7aabbf3 Move spice_hotkey_to_gtk_accelerator() to util
To be compatible with RHEVM, VirtViewerFile hotkey format will use the
Spice Controller format.
2012-11-27 20:07:10 +01:00
Marc-André Lureau
8b06fb7319 Fix jenkins build failure
virt-viewer-util.c: In function 'virt_viewer_util_init':
virt-viewer-util.c:289: warning: implicit declaration of function 'setlocale'
virt-viewer-util.c:289: warning: nested extern declaration of 'setlocale'
virt-viewer-util.c:289: error: 'LC_ALL' undeclared (first use in this function)
virt-viewer-util.c:289: error: (Each undeclared identifier is reported only once
virt-viewer-util.c:289: error: for each function it appears in.)
2012-10-23 15:59:38 +02:00
Marc-André Lureau
93da043657 Use a mutex to check if VirtViewer running
We need to warn user that installer can't proceed if there is already
a running instance of VirtViewer or of the installer.

https://bugzilla.redhat.com/show_bug.cgi?id=864033
2012-10-23 14:49:23 +02:00
Marc-André Lureau
14a1d48745 Use a common early init() function
There is a number of things both virt-viewer and remote-viewer need to
do early during execution. Do it only in one place.
2012-10-23 14:49:23 +02:00
Marc-André Lureau
c6c335799d spice: disconnect signal handlers when either object is destroyed
Use virt_viewer_signal_connect_object(), a copy of telepathy
utility function tp_g_signal_connect_object(). This function
will take care of removing signal handler if any of emitter or
attached object are destroyed.

The following patches will have this condition met, since there is no
longer 1-1 relation between channel and display. The channels can
continue to be around when some of the display are removed.
2012-07-23 16:27:32 +02:00
Daniel P. Berrange
7ab88ea179 Add support for raw IPv6 addresses in VNC & libvirt URIs
Support   vnc://[x:y:z:]:5901/  for raw IPv6 addresses in URIs,
and qemu+ssh://root@[x:y:x:]:22/ for raw IPv6 addresses in
libvirt URIs
2012-04-23 09:42:34 +01:00
Marc-André Lureau
e06c822023 Do not crash so easily when given invalid uri
'remote-viewer foobar' shouldn't crash
2012-03-16 17:16:57 +01:00
Daniel P. Berrange
a893d5ef61 Update copyright headers 2012-02-06 12:42:18 +00:00
Daniel P. Berrange
e1283a9a60 Convert TABS to spaces & reindent everywhere 2012-02-06 12:40:09 +00:00
Marc-André Lureau
b1d2f16790 build: replace deprecated functions 2012-01-30 17:10:12 +00:00
Marc-André Lureau
f08c5308ca Return if xmlParseURI() failed, instead of crashing 2011-08-04 13:32:25 +01:00
Marc-André Lureau
1002a220a4 Lookup UI file correctly, to fix Windows support 2011-08-04 13:32:17 +01:00
Marc-André Lureau
dd9c85a32d Inherit from VirtViewerApp for VirtViewer
Make it a real GObject.

The parts specific to virt should go in virt-viewer.c
2011-07-22 16:11:18 +01:00
Daniel P. Berrange
f3fa999769 Introduce standard naming convention to files & methods
All source files must be named

  virt-viewer-XXXX

All methods named

  virt_viewer_XXX
2011-07-01 16:12:20 +01:00