IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Let's enable deprecated-declarations warnings as we want to:
1) Avoid insert/maintain deprecated widgets/methods
2) Avoid adding widgets/methods that are too new, what could cause
problems like virt-viewer not being able to build in a specific distro.
Patches for making these two items possible are coming, introducing
_VERSION_MAX_ALLOWED for both GLIB and GDK and removing (as much as
possible) deprecated widgets/methods/structures.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Since commit ed9b3f3 the main window is not hidden when disconnecting.
But it also is not hidden when a connection error occurs, leaving a
black display with a not so accurate message to the users in case they
try to connect to a non-valid address from the remote-viewer connection
window and in this case the main window (display #1) shuldn't be shown.
The impetus for this chance is the following:
- user runs remote-viewer without any argument
- the remote-viewer connection window shows up
- user attempts to connect to a non-valid address
- a dialog pops up indicating a failure connecting to the graphic server
- the main window shows up saying "Connecting to the graphic server"
- user clicks 'Ok'
- the main window stays there with the same message
As a user, I expect the program to not show the main window in
connecting failure cases. This patch accomplishes that.
The reason for using properties to access those members was to ensure
that they would only be set during the creation of the object. Now that
we removed that restriction, we set private members directly.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Most of this patch consists in code being shuffled around to fit the
expected flow while using the new APIs. I tried my best to make this
patch the less intrusive as possible. Main changes are:
- Updated build requirements
* glib version 2.38
* gtk+ version 3.10
* gio
- VirtViewerApp is now a subclass of GtkApplication.
Some mainloop calls were replaced:
* gtk_main() -> g_application_run()
* gtk_quit() -> g_application_quit()
- Unified command line option handling.
The logic has moved from the main functions and split in common
options, and specific ones for each application. With this, the main
functions were highly simplified, and now basically responsible for
instantiating the App object and running the main loop.
- All Window objects must be associated with the Application.
With this, there is no need to emit our own 'window-added'/'window-
removed' signals, as those will be emited by GtkApplication whenever
gtk_application_add_window() and gtk_application_remove_window() are
called. Also, 'window-removed' was not being used anywhere.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
- Reuse #ifdef HAVE_SPICE_GTK block for include.
- Move declaration of vfunc together with others of the same class.
- Move variable declaration to the top of the function.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The 3.0 release was the last one that still supports GTK2. For the
Windows builds the support to GTK2 was dropped in the previous release.
Let's do the same for the entire project now.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The button is visible in the fullscreen toolbar when waiting for a guest.
Clicking on it causes the runtime warning:
virt-viewer-CRITICAL **: virt_viewer_session_usb_device_selection: assertion 'VIRT_VIEWER_IS_SESSION(self)' failed
Avoid the debug message on close:
virt-viewer-DEBUG: Unable to get comment from key file: Key file does not have group '39cd210d-5d45-478a-91fe-b3680307f2df'
Avoid calling gtk_widget_queue_resize() and emiting
the "display-desktop-resize" signal.
The only user of the properties is virt_viewer_display_spice_set_desktop()
which will call the function and emit the signal after setting both
"desktop-width" and "desktop-height" properties.
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Nowadays the value for MIN_DISPLAY_{WIDTH,HEIGHT} is 50. This arbitrary
value doesn't bring any benefit, doesn't provide a useful size for a
desktop to be usable and can actually trigger some undefined behavior
when reaching resolutions that are lower than the ones provided by the
video drivers (as in rhbz#1296878).
In order to avoid these issues and provide a minimum resolution that can
still be useful for our users, let's use the same values for minimum
width and height used by the linux QXL drivers (320x200).
This also requires us to adjust the minimum requested widget size when
zoom is enabled so that we don't accidentally request a size smaller
than the driver can support.
Related: rhbz#1296878
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Otherwise we can have warnings when resizing the virt-viewer window to
the smallest possible size, like:
(virt-viewer:11187): GLib-GObject-WARNING **: value "50" of type `gint'
is invalid or out of range for property `desktop-height' of type `gint'
Related: rhbz#1296878
0a7fa73f is the commit that dropped support for gtk2 for the nsis
installer.
03c014cb is the commit that dropped support for gtk2 for the msi
installer.
We're telling autoconf to look in the m4/ directory for
files, but this directory doesn't exist in a clean checkout
until libtoolize has run. Older versions of autoconf consider
this to be a fatal error.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Any copyright line must use 'Copyright (C) <year> Red Hat'
per the syntax-check rule.
Use of -a / -o args to "test" is non-portable and should
instead be done with 'test ... || test ...'
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Makefile.am: Use helper variables from git.mk
man/Makefile.am: This should be $(dist_man_MANS) instead of $(man_MANS)
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
After removing m4/.gitignore file in previous patch, I started getting
the following error when running autogen.sh.
ln: failed to create symbolic link ‘m4/intltool.m4’: No such file or directory
cp: cannot create regular file ‘m4/intltool.m4’: No such file or directory
intltoolize: cannot copy '/usr/share/aclocal/intltool.m4' to 'm4/intltool.m4'
The problem is that intltoolize requires te m4/ directory to be present,
and this directory is actually created by running autoreconf, so it
should be called before intltoolize.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
When running in fullscreen it is possible to end up in a situation
where we have more displays enabled than monitors. This can happen
if displays that were enabled in the previous connection to the guest
doesn't match displays requested when entering the fullscreen mode.
This commit solves the problem by disabling displays that should not be
enabled in the fullscreen mode.
Resolves: rhbz#1212802
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
Creating the monitors hashtable only after checking for the existence of
apply_monitor_geometry vfunc avoids leaking the hashtable in the case
where the vfunc doesn't exist.
Related: rhbz#1267184