Jonas Ådahl
0f200efc6d
monitor-config-manager: Rename helper finding logical monitor
...
It doesn't get a monitor, but a logical monitor, so name it according to
that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:09 +00:00
Jonas Ådahl
654d75b841
monitor-config-manager: Fix indentation
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:09 +00:00
Jonas Ådahl
a38f9c2d48
gpu: Don't include monitor manager header
...
Doing so pulls in too much, causing potential header include order
conflicts.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:08 +00:00
Jonas Ådahl
bfa0f3e2ab
output: Fix include order
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:08 +00:00
Jonas Ådahl
1c4b1096a3
tools/get-state: List color standard names instead of enum values
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:08 +00:00
Jonas Ådahl
a39e941f91
DisplayConfig: Advertise monitor color standard support
...
It'll be used to allow Settings to know whether it can enable HDR or
not.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:08 +00:00
Jonas Ådahl
f1e497acfa
monitor: Add API to list supported color modes
...
Available modes are 'default', which is always added, and BT.2100,
which is added if the BT.2020 color space, and the PQ transfer function,
is supported by the output.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192 >
2025-02-01 22:46:08 +00:00
Olivier Fourdan
fc6d79eda9
keybindings: Check modifier masks one by one
...
Commit 48d070dae changed the logic to compare the modifiers mask as a
whole.
Unfortunately, that does not work with all combinations of modifiers, as
some may not be reported when the ISO_Next_Group key is notified.
Revert to the original logic which is to compare against each modifier
mask individually.
Fixes: commit 48d070dae - keybindings: Check for ISO_Next_Group keysym
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4237 >
2025-01-31 12:47:45 +01:00
Olivier Fourdan
48d070dae7
keybindings: Check for ISO_Next_Group keysym
...
In process_iso_next_group(), we would use try to match mask and keycode
of ISO_Next_Group to tell whether the key combo has been activated.
That works on X11, but not on Wayland with the native backend, because
the keycode does not match.
But we do not need to go all through that burden to match the key combo
we could just use the keysym instead, which would work even when there
is no physical key for ISO_Next_Group.
All we need to do is check whether the symbol is ISO_Next_Group and the
modifier mask matches, which simplifies the code as well.
(Note that we still need to keep the resolved iso_next_group_combo
key combo around because the X11 backend grabs that key combo.)
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3883
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4232 >
2025-01-30 16:52:56 +00:00
Florian Müllner
1463ddde66
ci: Use sudo to run pip install
...
We can't assume the script is run as root, so request the required
privileges where needed.
Fixes: 6bd76eec0c ("ci: Use common-dependencies script to install argcomplete")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4234 >
2025-01-30 16:14:39 +01:00
Florian Müllner
0db235b7e9
ci: Fix warning during image build
...
It's common to terminate a list with an unset variable like `$NULL`,
but `$(NULL)` tries to run `NULL` as command instead, whoops.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4233 >
2025-01-30 15:33:58 +01:00
Florian Müllner
6bd76eec0c
ci: Use common-dependencies script to install argcomplete
...
It is a dependency of the new gdctl tool, and therefore no longer
confined to tests. Install it via the common-dependencies script,
so that the dependency is also satisfied for gnome-os and systemd
system extensions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4233 >
2025-01-30 14:53:43 +01:00
Jonas Ådahl
4f218537cd
gdctl: Make Monitor a dataclass
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
4837d1ce64
gdctl: Make LogicalMonitor a dataclass
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
f9bb7aa2e6
gdctl: Add bash completion integration
...
This auto-completes things such as available connectors, modes, scales,
transforms, etc.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
a0c5c09e9b
ci: Run ruff check/format on gdctl
...
Use a CI job using ruff that enforces the coding style to follow
`ruff format --line-length 80`, and that no new linting issues appear
using `ruff check`.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
3cc5d201a2
Add gdctl man page using rst2man
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
839f67f1de
tests/monitor-dbus: Test changing configuration
...
Uses some various combinations of the gdctl commands that configures the
available monitors differently.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
fe79188b58
tests/monitor-test-utils: Add debug log for logical monitor checking
...
This was helpful when figuring out what logical monitor test data was
wrong.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
1cbfc07df0
tests: Add get state D-Bus test using gdctl
...
Test is ref test like, with gdctl outputs being compared.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
a9d8aaa6fd
gdctl: Install to bin/
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:39 +00:00
Jonas Ådahl
7a39f05b69
tests/build: Allow passing commandline arguments to tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
c80134d1ba
gdctl: Add support for applying configuration
...
Support defining and applying full configurations, meaning one describes
the whole configuration with one command, fully replacing the active
configuration.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
6750136fd3
gdctl: Introduce and use new named enum
...
The named enum (NamedEnum) is used to describe a mapping for enum values
to strings. Enums using this define a function that defines the mapping,
and the named enum handles converting from to strings. This replaces
existing manually coded translations.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
2ee918a949
gdctl/monitors-state: Don't keep current state variant around
...
It's not used by anything, all data is accessed by data structures
derived from the variant.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
7ddaf23130
gdctl: Hook up to o.g.M.DisplayConfig via dedicated class
...
The "current state" one will use DisplayConfig to query, which
eventually will also do configuration method calls.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
e326aed70e
gdctl: Display booleans as yes / no
...
Slightly more human readible and less programmer speak.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
481f046cd5
gdctl: Store property enum values as real enums
...
This means declaring an enum class inheriting from enum.Enum.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
34195d905a
gdctl: Add LogicalMonitor class
...
This abstracts what makes a logical monitor. Will make it easy doing
manipulations, and makes the print function a bit more readable.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
00d5a6a0cd
gdctl: Always display monitor display name if available
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
cc11b0682b
gdtl: Add Monitor class
...
This makes it possible to avoid dealing directly with the variant when
operating on a monitor.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
3469530dec
gdctl: Add helpers to get relevant state variants
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Jonas Ådahl
a3cfd7bd91
Introduce GNOME Display Control (gdctl) utility
...
It's based on `get-state.py`, but with the intention to expand its
functionality into not only listing information, but setting and
changing monitor configurations. It's meant to complement monitor
configurations from Settings with something that has more level of
control.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4190 >
2025-01-30 11:29:38 +00:00
Carlos Garnacho
4cb3518205
core: Make meta_window_move_resize_internal() truly internal
...
This function is no longer used anywhere outside MetaWindow code, so
make it no longer declared at the window-private.h header.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
d7fdf6d7d3
x11: Avoid meta_window_move_resize_internal()
...
We are using no placing flags, so this is essentially the same
as meta_window_move_resize().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
92cbefd863
wayland: Avoid meta_window_move_resize_internal()
...
We are using no placing flags, so this is essentially the same
as meta_window_move_resize().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
4664fce695
core: Rename/repurpose meta_window_resize_frame_with_gravity()
...
The gravity argument is no longer effective since the previous
commit. Drop the argument, and rename it to "meta_window_resize_frame",
all callers have been updated.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
fb49a700a1
core: Drop MetaGravity argument from move_resize_internal() call
...
Obtain the gravity through the newly added MetaWindow method from the
window being moved/resized.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
432e52bad0
core: Drop MetaGravity argument from move_resize_internal() vmethod
...
The implementations no longer need this argument, so drop it in
favor of meta_window_get_gravity().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:05 +00:00
Carlos Garnacho
33c287e271
wayland: Get gravity through MetaWindow getter
...
Ignore the gravity argument in the move_resize_internal() vmethod,
and use the window getter to get it. It should be functionally
equivalent, and will eventually replace the argument entirely.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:04 +00:00
Carlos Garnacho
37df41097c
wayland: Implement get_gravity() vmethod
...
Handle here the toplevel drag surface getting nortwest gravity,
and fall back to the default static gravity for everything else.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:04 +00:00
Carlos Garnacho
0eaae111d3
x11: Hook up window gravity in size hints to MetaWindow gravity
...
Make us prefer the gravity as it happens through grab ops first, then
the gravity as specified by the client.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:04 +00:00
Carlos Garnacho
ca0c6bcd69
core: Set gravity based on grab op during window move/resize ops
...
We will basically want to follow the gravity as specified by the drag
corner/edge. Hook this up to meta_window_get_gravity().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:04 +00:00
Carlos Garnacho
0928d3ec32
core: Add meta_window_get_gravity() private call
...
This relies on a class vmethod, so that subclasses can alter
the behavior.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3972 >
2025-01-29 12:44:04 +00:00
Sebastian Wick
919b747fad
build: Require logind for udev support
...
Our udev support depends a lot on logind and is optional. Enforce that
logind is available when udev is enabled.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223 >
2025-01-29 10:44:57 +00:00
Sebastian Wick
ef0ff602b5
backends: Only build and use MetaLauncher if we have logind
...
Fixes: 23c2c0853c ("launcher: Move from backends/native/ to backends/")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3878
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223 >
2025-01-29 10:44:57 +00:00
Sebastian Wick
5152fa142b
context/main: Guard logind code behind #ifdef HAVE_LOGIND
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223 >
2025-01-29 10:44:57 +00:00
Sebastian Wick
e7ca9cecea
build: Rename have_libsystemd to have_logind
...
We really only need the logind API which can be provided either by
libsystemd or libelogind.
This also pulls out finding a logind provider from the native backend
only code because we make use of it in the generic backend code as well.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223 >
2025-01-29 10:44:57 +00:00
Sebastian Wick
98519a344f
build: Make the udev build option less ambiguous
...
It controls it for all backends, it just is required for the native one.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223 >
2025-01-29 10:44:57 +00:00
Philip Withnall
85772a13ce
ci: Bump CI to include latest gsettings-desktop-schemas
...
This is so we get hold of
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/96 ,
which is needed for changes in gnome-shell in
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610 .
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4231 >
2025-01-28 14:07:07 +00:00