1
0
Fork 0
Commit graph

31367 commits

Author SHA1 Message Date
Dor Askayo
9eb38b4107 kms/impl-device: Add function to resume all devices
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3534>
2024-01-19 18:46:41 +00:00
Dor Askayo
ada4ac49fb kms/impl-device: Add function to handle device resumption
For now, this function only enables the deadline timer in case it was
inhibited. This would result in an attempt to use the deadline timer
again after a device is resumed.

If the conditions that resulted in the timer becoming inhibited
remain, it is expected to return to this state after the next frame
and before being armed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3534>
2024-01-19 18:46:41 +00:00
Dor Askayo
98cdafdf0b kms/impl-device: Use enum for deadline timer state
The "disabled" state indicates that the deadline timer is disabled
for the lifetime of the device, while the "inhibited" state indicates
that it is disabled temporarily for the device.

This distinction is needed to handle each state differently in a
following commit. For now, only "disabled" is used.

No change in behavior.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3534>
2024-01-19 18:46:41 +00:00
Leorize
8e39398d05 backends: Allow XKB model to be configured
This allows GNOME Shell to communicate the user desired XKB model
to the compositor instead of sticking with the pc105 default.

Particularly useful for those with a custom keyboard layout/irregular
keyboards.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2760>
2024-01-18 18:51:42 +00:00
Florian Müllner
1ab4faaf18 place: Fix centering transients over parent
Transient dialogs are meant to be placed centered over their
parent. However as we don't use the DIALOG window type on
wayland, this currently only works for modal dialogs.

