| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Let's take advantage of GResource for loading ui files in a better and
cleaner way than virt_viewer_util_load_ui() was doing.
It also brings the benefit, at least for developers, of being able to
test ui changes without having to "make install" virt-viewer.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
|
|
|
|
|
|
|
| |
A few more pieces of old compatibility code can be dropped, as we
already depend on GLib 2.38.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
| |
It's being slowly deprecated in glib
https://bugzilla.gnome.org/show_bug.cgi?id=754687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As sorted_displays is a vector containing all displays' order, its
allocation size must be the maximum display id + 1 instead of the
maximum display id. Also, fix the size used for sorting and iterating
the sorted_displays vector.
Valgrind log:
==15946== Invalid write of size 4
==15946== at 0x4169C0: virt_viewer_align_monitors_linear (virt-viewer-util.c:581)
==15946== by 0x42248B: virt_viewer_session_on_monitor_geometry_changed (virt-viewer-session.c:438)
==15946== by 0xBB41F03: _g_closure_invoke_va (gclosure.c:831)
==15946== by 0xBB5BC7C: g_signal_emit_valist (gsignal.c:3214)
==15946== by 0xBB5C764: g_signal_emit_by_name (gsignal.c:3401)
==15946== by 0x4328F3: virt_viewer_display_spice_monitor_geometry_changed (virt-viewer-display-spice.c:93)
==15946== by 0x432D60: virt_viewer_display_spice_size_allocate (virt-viewer-display-spice.c:224)
==15946== by 0xBB41CD4: g_closure_invoke (gclosure.c:768)
==15946== by 0xBB53538: signal_emit_unlocked_R (gsignal.c:3549)
==15946== by 0xBB5BEEF: g_signal_emit_valist (gsignal.c:3305)
==15946== by 0xBB5C29E: g_signal_emit (gsignal.c:3361)
==15946== by 0x637D6F6: gtk_widget_size_allocate_with_baseline (gtkwidget.c:6093)
==15946== Address 0x18c79d4c is 0 bytes after a block of size 12 alloc'd
==15946== at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==15946== by 0xBDD36D1: g_malloc0 (gmem.c:127)
==15946== by 0x41698D: virt_viewer_align_monitors_linear (virt-viewer-util.c:577)
==15946== by 0x42248B: virt_viewer_session_on_monitor_geometry_changed (virt-viewer-session.c:438)
==15946== by 0xBB41F03: _g_closure_invoke_va (gclosure.c:831)
==15946== by 0xBB5BC7C: g_signal_emit_valist (gsignal.c:3214)
==15946== by 0xBB5C764: g_signal_emit_by_name (gsignal.c:3401)
==15946== by 0x4328F3: virt_viewer_display_spice_monitor_geometry_changed (virt-viewer-display-spice.c:93)
==15946== by 0x432D60: virt_viewer_display_spice_size_allocate (virt-viewer-display-spice.c:224)
==15946== by 0xBB41CD4: g_closure_invoke (gclosure.c:768)
==15946== by 0xBB53538: signal_emit_unlocked_R (gsignal.c:3549)
==15946== by 0xBB5BEEF: g_signal_emit_valist (gsignal.c:3305)
Resolves: rhbz#1272650
Related: rhbz#1267184
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When starting virt-viewer in fullscreen mode, we generally try to
arrange guest displays exactly the same as client monitors. So if a
client machine has two monitors, we'll try to enable display 0 and 1 on
the guest (in that order). However, when using the configuration file to
map fullscreen displays to different monitors, the guest displays may
not be sequential, or there may be displays missing. For example,
consider the following configuration:
monitor-mapping=1:2;2:1
In virt_viewer_session_spice_fullscreen_auto_conf(), we were building an
array of GdkRectangles for the initial monitors that we want to enable
on the guest. We then configured the guest displays using the index of
the array for the as the id of the guest display. But when displays
are sparse or are out-of-sequence, the array index will not match the
>ntended display ID. This created problems where displays were arranged
incorrectly. By changing the simple array into a GHashTable, we can keep
the display ID together with the GdkRectangle until we need to use it,
and things will be configured correctly.
This regression was introduced by c586dc8c.
Fixes: rhbz#1267184
|
|
|
|
|
|
| |
This allows us to do a more accurate version check if the .vv file
producer wants to allow builds newer than x.y-z because they contain an
important bug fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Filter only our own debug messages.
https://bugzilla.redhat.com/show_bug.cgi?id=1118365
|
|
|
|
| |
glib_check_version() returns NULL if version is higher or equal.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
To be compatible with RHEVM, VirtViewerFile hotkey format will use the
Spice Controller format.
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
There is a number of things both virt-viewer and remote-viewer need to
do early during execution. Do it only in one place.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
|
|
|
| |
'remote-viewer foobar' shouldn't crash
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Make it a real GObject.
The parts specific to virt should go in virt-viewer.c
|
|
All source files must be named
virt-viewer-XXXX
All methods named
virt_viewer_XXX
|