Commit Graph

193 Commits

Author SHA1 Message Date
Bilal Elmoussaoui
b2baf33851 Release libmks 0.1.1 2023-08-23 08:43:17 +02:00
Christian Hergert
c0363de459 build: style cleanup and group unit testing bits together 2023-08-22 10:53:25 -07:00
Christian Hergert
b6061c19b8 build: tweak wording for meson_options.txt 2023-08-22 10:51:40 -07:00
Christian Hergert
6ce2e2addb Merge branch 'unit_test' into 'main'
tests: add scaffolding for unit tests with coverage

See merge request GNOME/libmks!32
2023-08-22 17:49:40 +00:00
Sandro Bonazzola
db33eece15 tests: add scaffolding for unit tests with coverage 2023-08-22 17:49:40 +00:00
Bilal Elmoussaoui
0cd80513e0 doap: It is actually libmks
Copy pasting is a hard thing to do!
2023-08-15 20:43:51 +00:00
Christian Hergert
46a05c4ba4 Merge branch 'bilelmoussaoui/fix-rendering' into 'main'
dmabuf-paintable: Build the texture when snapshot is called

See merge request GNOME/libmks!28
2023-08-15 19:41:08 +00:00
Bilal Elmoussaoui
640587ed0f dmabuf-paintable: Build the texture when snapshot is called
Always creating the texture even if the app is not being displayed
(minimized / different virtual monitor) or
if the GdkFrameClock drops a frame we end up doing a comparison with a
very old frame causing full redraws in certain cases or even artifacts
in others.

Instead, we only build the texture once snapshot is called and accumulate
the damage area until that happens to avoid updating the wrong area
2023-08-15 19:37:57 +02:00
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