To fix this, also apply the policy to NORMAL windows for
wayland clients.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3533>
2024-01-18 16:07:15 +00:00
Kai-Heng Feng
8e58aa46ac gen_default_modes: Consider reduced blanking with lower pixelclock
Some panels only support fixed resolutions and fixed refresh rate with reduced blanking:
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  2560x1600  120.001823 Hz   8:5    203.283 kHz    552.930000 MHz (345 mm x 215 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   6 Vback   85 Vpol N
    DTD 2:  2560x1600   48.000295 Hz   8:5     81.312 kHz    221.170000 MHz (345 mm x 215 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   6 Vback   85 Vpol N
...
    Minimum Pixel Clock: 552922 kHz
    Maximum Pixel Clock: 552922 kHz

When using mirror mode, resolutions like 2560x1440 120Hz can be too high
to meet the pixelclock limitation, so 2560x1440 90Hz is selected
instead. However, the panel only supports 120Hz so using 90Hz result to
failed mode set.

So add reduced blanking to fallback mode, so correct refresh rate can be
used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3449>
2024-01-18 12:12:06 +08:00
Shmuel Melamud
237e505cc7 clutter: Move ClutterCanvas to gnome-shell
Since StDrawingArea in gnome-shell is the only user of ClutterCanvas,
it is possible to move ClutterCanvas completely out of Mutter to
gnome-shell. This allows to remove another Cairo dependency from
Mutter.

This patch removes ClutterCanvas code from Mutter.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3470>
2024-01-17 11:58:47 +01:00
Sebastian Wick
41a7e8e3e0 build: Make g-ir-scanner warnings fatal when -werror is set
This should help catching problems with introspection in CI.

This also pulls out some common arguments to the gnome.generate_gir
call.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3528>
2024-01-17 09:26:00 +00:00
Daniel van Vugt
e8116ba4f0 clutter/actor: Double asterisk is required for GObject Introspection
Like GtkDoc and Doxygen before it.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3252

Fixes: f4c6fa949d
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3527>
2024-01-17 15:04:48 +08:00
Daniel van Vugt
7551ffa81e clutter/actor: Remove whitespace at end of line
It's upsetting check-code-style

Fixes: 00b4d4c4bc
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3527>
2024-01-17 15:04:48 +08:00
Florian Müllner
65d4815942 doc: Update link to commit message guidelines
Replace the wiki page with the corresponding section in
the GNOME handbook.

Death to the wiki!

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3526>
2024-01-16 09:37:21 +00:00
Sebastian Wick
db492fe335 cogl: Use COGL_ENABLE_DEBUG instead of COGL_DEBUG_ENABLED
COGL_DEBUG_ENABLED is a macro to check if a debug flag is set.
COGL_ENABLE_DEBUG is set by the build system if it's a debug build. The
check `#ifdef COGL_DEBUG_ENABLED` always evaluates to true. Use the
appropriate macro to guard some debugging code.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3446>
2024-01-15 22:28:54 +00:00
Sebastian Wick
6749151ac9 cogl/pipeline: Use the pipeline context instead of the default context
In practise they are the same right now but this prepares CoglPipeline
for a future where we have multiple contexts.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3446>
2024-01-15 22:28:54 +00:00
Sebastian Wick
a9944b27aa cogl/pipeline: Refactor pipeline initialization
Make it a bit easier to follow the construction process and rely on
GObjects zero-initialization in more places.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3446>
2024-01-15 22:28:54 +00:00
Shmuel Melamud
f4c6fa949d clutter: Make clutter_actor_create_texture_paint_node public
Since StDrawingArea in gnome-shell is the only user of ClutterCanvas,
it is possible to move ClutterCanvas completely out of Mutter to
gnome-shell. This allows to remove another Cairo dependency from
Mutter.

This patch makes clutter_actor_create_texture_paint_node() function
public to be used by StDrawingArea in gnome-shell that replaces
ClutterCanvas.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3507>
2024-01-15 17:02:55 +00:00
Efstathios Iosifidis
37c0b27895 Update Greek translation
(cherry picked from commit b71f86ae9e4ad3ac9bddd404d7eea1616b6817f3)
2024-01-14 22:43:00 +00:00
Florian Müllner
1037fde087 ci: Update gsettings-desktop-schemas
It is needed to support the new "show-status-shapes" setting
in the shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3513>
2024-01-14 17:21:09 +00:00
Florian Müllner
4dbe97a894 ci: Add work-around for podman-push permission issue
For some reason, podman recently started to fail to read files
in non-world-readable directories:

https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1247

As long as it happens with stuff we don't actually need, the
work-around is to just remove the offending files.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3513>
2024-01-14 17:21:09 +00:00
Florian Müllner
3002e18668 ci: Quote package names with parentheses
This is needed by newer versions of the template.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3513>
2024-01-14 17:21:09 +00:00
Bilal Elmoussaoui
2dd04f7cbe compositor: Use subclassing macros for Module
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
b1bc03a314 native: Use subclassing macros for InputDeviceToolNative
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
a79834a1ff x11: Use subclassing macros for InputSettingsX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
b1fc022ee6 x11: Use subclassing macros for InputDeviceX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
5387135220 x11: Use subclassing macros for InputDeviceToolX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
4f96b43222 x11: Use subclassing macros for CursorRendererX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
d90a938c17 core: Use subclassing macros for GestureTracker
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Bilal Elmoussaoui
59bdc69544 native: Use subclassing macros for InputSettingsNative
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
2024-01-13 17:22:26 +00:00
Dallas Strouse
c8c5560916 backends/native: Main thread rt-scheduler: experimental feature no more
To paraphrase jadahl: we have a dedicated KMS thread now, which also
has realtime scheduling enabled unconditionally. realtime scheduling
on the main thread isn't too great of an idea, considering GC can
take a hot minute.

And to quote rmader: we most likely won't be able to make the main
thread rt as long as we use GJS and thus have GC.

So let's get rid of it! It's just been breaking things anyways.

This just ignores the setting; we'll fully remove it when GNOME 46
comes around.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3296>
2024-01-13 15:10:31 +01:00
Simon McVittie
ecdd2aeb85 workspace: Don't crash on invalid argument to meta_workspace_index
Mitigates: https://gitlab.gnome.org/GNOME/mutter/-/issues/2559
Mitigates: https://bugs.debian.org/1024438
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2774>
2024-01-12 15:24:14 +00:00
Corentin Noël
cb03b46a20 cogl/onscreen: Add several introspection annotations
Only an unowned closure is returned by the add_*_callback methods as the object
itself owns the closure.

Add array annotation when taking an array of integers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3516>
2024-01-12 15:04:30 +00:00
Sebastian Wick
399ffdfc88 kms/connector: Keep a ref to the KmsImplDevice instead of KmsDevice
The KmsImplDevice always exists as long as a KmsConnector exists. The
KmsDevice doesn't exist yet as long as the KmsImplDevice is not fully
initiallized. Going through the KmsImplDevice makes sure we always have
a valid reference and can release the device fd correctly when the
initialization fails.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3243
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3518>
2024-01-12 14:51:14 +00:00
Carlos Garnacho
7b232d9f65 wayland: Keep track of the "input focus" on MetaWaylandSeat
This is the unified focus (key, IM, pads, ...) for the focus window.
Just like MetaWaylandPointer and others keep track of the "current"
surface, this is the "current" surface for those (not necessarily
the focused surface, e.g. in the case of compositor grabs).

Since this unified focus will exist regardless of keyboard
capabilities (e.g. even if just for "logical" focus like IM/clipboard
that does not depend on input devices), it does not make sense
to trigger a focus sync on keyboard capability changes, the focus
is staying the same, we however need to focus the keyboard interface
to the already existing focus when the capability is enabled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
962eb9e054 wayland: Hook focus synchronization to MetaDisplay signals
Instead of letting the MetaDisplay be aware of the Wayland compositor,
and take care of updating its focus. This makes the MetaWaylandCompositor
able to track focus changes by itself, using MetaDisplay as the source
of truth.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
38421b07c7 compositor: Use MetaWaylandCompositor API to drive focus synchronization
Use Wayland API directly here, and avoid using MetaDisplay API that will
go away.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
a2d2e04d80 wayland: Use MetaWaylandCompositor API to drive focus synchronization
Keep this within the wayland code itself, and avoid poking MetaDisplay
API that will go away.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
9383171958 wayland: Move Wayland focus synchronization code out of core
Handle focus synchronization in MetaWaylandCompositor itself. This
is so far plumbed so that MetaDisplay still drives focus synchronization
directly.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
17d1d3abd8 compositor: Avoid special grab begin/end handling in MetaWindowDrag
This is already performed through the ClutterStage::is-grabbed property
being tracked. There is no need to do this ad-hoc.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Carlos Garnacho
bd387a6308 clutter: Drop clutter_event_new() from public headers
This is a leftover of the port to immutable events, and should
not be used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3511>
2024-01-12 14:39:17 +00:00
Sebastian Wick
bca62e6ec2 docs/website: Add documentation pages
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3519>
2024-01-12 13:07:02 +00:00
Sebastian Wick
da3909187f docs/website: Call it API Reference instead of API documentation
Just like we do in README.md.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3519>
2024-01-12 13:07:02 +00:00
Sebastian Wick
02007bf96e docs/website: Pull in the entire README.md contribution section
Instead of linking to the same text with one sentence more, pull in the
entire text and stop linking to it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3519>
2024-01-12 13:07:02 +00:00
Bilal Elmoussaoui
692e1f2759 docs/clutter: Drop no longer applicable examples links
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3515>
2024-01-12 11:40:20 +00:00
Bilal Elmoussaoui
c3cb760412 misc: Use the new mutter.gnome.org URL
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3514>
2024-01-12 10:48:20 +00:00
Carlos Garnacho
9108f2eeec clutter: Update picked actor on scroll events
On one hand this avoids crashes early after startup if the very first
pointer event is a scroll event, since the stage did not pick an actor
for the pointer device yet.

On the other hand, scroll events have some likelihood to change the
actor under the pointer even though it doesn't move. We still want to
cross towards the new actor under the pointer ASAP, without waiting
for later events.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3112
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3517>
2024-01-11 14:23:25 +00:00
Carlos Garnacho
54e4d1df79 x11: Defer ClutterStage focus actor change until window is focused
If we happen to be changing focus to a window *while* taking focus
away from Clutter widgetry, we would unintendedly trigger reentrance
in a way that the old focused window remained in focus, by asking
to focus the default focus window in an untimely manner.

To handle this reentrancy, delay dropping the Clutter key focus
until the window focus changed, so that the focus change will look
up the default focused window in the workspace, and find the up to
date one.

Fixes: ae102ee301 ("x11: Refactor ClutterStage key focus management")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3467>
2024-01-10 20:56:24 +01:00
Bilal Elmoussaoui
5378b10a00 ci: Distribute the new website
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3490>
2024-01-10 19:14:58 +00:00
Bilal Elmoussaoui
3bb42e2f66 docs: Add a website
Co-Authored-By: Jakub Steiner <jimmac@gmail.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3490>
2024-01-10 19:14:58 +00:00
Bilal Elmoussaoui
94f9d88371 x11: Drop error trap helpers
They are no longer that useful as they end up calling
mtk functions nowadays

Followup of https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3230

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3483>
2024-01-10 13:58:18 +00:00
Florian Müllner
5564eaeb4a ci: Check that gnome-shell can still run
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387 broke
gnome-shell, let's try to prevent this kind of breakage in the
future by running the gnome-shell test suite during CI.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3510>
2024-01-10 14:36:00 +01:00
Bilal Elmoussaoui
8ae87ce041 clutter: Mark FixedLayout as derivable
As GNOME Shell derives this type

Fixes: 5b527ac89 ("fixed-layout: Use macros for subclassing
boilerplate")

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3509>
2024-01-10 12:55:02 +01:00