| 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>
|
|
|
|
|
|
|
|
|
|
|
| |
These function have been deprecated since Gtk 3.0 and is recommended to
use _override_color() and _override_background_color() instead.
As these new functions take a GdkRGBA as parameter, let's use
gdk_rgba_parse() instead of gdk_color_parse().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been deprecated since Gtk 3.10.
New strings have been added as the GTK_STOCK_* defines had their
translations done inside Gtk itself, but now the translations of the new
added labels must be done by virt-viewer translators.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Pavel Grunt <pgrunt@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there was a single function for controlling the enabled
state of a display: virt_viewer_display_set_enabled(). Unfortunately,
this function is used for two slightly different things:
A. It informs the local display widget that the display has become
disabled or enabled on the server. In other words, it tries to
synchronize the 'enabled' state of the local widget with the actual
state of the remote display.
OR
B. It tries to actively enable a currently-disabled display (or vice
versa) due to some action by the user in the client application.
This causes the client to send a new configuration down to the
server. In other words, it tries to change the state of the remote
display.
There is some conflict between these two scenarios. If the change is due
to a notification from the server, there is no need to send a new
configuration back down to the server, so this results in unnecessary
monitor configuration messages and can in fact cause issues that are a
little bit hard to track down. Because of this, I decided that it was
really necessary to have two separate functions for these two different
scenarios. so the existing _set_enabled() function will be used for
scenario A mentioned above. I added two new
functions (_enable() and _disable()) that are used to send new
configurations down to the server.
|
|
|
|
|
|
|
|
|
| |
The zoom can be changed by resizing the window (VNC / Spice without
the agent). It is necessary to recalculate the zoom level before
changing it, otherwise zoom operations will not work correctly.
Resolves:
https://bugs.freedesktop.org/show_bug.cgi?id=90582
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under some circumstances (Xfce desktop environment, gtk3 client, RHEL6
guest having two monitors running locally) it is possible to create
a loop of resizing windows. It is caused by size request like 1x1 sent
to the guest. These request are created because _window_queue_resize()
is called when the window is being shown.
To avoid the problem, call gtk_widget_show() after its preferred and
default sizes are set.
Resolves:
https://bugs.freedesktop.org/show_bug.cgi?id=91405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function virt_viewer_window_resize restricts window to be bigger
than a client's screen. It avoids extending the window to more client's
screens, it causes changes of the zoom level if the guest does not fit
into a screen.
Lets remove virt_viewer_window_resize (its behaviour was introduced
by the commit 6acb3856b6d8007752388f22f97aa8aaffdb7a5e). It will let
the window managers to handle resizing of the window.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1221501
https://bugzilla.redhat.com/show_bug.cgi?id=1205804
|
|
|
|
|
| |
Since c3cbdef888cc823e92140027d38378f40ccd4174 virt_viewer_window_resize
is always called with keep_win_size = FALSE.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit c45a30e9 broke syntax-check:
trailing_blank
src/virt-viewer-window.c:1478:
maint.mk: found trailing blank(s)
maint.mk:700: recipe for target 'sc_trailing_blank' failed
make: *** [sc_trailing_blank] Error 1
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
|
|
|
| |
It is not needed to do it more times as it may cause unnecessary resize
events especially when leaving the fullscreen mode
related: rhbz#1206460
|
|
|
|
|
|
|
|
|
| |
NORMAL_ZOOM_LEVEL
The minimum size of the desktop is 100x100 if the minimum window size
is greater than this, the zoom level is greater than NORMAL_ZOOM_LEVEL
related: rhbz#1206460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
File->Screenshot, File->Preferences, View->Zoom and Send keys are now
sensitive only while quest is connected.
Changed behaviour of zoom:
Previously, zoom could be set while quest wasn't connected. The zoom
would then be set on connection. There was no indication of current zoom
level while not connected to guest.
Now, the menu is not sensitive while not connected to guest. Zoom can
now be only modified while connected to guest, or from the command line.
|
|
|
|
|
| |
Displays menu must be sensitive only when at least one display is
enabled.
|
|
|
|
|
|
|
|
|
|
|
| |
same
The zoom level should be changed when zoom levels of the window and
the display are different. It is wrong to check the previous value of
the window because it could be set just for the window and not for
the display (e.g. when setting zoom level using the command line).
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
|
|
|
|
|
|
|
|
|
|
|
| |
The display has default dimensions (100x100) when it is disabled.
Calculating the minimal zoom for the display will give wrong value
for the newly opened display.
It is better to wait for setting the zoom level to the moment when
the display is enabled and ready.
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
|
|
|
|
|
|
|
|
| |
Do not allow to zoom out if it is not possible due to the width of
the top menu. It avoids emitting size allocation events that will
change the display resolution of the spice guest.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
|
| |
|
| |
|
|
|
|
| |
Add a menu item Preferences under File and show the preferences dialog
|
|
|
|
|
|
|
| |
The ability to send a keystroke should not depend on whether a display
is ready or not, it only depends on whether the display exists or not.
See https://bugzilla.redhat.com/show_bug.cgi?id=1152574
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since a window is not created at startup for each display, the first
display(s) set when the application is opened will never receive and
treat the "notify::show-hint" signal on VirtViewerWindow, once the
callback is only set when the display is set to the specific window.
It causes problems like the "Send Key" menu not activated till an extra
display is added. To avoid this problem, let's force a call to
display_show_hint() everytime a display is set.
Resolves: rhbz#1152468
https://bugzilla.redhat.com/show_bug.cgi?id=1152468
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the fullscreen floating toolbar and the "toggle-fullscreen"
hotkey (which maps to the menu item action) had slightly different
methods of exiting fullscreen. The floating toolbar method unset the
'fullscreen' property on the application (which causes all windows to
simultaneously exit fullscreen), whereas the hotkey did not. This had a
side-effect of preventing the display from auto re-sizing if it was
fullscreened again. After this change, both the hotkey and the toolbar
button will unset the application-level 'fullscreen' property when
exiting fullscreen mode.
Resolves: rhbz#1022608
|
|
|
|
|
|
|
|
|
| |
When setting the 'display' for a VirtViewerWindow, the initial size for
that window should be the size of the remote display. So we synthesize a
desktop resize event when setting a new display for a window. This is
only done for enabled displays. Disabled displays generally have a size
of 0x0, which would result in the window being at it's minimum size, so
just allow the window to use its default size.
|
| |
|
| |
|
|
|
|
|
|
| |
This allows the user to obtain the GUID and vm name of the currently-connected
guest. Obviously, this only works with spice. In the future, it will allow them
to set guest-specific configuration options (using a GUID as a key)
|
|
|
|
|
|
| |
glib documentation says this should be the last thing done in the
dispose() call, which makes sense as this could invalidate still-needed
data in the parent object.
|
|
|
|
|
|
|
| |
Make ctrl-[+-] zoom in/out in fullscreen
with mouse over the control bar.
https://bugzilla.redhat.com/show_bug.cgi?id=987549
|
|
|
|
|
|
| |
Fixes guest can not be resized to expected window size after zoom out.
https://bugzilla.redhat.com/show_bug.cgi?id=1105528
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1107518
|
|
|
|
|
| |
To avoid some races with metacity, the window should be placed as
early as possible, before it is (re)allocated & mapped (rhbz#809546).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the --hotkeys option is given, all hotkeys that are not explicitly
specified are disabled. The method used to disable hotkeys is to change the
accel map entry to key=0, mods=0. However, when we decide whether to set a grab
sequence on the spice dispay widget, we simply use the return value for
gtk_accel_map_lookup_entry and assume that a TRUE value returned from this
function means that the hotkey is enabled. In reality, this function will
return TRUE for disabled hotkeys, but the 'key' variable will be set to key=0,
mods=0. The result is that if I start virt-viewer like this:
virt-viewer --hotkeys secure-attention=ctrl+alt+end ...
and the guest that I'm attached to uses server mouse mode, it will be impossible
to release the grab on the spice widget. Because we will explicitly disable the
grab keys in the spice widget and handle the 'release-cursor' hotkey in
virt-viewer, but the hotkey is an empty accel key.
Instead of simply checking the return value of gtk_accel_map_lookup_entry, we
have to inspect the return value for 'key' and check whether any keys are
actually assigned.
|
|
|
|
|
|
|
|
| |
Replace the generic GTK_STOCK_PREFERENCES with a more appropriate USB icon.
The icon was provided by Jakub Steiner <jsteiner@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=804184
|
|
|
|
|
|
|
| |
Remove "Automatically resize" menu item (always enabled for Spice
display now)
https://bugzilla.redhat.com/show_bug.cgi?id=1007649
|
|
|
|
|
|
|
|
|
| |
The code to determine scaling of windows was incorrectly
using the original desktop size instead of the host screen
size. The 128 pixel fudge factor was also causing windows
to be scaled when there was no need for them to be.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
This ensures that the display is enabled when it gets its first Allocate event
(which causes a display reconfiguration). If the display is not enabled at this
point, it won't send down a new monitors_config message until the second
allocation, which may result in the display being disabled until a window is
resized.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
When we enter fullscreen mode before the window is shown, we set up a signal
handler to enter fullscreen mode when the window is mapped. If we then leave
fullscreen mode before the window is mapped, we don't disconnect this handler,
so it will still enter fullscreen mode when it is shown.
Fixes rhbz #1009513
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When you call virt_viewer_window_enter_fullscreen() on a hidden window, it
didn't actually change its fullscreen state. Instead, it sets up a map-event
handler to enter fullscreen after it is shown. When _set_display() is called on
a window that is pending fullscreen status, it initially sets the fullscreen
state of the display to FALSE, which can cause an unwanted resize to be sent
down to the guest. This patch changes the behavior to set its fullscreen state
to TRUE even before the window is shown.
|
|
|
|
|
|
|
|
| |
This fixes the "send menu" for hotkeys set with non-modifiers keys. The
current order of press events is wrong, as it sends first non-modifiers
keys, and in general ctrl+t will work, t+ctrl will not.
https://bugzilla.redhat.com/show_bug.cgi?id=846006
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
Allow to run the client in kiosk mode with window-manager-less
environment.
This was a conditional workaroud on win32. I am making it
non-conditional to make fullscreen work on non-wm environment. Hence
I don't see the need to refer explicitely to the bug workaround, since
it is no longer something that should be removed, even when bgo 652049
is fixed.
|
|
|
|
|
| |
These condition shouldn't happen, they are here for debugging
purposes (ie file a bug if it happens).
|
|
|
|
| |
Remove the toolbar, disable modifiers.
|
|
|
|
|
| |
We are going to change the container content dynamically, so we need a
strong reference.
|
|
|
|
| |
See man page update for details.
|
|
|
|
|
|
|
|
|
| |
The g_array_free() return value is 'char *' rather than 'void *'
so must be explicitly cast to 'uint8 *'.
The accelerator menu callback data is a GtkMenu rather GtkWidget
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|