Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
mutter_public_headers = [
|
|
|
|
'barrier.h',
|
|
|
|
'boxes.h',
|
|
|
|
'common.h',
|
|
|
|
'compositor.h',
|
|
|
|
'compositor-mutter.h',
|
|
|
|
'display.h',
|
|
|
|
'group.h',
|
|
|
|
'keybindings.h',
|
|
|
|
'main.h',
|
|
|
|
'meta-backend.h',
|
|
|
|
'meta-background.h',
|
|
|
|
'meta-background-actor.h',
|
2020-06-08 20:49:55 -04:00
|
|
|
'meta-background-content.h',
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
'meta-background-group.h',
|
|
|
|
'meta-background-image.h',
|
|
|
|
'meta-close-dialog.h',
|
|
|
|
'meta-cursor-tracker.h',
|
|
|
|
'meta-dnd.h',
|
|
|
|
'meta-idle-monitor.h',
|
|
|
|
'meta-inhibit-shortcuts-dialog.h',
|
2018-12-13 13:02:19 -05:00
|
|
|
'meta-launch-context.h',
|
2020-03-03 03:32:33 -05:00
|
|
|
'meta-later.h',
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
'meta-monitor-manager.h',
|
|
|
|
'meta-plugin.h',
|
|
|
|
'meta-remote-access-controller.h',
|
2018-11-23 05:48:53 -05:00
|
|
|
'meta-selection.h',
|
|
|
|
'meta-selection-source.h',
|
|
|
|
'meta-selection-source-memory.h',
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
'meta-settings.h',
|
|
|
|
'meta-shadow-factory.h',
|
|
|
|
'meta-shaped-texture.h',
|
2018-12-09 06:44:20 -05:00
|
|
|
'meta-sound-player.h',
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
'meta-stage.h',
|
2018-08-22 16:56:18 -04:00
|
|
|
'meta-startup-notification.h',
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
'meta-window-actor.h',
|
|
|
|
'meta-window-group.h',
|
|
|
|
'meta-window-shape.h',
|
|
|
|
'meta-workspace-manager.h',
|
|
|
|
'prefs.h',
|
|
|
|
'theme.h',
|
|
|
|
'types.h',
|
|
|
|
'util.h',
|
|
|
|
'window.h',
|
|
|
|
'workspace.h',
|
|
|
|
]
|
|
|
|
|
wayland: Add API to launch trusted clients
Allowing code from inside mutter to create a child process and
delegate on it some of its tasks is something very useful. This can
be done easily with the g_subprocess and g_subprocess_launcher classes
already available in GLib and GObject.
Unfortunately, although the child process can be a graphical program,
currently it is not possible for the inner code to identify the
windows created by the child in a secure manner (this is: being able
to ensure that a malicious program won't be able to trick the inner
code into thinking it is a child process launched by it).
Under X11 this is not a problem because any program has full control
over their windows, but under Wayland it is a different story: a
program can't neither force their window to be kept at the top (like a
docker program does) or at the bottom (like a program for desktop icons
does), nor hide it from the list of windows. This means that it is not
possible for a "classic", non-priviledged program, to fulfill these
tasks, and it can be done only from code inside mutter (like a
gnome-shell extension).
This is a non desirable situation, because an extension runs in the
same main loop than the whole desktop itself, which means that a
complex extension can need to do too much work inside the main loop,
and freeze the whole desktop for too much time. Also, it is important
to note that javascript doesn't have access to fork(), or threads,
which means that, at most, all the parallel computing that can do is
those available in the _async calls in GLib/GObject.
Also, having to create an extension for any priviledged graphical
element is an stopper for a lot of programmers who already know
GTK+ but doesn't know Clutter.
This patch wants to offer a solution to this problem, by offering a
new class that allows to launch a trusted child process from inside
mutter, and make it to use an specific UNIX socket to communicate
with the compositor. It also allows to check whether an specific
MetaWindow was created by one of this trusted child processes or not.
This allows to create extensions that launch a child process, and
when that process creates a window, the extension can confirm in a
secure way that the window really belongs to that process
launched by it, so it can give to that window "superpowers" like
being kept at the bottom of the desktop, not being listed in the
list of windows or shown in the Activities panel... Also, in future
versions, it could easily implement protocol extensions that only
could be used by these trusted child processes.
Several examples of the usefulness of this are that, with it, it
is possible to write programs that implements:
- desktop icons
- a dock
- a top or bottom bar
...
all in a secure manner, avoiding insecure programs to do the same.
In fact, even if the same code is launched manually, it won't have
those privileges, only the specific process launched from inside
mutter.
Since this is only needed under Wayland, it won't work under X11.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/741
2020-08-04 04:42:29 -04:00
|
|
|
if have_wayland
|
|
|
|
mutter_public_headers += [
|
|
|
|
'meta-wayland-client.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
if have_x11
|
|
|
|
mutter_public_headers += [
|
|
|
|
'meta-x11-display.h',
|
|
|
|
'meta-x11-errors.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
install_headers(mutter_public_headers,
|
2019-03-11 20:35:13 -04:00
|
|
|
subdir: mutter_includesubdir
|
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-05-22 09:55:35 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
mutter_public_header_files = files(mutter_public_headers)
|
|
|
|
|
|
|
|
mutter_enum_types = gnome.mkenums('meta-enum-types',
|
|
|
|
sources: [mutter_public_headers],
|
|
|
|
c_template: 'meta-enum-types.c.in',
|
|
|
|
h_template: 'meta-enum-types.h.in',
|
|
|
|
install_dir: mutter_includedir,
|
|
|
|
install_header: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
mutter_version_array = meson.project_version().split('.')
|
|
|
|
mutter_version_major = mutter_version_array[0]
|
|
|
|
mutter_version_minor = mutter_version_array[1]
|
|
|
|
mutter_version_micro = mutter_version_array[2]
|
|
|
|
|
|
|
|
mutter_version_cdata = configuration_data()
|
|
|
|
mutter_version_cdata.set('MUTTER_MAJOR_VERSION',
|
|
|
|
'@0@'.format(mutter_version_major))
|
|
|
|
mutter_version_cdata.set('MUTTER_MINOR_VERSION',
|
|
|
|
'@0@'.format(mutter_version_minor))
|
|
|
|
mutter_version_cdata.set('MUTTER_MICRO_VERSION',
|
|
|
|
'@0@'.format(mutter_version_micro))
|
|
|
|
mutter_version_cdata.set('MUTTER_PLUGIN_API_VERSION',
|
|
|
|
'@0@'.format(mutter_plugin_api_version))
|
|
|
|
|
|
|
|
mutter_version = configure_file(
|
|
|
|
input: 'meta-version.h.in',
|
|
|
|
output: 'meta-version.h',
|
|
|
|
configuration: mutter_version_cdata,
|
|
|
|
install_dir: mutter_includedir,
|
|
|
|
install: true,
|
|
|
|
)
|