Commit Graph

235 Commits

Author SHA1 Message Date
Christian Hergert
f9d91ddb60 Merge branch 'bilelmoussaoui/cleanup-2' into 'main'
Various cleanups

See merge request GNOME/libmks!29
2023-08-11 03:22:46 +00:00
Christian Hergert
4343e01abf Merge branch 'bilelmoussaoui/post-migration' into 'main'
docs: Adapt post GNOME group migration

See merge request GNOME/libmks!30
2023-08-11 03:22:11 +00:00
Christian Hergert
10573a416a Merge branch 'bilelmoussaoui/doap' into 'main'
misc: Add a doap file

See merge request GNOME/libmks!31
2023-08-11 02:54:50 +00:00
Bilal Elmoussaoui
bbc43d73e6 misc: Add a doap file
Required since the migration to GNOME group
2023-08-10 22:20:52 +00:00
Bilal Elmoussaoui
69bb9db52a docs: Adapt post GNOME group migration 2023-07-11 14:48:23 +02:00
Bilal Elmoussaoui
7e51d6d38e cleanup: Drop remaining publicly exposed speaker types
Should have been more careful...
2023-07-06 01:48:20 +02:00
Bilal Elmoussaoui
7fafb9f268 cleanup: Prefix & rename create_socketpair 2023-06-23 22:28:34 +02:00
Christian Hergert
61846c127b Merge branch 'bilelmoussaoui/touch-support-v2' into 'main'
touch support: round 2

See merge request chergert/libmks!27
2023-06-23 17:54:05 +00:00
Bilal Elmoussaoui
af8d90d1b5 display: Expose a helper for retriving guest position
When running an Android VM with GL support, Android somehow enforces
support for only touch events making it difficult to work with QEMU +
Android for devolpement / demo purposes without a touch screen.

This helper is useful for being able to emulate motion / click
events as touch ones
2023-06-21 21:09:29 +02:00
Bilal Elmoussaoui
3aee839269 touch: update per latest changes in upstream API 2023-06-20 00:04:04 +02:00
Christian Hergert
a8b605f401 lib: use GLib numeric types
I'm trying to be consistent and keep with GLib type definitions except for
char/int/double/float.
2023-06-15 16:09:22 -07:00
Christian Hergert
5a55efe987 build: add mks-touchable.h to enums generation
Related !26
2023-06-15 16:06:25 -07:00
Christian Hergert
092e6cd418 Merge branch 'bilelmoussaoui/touch-support' into 'main'
Add touch events support

See merge request chergert/libmks!26
2023-06-15 23:03:54 +00:00
Bilal Elmoussaoui
2385ad2f04 tools: Display touch device info 2023-06-15 13:57:19 +02:00
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
b99b6b42b4 Post-release version bump 2023-06-07 15:07:22 -07:00
Christian Hergert
7a320017a0 Release libmks 0.1.0 2023-06-07 15:06:30 -07:00
Christian Hergert
93e2e70c7b dmabuf-paintable: remove use of arc box
There is only a single unref of this, via the GdkGLTexture so just use a
free function and g_new0()/g_free().
2023-06-02 10:23:31 -07:00
Christian Hergert
a2525530ec screen: remove mks-screen-private.h
It wasn't doing anything for us, so just remove it.
2023-06-02 10:22:27 -07:00
Christian Hergert
58d99fb8b1 dmabuf-paintable: code style cleanup 2023-06-02 10:19:37 -07:00
Christian Hergert
0d43432bfa janitorial: code style and formatting cleanup 2023-06-02 10:18:54 -07:00
Christian Hergert
43dda37c79 license: update sources to LGPLv2.1+
See merge request !25
2023-06-02 10:18:05 -07:00
Christian Hergert
5af0462141 Merge branch 'bilelmoussaoui/relicense' into 'main'
Relicense as LGPLv2.1+

See merge request chergert/libmks!25
2023-06-02 16:35:03 +00:00
Bilal Elmoussaoui
7c67084055 Relicense as LGPLv2.1+ 2023-06-01 12:04:35 +01:00
Christian Hergert
f1a6ce1fe1 Merge branch 'bilelmoussaoui/auto-resize' into 'main'
display: Add the possibility to disable auto resizing

See merge request chergert/libmks!22
2023-05-31 23:50:28 +00:00
Bilal Elmoussaoui
b23bdcffd7 In certain cases, you might want to control the VM size when running
QEMU instead of having libmks handling that when resizing the widget

This also would allow having an option for auto-scaling that would
scale the texture to fit the widget size
2023-05-31 20:13:06 +01:00
Christian Hergert
6d6c470288 Merge branch 'set-lib-soname' into 'main'
build: Set a SONAME version in the libmks library

See merge request chergert/libmks!23
2023-05-31 16:46:58 +00:00
Christian Hergert
23f85e443f Merge branch 'bilelmoussaoui/speaker' into 'main'
build: Don't include Speaker type

