- 19 Aug, 2020 5 commits
-
-
Signed-off-by:
Haochen Tong <i@hexchain.org> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
GDK scales hotspot coordinates using screen scale factor on X11. We need to undo this to get the correct hotspot behavior, otherwise mouse selection becomes very inaccurate and difficult in the guest. See [1]. [1] https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.21/gdk/x11/gdkcursor-x11.c#L556-557 Signed-off-by:
Haochen Tong <i@hexchain.org> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Fixes #127 . Signed-off-by:
Haochen Tong <i@hexchain.org> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Haochen Tong <i@hexchain.org> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
On HiDPI displays, guest screen used to be blurry because the screen size is smaller than the widget size, and is scaled up. This patch fixes that by considering scale factor when calculating geometry. Signed-off-by:
Haochen Tong <i@hexchain.org> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 11 May, 2020 2 commits
-
-
We can now properly manage mouse pointer lock by using the wayland protocols. Includes fix from Frediano Ziglio to manage switching from mouse in server mode to client mode without releasing the pointer (see fziglio/spice-gtk@c14b047e ) Signed-off-by:
Francesco Giudici <fgiudici@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
This will be used later to couple it with relative mouse movement under Wayland: we just get the mouse movement from the Wayland protocols callback. Signed-off-by:
Francesco Giudici <fgiudici@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 09 Apr, 2020 1 commit
-
-
emacs mode got removed with: git ls-tree HEAD -r --name-only | xargs sed -i '/Mode: C/d' Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 18 Dec, 2019 1 commit
-
-
If the pointer is freed with g_object_unref the two do the same. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Signed-off-by:
Snir Sheriber <ssheribe@redhat.com>
-
- 14 Oct, 2019 1 commit
-
-
Frediano Ziglio authored
In case the drawing on the screen is scaled the scaling required to invalidate a slightly bigger region. This is due to the interpolation done during the resize. So if scaling is performed invalidate also the adjacent pixels. This fixes #19 . Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 03 Sep, 2019 1 commit
-
-
Kevin Pouget authored
This patch allows the MJPEG encoder to inform the spice-widget that its video drawing area (draw-area) should be made visible on screen. This is required to switch from GST video decoding to native MJPEG decoding, otherwise the gst-area remained on top and the MJPEG video stream was never shown. Signed-off-by:
Kevin Pouget <kpouget@redhat.com> Acked-by:
Snir Sheriber <ssheribe@redhat.com>
-
- 11 Jun, 2019 1 commit
-
-
Snir Sheriber authored
When GDK_SCALE is != 1 and egl is used, the image presented does not fit to the window (scale of 2 is often used with hidpi monitors). Usually this is not a problem since all components are adjusted by gdk/gtk but with egl, pixel-based data is not being scaled. In this case window's scale value can be used in order to determine whether to use a pixel resource with higher resolution data. In order to reproduce the problem set spice with virgl/Intel-vGPU and run spice-gtk with GDK_SCALE=2 This issue was also reported at freedesktop gitlab repo: #99 Signed-off-by:
Snir Sheriber <ssheribe@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 22 Feb, 2019 3 commits
-
-
Victor Toso authored
Documentation for gdk_display_get_primary_monitor() says that it returns "the primary monitor, or NULL if no primary monitor is configured by the user". If monitor end up being NULL, we end up using uninitialized GdkRectangle geom later on as gdk_monitor_get_geometry() will fail with: | gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed This patch tries gdk_display_get_monitor_at_point() and will fail if no GdkMonitor is set. Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Olivier Fourdan authored
The Spice Gtk widget relies on pointer grabs to receive all pointer events even after the pointer has left the window. While that works on X11, on Wayland there is no active pointer grab, so once the pointer has left the SPICE widget on Wayland, the events are routed to the window with the pointer focus instead of ours. To avoid the problem, on Wayland, we simply ungrab the pointer once it leaves the window. Thanks-to: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> #83 Acked-by:
Victor Toso <victortoso@redhat.com>
-
Olivier Fourdan authored
Using different GDK APIs to grab and ungrab devices leads to undetermined behavior and can cause the cursor to remain hidden on ungrab on Wayland because GDK Wayland backend keeps a reference of the GdkSeat cursor. On Wayland, use the GdkSeat API only even for ungrab, by ungrabbing the seat and immediately re-grabbing the remaining keyboard or pointer if the grab is to be retained. Thanks-to: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Fixes: #83 See-also: https://gitlab.gnome.org/GNOME/gtk/issues/787 Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 15 Jan, 2019 3 commits
-
-
Frediano Ziglio authored
The vaapisink plugin to support overlay requires the application to provide the proper context. If you don't do so the plugin will cause a crash of the application. To avoid possible thread errors from X11 create a new Display connection to pass to vaapisink. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Snir Sheriber <ssheribe@redhat.com>
-
Marc-André Lureau authored
GStreamer is being increasingly used by spice-gtk. Let's make it a core requirement. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Snir Sheriber <ssheribe@redhat.com>
-
Frediano Ziglio authored
Calling gst_video_overlay_handle_events after gst_video_overlay_set_window_handle causes often a deadlock in gstreamer-vaapi. Reverting the calls fix this issue. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Snir Sheriber <ssheribe@redhat.com>
-
- 08 Jan, 2019 1 commit
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Snir Sheriber <ssheribe@redhat.com>
-
- 05 Jan, 2019 1 commit
-
-
Marc-André Lureau authored
Add a new "label" stack page. When EGL is unsupported and a GL scanout message is received, switch to that page with an appropriate message hint. At this point, no further switch back to 2d drawing is implemented, although it is theorically possible for a server to switch between GL and 2D, I don't think we need to bother with this corner case. Alternative implementation also considered: - a dialog: problematic, the widget may not have an associated GtkWindow parent, not very user friendly (one time dialog). - an info-bar: does not fit well inside display widget, may not be well integrated with client application. Can usually be discarded. - an error signal: would need to be implemented by various client, but could give more flexibility on how to present various errors. Could be added later, and replace the "label" page used here by default (if a signal handler is detected). - a property: may be more appropriate, since the error should stick. Although it would more complicated to deal with multiple errors in that case. The current solution is not perfect, but should be a decent default, not requiring client modification. It can be later refined by adding a way for the client to override the presentation of the message via signal handlers. Fixes: #69 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 03 Jan, 2019 2 commits
-
-
With previous patch changes it's now possible to call GstVideoOverlay interface functions in response to matching gtk events. This patch fixes the window resize and possibly other rendering issues. Signed-off-by:
Snir Sheriber <ssheribe@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
This patch is changing the way GstVideoOverlay is being set. Once pipeline is created a pointer is passed to the widget using GObject signal, so we can set there the overlay interface and call its functions from widget callbacks. This allows to solve issues like resizing the window. Signed-off-by:
Snir Sheriber <ssheribe@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 30 Nov, 2018 1 commit
-
-
Frediano Ziglio authored
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Christophe Fergeau <cfergeau@redhat.com>
-
- 18 Sep, 2018 1 commit
-
-
The scroll wheel on the mouse will trigger a smooth scroll event with a delta of +/-1.0. The code added in 2212f051 triggers a scroll when the delta is strictly greater than 1.0. This means that right after connecting a client, we won't be triggering a scroll with the first mouse wheel 'click'. This commit adjusts the check so that we try to scroll when the delta is equal or greater than 1.0. https://bugzilla.redhat.com/show_bug.cgi?id=1627823 Signed-off-by:
Christophe Fergeau <cfergeau@redhat.com> Acked-by:
Marc-André Lureau <marcandre.lureau@gmail.com>
-
- 25 Jul, 2018 2 commits
-
-
Victor Toso authored
By default, all widgets are double buffered so this patch removes two calls to gtk_widget_set_double_buffered() that are only enabling it. The only special case is under egl (virgl) at set_egl_enabled() as disabling the double buffered seems to prevent glitches. The call to gtk_widget_set_double_buffered() was kept but wrapped under G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS to avoid warnings. Note however that this is only expected to work under X11. Warnings fixed: | spice-widget.c: In function ‘spice_display_init’: | spice-widget.c:643:5: warning: ‘gtk_widget_set_double_buffered’ is | deprecated | | gtk_widget_set_double_buffered(area, true); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | spice-widget.c:661:5: warning: ‘gtk_widget_set_double_buffered’ is | deprecated | | gtk_widget_set_double_buffered(area, true); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | spice-widget.c: In function ‘set_egl_enabled’: | spice-widget.c:1290:9: warning: ‘gtk_widget_set_double_buffered’ is | deprecated | gtk_widget_set_double_buffered(GTK_WIDGET(area), !enabled); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Frediano Ziglio authored
Some deprecation blocks in the code were there to avoid warning when using too recent GTK and Glib functions. Now that we bump GTK version remove these warning avoidance. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 24 Jul, 2018 3 commits
-
-
Victor Toso authored
As those were deprecated in favor of fetching for information directly with GdkMonitor. Warnings fixed: | spice-widget.c: In function ‘mouse_wrap’: | spice-widget.c:1136:5: warning: ‘gdk_screen_get_width’ is deprecated | | xr = gdk_screen_get_width(screen) / 2; | ^~ | | spice-widget.c:1137:5: warning: ‘gdk_screen_get_height’ is deprecated | | yr = gdk_screen_get_height(screen) / 2; | ^~ Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Victor Toso authored
As gdk_keymap_get_default() was deprecated in 3.22 Warnings fixed: | vncdisplaykeymap.c: In function ‘vnc_display_keyval_set_entries’: | vncdisplaykeymap.c:263:4: warning: ‘gdk_keymap_get_default’ is | deprecated: Use 'gdk_keymap_get_for_display' instead | | gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | spice-gtk-session.c: In function ‘spice_gtk_session_init’: | spice-gtk-session.c:181:5: warning: ‘gdk_keymap_get_default’ is | deprecated: Use 'gdk_keymap_get_for_display' instead | | GdkKeymap *keymap = gdk_keymap_get_default(); | ^~~~~~~~~ | | spice-widget.c: In function ‘get_scancode_from_keyval’: | spice-widget.c:1731:5: warning: ‘gdk_keymap_get_default’ is | deprecated: Use 'gdk_keymap_get_for_display' instead | | if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), | ^~ Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Victor Toso authored
Fedora 28: 3.22.30 Fedora 27: 3.22.26 Fedora 26: 3.22.21 RHEL 7.6: 3.22.30 RHEL 7.5: 3.22.26 RHEL 7.4: 3.22.10 Debian 10: 3.22.30 Debian 9: 3.22.11 Ubuntu 18.04: 3.22.30 Ubuntu 17.10: 3.22.24 Besides cleanup the code, gtk is under heavy development to better work under Wayland and reducing the code path based on library version should be helpful as well. This patch also removes the check for gdk_event_get_scancode as it is included in 3.22. Signed-off-by:
Victor Toso <victortoso@redhat.com> Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 20 Jul, 2018 1 commit
-
-
Frediano Ziglio authored
No need to pass a generic pointer. Avoid SpiceDisplay* -> gpointer* -> gpointer -> SpiceDisplay* cast chain. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Christophe Fergeau <cfergeau@redhat.com>
-
- 08 Jun, 2018 3 commits
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
Marc-André Lureau authored
G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated: https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
Marc-André Lureau authored
With touchpads and similar devices, scroll events are not emitted on Wayland, but only smooth-scroll events. There is some discussion about handling smooth-scroll events in Spice (see "Add horizontal mouse wheel support" thread), but it will mean support from various components. For compatibility reasons, in the meantime, let's synthetize the smooth-scroll events to regular scroll buttons to fix scrolling. Tested on f28, gnome-shell under X and wayland. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1386602 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by:
Christophe Fergeau <cfergeau@redhat.com>
-
- 22 May, 2018 1 commit
-
-
Victor Toso authored
The bug was fixed in GTK+ 3.22. I'm updating the comment plus setting the !GTK_CHECK_VERSION() to track changes that can be removed after bumping the gtk+ library. Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Christophe Fergeau <cfergeau@redhat.com>
-
- 09 May, 2018 1 commit
-
-
Currently when gstreamer is used to decode a full-screen stream sent from the server, the decoding frames are being forced to RBGA format and pushed using appsink to be scaled and rendered to screen. Today most of the gstreamer sinks supports the GstVideoOverlay interface which allows to render directly from the pipeline to a window by a given windowing system id (i.e. xid). This patch makes playbin to use this feature if possible. Setting the DISABLE_GSTVIDEOOVERLAY environment variable will make gstreamer to avoid of using the gstvideooverlay interface. Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 23 Apr, 2018 1 commit
-
-
This log was introduced in 13f5ebbf to track the situation where the GdkCursor pointer would be invalid/NULL. That was possible if the caller passed a NULL for rgba pointer in cursor_set(). Code has changed a bit since then, it isn't necessary to log a warn in the unlikely event of cursor_shape being NULL. Signed-off-by:
Victor Toso <victortoso@redhat.com> Reported-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 19 Apr, 2018 1 commit
-
-
Frediano Ziglio authored
Before d567bfe6 ("spice-widget: fix leak of boxed type cursor-shape") the cursor was just leaked. Now is freed however mouse_pixbuf points to cursor data so when the cursor is freed mouse_pixbuf points to a dangling pointer. Retain the cursor as long as mouse_pixbuf is live. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com> Acked-by:
Victor Toso <victortoso@redhat.com>
-
- 04 Apr, 2018 2 commits
-
-
Victor Toso authored
No valgrind on this one but a leak similar to previous patch. This one was introduced in e691954b Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Victor Toso authored
Detected while testing valgrind on migration. > malloc (vg_replace_malloc.c:299) > g_malloc (in /usr/lib/libglib-2.0.so.0.5400.3) > spice_cursor_shape_copy (channel-cursor.c:99) > ??? (in /usr/lib/libgobject-2.0.so.0.5400.3) > g_object_get_valist (in /usr/lib/libgobject-2.0.so.0.5400.3) > g_object_get (in /usr/lib/libgobject-2.0.so.0.5400.3) > cursor_set (spice-widget.c:2653) > g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.5400.3) > ??? (in /usr/lib/libgobject-2.0.so.0.5400.3) > g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.5400.3) > g_signal_emit (in /usr/lib/libgobject-2.0.so.0.5400.3) > ??? (in /usr/lib/libgobject-2.0.so.0.5400.3) Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
- 28 Feb, 2018 1 commit
-
-
Victor Toso authored
Address sanitizer runtime error: > spice-widget.c:1433:12: runtime error: left shift of > 1 by 31 places cannot be represented in type 'int' Signed-off-by:
Victor Toso <victortoso@redhat.com> Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-