Commit Graph

16 Commits

Author SHA1 Message Date
Bilal Elmoussaoui
10fa9edd8f misc: Replace some of g_warning usages with g_debug
To avoid spamming the user's journald
2023-06-15 13:57:19 +02:00
Bilal Elmoussaoui
c28a6f85e2 device: Implement the new touch interface 2023-06-15 13:57:19 +02:00
Bilal Elmoussaoui
f8a8b61171 display-picture: Split guest absolute position into a helper
Will be shared with touch events in the next commit
2023-06-15 13:47:20 +02:00
Christian Hergert
43dda37c79 license: update sources to LGPLv2.1+
See merge request !25
2023-06-02 10:18:05 -07:00
Bilal Elmoussaoui
7c67084055 Relicense as LGPLv2.1+ 2023-06-01 12:04:35 +01:00
Albert Esteve
25b58fc0a2 display-picture: set cursor on init
Set cursor to none (i.e., hide it) on init.
Otherwise, in cases where the define_cursor
signal is not received (e.g., atomic kms),
there are two cursors painted on the Widget
display.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-05-25 10:19:17 +02:00
Bilal Elmoussaoui
c7772df9aa docs: Document most of the public APIs 2023-05-23 12:34:01 +02:00
Christian Hergert
f71a2002ba display-picture: use compute_point()
The gtk_widget_translate_coordinates() API is now deprecated, so use the
compute_point() API and ensure that we can translate to the target widget.
2023-05-17 13:53:49 -07:00
Christian Hergert
4be889b608 display-picture: remove deprecated allocation API usage 2023-05-17 13:48:21 -07:00
Bilal Elmoussaoui
26f4b72708 display-picture: Don't compute min-width/min-height
They are not useful for us as we would like the user to be able to
shrink the picture.
It is a leftover of migrating from GtkPicture
2023-04-13 15:13:27 +02:00
Christian Hergert
02edb73d2a Merge branch 'bilelmoussaoui/expose-translate-keycode' into 'main'
keyboard: Expose keycode translation helper

See merge request chergert/libmks!7
2023-04-04 03:26:14 +00:00
Bilal Elmoussaoui
57370d5a73 keyboard: Expose keycode translation helper
Useful for exposing keyboard shortcuts triggers on the UI
Similar to what Boxes does for Ctrl+Shift+F
2023-04-03 17:33:11 +02:00
Bilal Elmoussaoui
df42bbb20e display-picture: Fix keyval value 2023-04-03 13:31:33 +00:00
Christian Hergert
8ed9c7eedc lib: dont set initial cursor to none
Honestly, Qemu *probably* should be calling into us with the cursor after
we connect to get this right, but it doesn't which leaves the user with a
bit of an issue if there is no active cursor.
2023-02-17 16:02:16 -08:00
Christian Hergert
87a800510b lib: use GDK_SCROLL_SMOOTH to enumlate wheel scroll
It's really annoying when a touchpad doesn't work at all in a MKS session.
So instead of doing nothing, at least try to send a wheel event so that
some amount of scroll may occur.

Eventually, we need a real touchpad D-Bus interface to deliver events.
2023-02-17 11:49:33 -08:00
Christian Hergert
d0909732f4 lib: add MksDisplayPicture
This is a child widget to the MksDisplay which contains just the paintable
region of the remote screen. Doing so allows us to avoid having to handle
crossing events carefully for things like cursors.

Instead, now the MksDisplay calculates the area for the picture and
allocates it there. The MksDisplayPicture will always snapshot the
paintable using the full area it has been allocated.

Event processing can also largely move into the Picture widget which
simplifies bounds checking.
2023-02-17 11:40:47 -08:00