See merge request chergert/libmks!24
2023-05-31 16:46:36 +00:00
Bilal Elmoussaoui
fc996f251b build: Don't include Speaker type
Currently, the Speaker device is not fully implemented. So let us stop
building those files to avoid exposing them as part of the docs/gir API
until someone finishes it implementation

Part of #6
2023-05-30 11:16:01 +01:00
Javier Martinez Canillas
868aad0244
build: Set a SONAME version in the libmks library
The libmks library is currently unversioned, but donwstream users expect
this library to have a proper SONAME version in order to package them.

A stable release has not yet happened because the project is still under
development and the API/ABI might change. But having a versioned SONAME
would allow distributions to package libmks, without the need to add any
downstream patch to set the library version.

Since the "0.1.0" version is already set as the meson project, let's use
it to set the library version as well. The meson build system will use the
first part of the version (0) as the SONAME version, which is aligned with
the convention used by other projects:

  $ ls ./lib/libmks-1.so* -1
  ./lib/libmks-1.so
  ./lib/libmks-1.so.0
  ./lib/libmks-1.so.0.1.0

  $ objdump -p ./lib/libmks-1.so.0.1.0 | grep SONAME
  SONAME               libmks-1.so.0
2023-05-30 11:46:27 +02:00
Christian Hergert
543c0cbbda Merge branch 'aesteve/fix-atomic-kms-cursor' into 'main'
display-picture: set cursor on init

See merge request chergert/libmks!19
2023-05-26 04:51:34 +00:00
Christian Hergert
3c422815a8 Merge branch 'bilelmoussaoui/duplicated' into 'main'
Drop duplicated create_socketpair

See merge request chergert/libmks!21
2023-05-26 04:47:34 +00: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
6b29de7164 Drop duplicated create_socketpair 2023-05-25 09:59:45 +02:00
Christian Hergert
00099bb4a5 Merge branch 'bilelmoussaoui/close-fd' into 'main'
paintable: Properly close DMABuf FD

See merge request chergert/libmks!20
2023-05-24 23:02:27 +00:00
Bilal Elmoussaoui
5736f4e19f paintable: Properly close DMABuf FD
As g_unix_fd_list_get will dup the FD, we must close it once we are done
with it.
The issue went unnoticable during my testing as apprently, the max
number of open FDs is not in sync between host & toolbox and that is
annoying podman issue...
2023-05-24 15:17:46 +02:00
Christian Hergert
e8d30c4f73 Merge branch 'bilelmoussaoui/docs' into 'main'
docs: Document most of the public APIs

See merge request chergert/libmks!18
2023-05-23 19:54:00 +00:00
Bilal Elmoussaoui
c7772df9aa docs: Document most of the public APIs 2023-05-23 12:34:01 +02:00
Christian Hergert
c0f0d1c22c build: fix include directories for subprojects
We have no need to include the top-level when depended on, as config.h
will only ever be used by our internal .c files.

Related !17
2023-05-17 14:35:56 -07: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
Christian Hergert
cae805a728 resizer: only branch when non-NULL
My previous commit broke this, which is needed because we always return
FALSE when either are NULL.
2023-05-17 13:37:33 -07:00
Christian Hergert
69dfaddb9d resizer: various code-style cleanup
Related !13
2023-05-17 13:36:11 -07:00
Christian Hergert
6a024f0e5d Merge branch 'bilelmoussaoui/reconfigure' into 'main'
display: Reconfigure screen when size change

See merge request chergert/libmks!13
2023-05-17 20:11:49 +00:00
Christian Hergert
233f30a2d1 Merge branch 'libmks-bilelmoussaoui/gdk-gl-texture-builder' 2023-05-17 13:09:05 -07:00
Bilal Elmoussaoui
c259212be5 dmabuf: Properly propagate damage area
The current approach makes use of
- A tiled rendering to work around gdk_texture_diff only doing pointer
comparaison
- Assumes that we would only recieve a scanout cmd followed by multiple
flush ones

In reality, with virtio-gpu at least, the scanout cmd is always
submitted followed by a flush one containing the damaged region.

With the assumption currently made, we end up creating a new paintable
for every scanout cmd causing a full redraw instead
of only redrawing the damaged areas.
Isntead we create the paintable once and call import whenever
we receive a flush cmd (UpdateDMABUF) so we can properly
pass the damage area when creating a GdkGLTexture making
the tiled rendering no longer needed.
2023-05-17 13:08:37 -07:00
Christian Hergert
379f2e862a build: Depend on gtk main for GdkGLTextureBuilder
- Add a meson subproject for building main gtk
- Adapt the docs CI job to install the necessary build deps
- Disable werror in the CI for now, until we port aways from deprecated
APIs
- Switch from using add_global_argument as it would affect subprojects

# Conflicts:
#	.gitignore
2023-05-17 13:08:31 -07:00
Christian Hergert
598e127650 .gitignore: ignore .flatpak-builder 2023-05-17 13:07:46 -07:00