Commit Graph

63 Commits

Author SHA1 Message Date
Jonas Ådahl
70c6d28fca ScreenCast: Allow recording new streams on active sessions
This is useful if you have a session, and want to "hot-plug" new sources
over time; there is no point in having to create separate sessions for this.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2131>
2021-12-07 19:23:52 +00:00
Jonas Ådahl
3c1f50a85e Move D-Bus interface files to dedicated directory
Place the XML files in data/dbus-interfaces.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2126>
2021-12-07 18:52:29 +00:00
Robert Mader
331f08fc40 gschema: Turn experimental features into flags
Defining valid values makes
1. changing settings less error prone
2. sure they are discoverable.

This does reset the values once on update, but fortunately does *not*
change the way to set the values. Thus e.g. enabling fractional scaling
via terminal command still works as before and internet guides stay valid.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1961>
2021-10-26 16:24:41 +00:00
Robert Mader
49aa801454 gschema: Add "kms-modifiers" experimental feature description
To make it more discoverable. While on it, fix a typo.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1961>
2021-10-26 16:24:41 +00:00
Carlos Garnacho
820aa18126 backends/native: Use rtkit to get realtime priority
Instead of using sched_setscheduler directly (and relying that we
somehow got CAP_SYS_NICE), use rtkit to do this for us.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2284
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060>
2021-10-22 08:35:15 +00:00
Florian Müllner
1f26dc12e5 data: Stop exposing old panel-main-menu shortcut
There hasn't been a "panel main menu" for ten years now, and gnome-shell
already exports a 'toggle-overview' shortcut for the GNOME 3 replacement.

https://discourse.gnome.org/t/difference-between-show-the-overview-and-show-the-activities-overview-keyboard-shortcuts/6572

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1886>
2021-08-30 21:43:34 +00:00
Florian Müllner
6288763671 build: Stop using source_root()/build_root()
They were deprecated in meson 0.56.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1957>
2021-08-22 17:32:12 +00:00
Jonas Ådahl
c3feb83529 udev-rules: Use ID_PATH to detect vkms
Matching against the driver doesn't seem to work, and isn't showing in
udevadm info. Switch to checking ID_PATH; hopefully it won't change too
often.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1892>
2021-06-09 19:21:44 +00:00
Carlos Garnacho
f954ff84b8 backends/native: Disable KMS modifiers on "radeon" driver
This is a driver for old AMD/ATI GPUs and doesn't seem to support
modifiers. Tag this driver as not having support for KMS modifiers.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1960937
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1872>
2021-05-19 20:52:03 +02:00
Michel Dänzer
c5943cd082 meson: Add udev_dir option
Same as in gnome-settings-daemon, allows overriding where to install
udev rules files.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1844>
2021-05-04 15:53:24 +00:00
Jonas Ådahl
8989c42d40 backend/native: Add udev rule to ignore vkms devices
Virtual Kernel Mode Setting (vkms) is a virtual /dev/dri/card* device
not backed by any actual hardware. It's intended for testing purposes,
e.g. to run tests suites with a reproducable setup, or in continuous
integration pipelines.

Currently mutter don't have any tests that can run on top of vkms, but
will eventually get that. To prepare for the ability to do that, and
having said kernel module loaded without causing wierd issues with any
active session, add an udev rule that tells mutter to ignore any vkms
device.

Otherwise, when vkms is loaded, mutter would detect it, assume it's a
regular monitor, configure it as such, thus add a region of the stage
that ends up nowhere, which isn't very helpful. It might also conflict
with running actual tests that need to interact with vkms if the active
session has taken control of it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1740>
2021-04-30 15:10:28 +02:00
Florian Müllner
d2a492de94 data: Add back (hidden) shortcuts for vertical navigation
Users who customized their workspace shortcuts before updating to
GNOME 40 are experiencing troubles when trying to use the same
keybinding for the horizontal shortcuts, because of hidden conflicts
with the vertical ones.

We can address this by registering the old shortcuts with Settings
without showing them in the UI, so that they are taken into account
by Settings' conflict resolution.

https://gitlab.gnome.org/GNOME/mutter/-/issues/1740

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1814>
2021-04-15 15:31:10 +00:00
Jonas Ådahl
ad1bffc002 backend/native: Disable KMS modifiers for amdgpu and nouveau as well
Lets wait until we have better ways to unredirect client buffers before
we start enabling KMS modifiers for amdgpu and nouveau; we end up with
mismatch between client buffer modifiers and primary plane modifier,
which right now needs to be the same for unredirection.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1792>
2021-04-14 07:14:24 +00:00
Jonas Ådahl
da3baba980 backend/native: Only disable KMS modifiers for i915
The intel DRM driver is known for not being able to handle multi head
setups when KMS modifiers are enabled, due to the implicitly selected
modifiers, while being more suitable for single head setups, cause
bandwidth issues when a certain number of monitor times resolution and
refresh rate is configured.

We don't yet support automatically finding a combination of modifiers
that work, and have because of this disabled KMS modifiers unless the
driver actually needs it.

Lets flip this configuration the other way around, changing the current
udev rule to decide wen to *disable* KMS modifier support, as it so that
only the Intel driver has this problem, while on the other hand, there
several drivers that requires modifiers to function at all.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1792>
2021-04-14 07:14:24 +00:00
Florian Müllner
36424ab298 data: Updated exposed keybindings
Workspaces were changed to a horizontal layout, so we should show
the keybindings for horizontal navigation in Settings instead of
the vertical ones.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1706>
2021-02-04 00:09:57 +01:00
Björn Daase
ea39379224 gschema: Fix capitalization of autoclose-xwayland option
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1696>
2021-02-01 18:56:39 +01:00
Olivier Fourdan
cde0cd5d23 xwayland: Enable Xwayland on demand by default
Make "Xwayland on demand" the default policy when Xwayland supports
"initfd" and remove the corresponding experimental feature.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
2021-01-19 09:33:33 +01:00
Olivier Fourdan
3fc603edd3 xwayland: Make autoclose-xwayland an exp. feature
Closing automatically Xwayland once all relevant X11 clients are gone is
inherently racy, if a new client comes along right at the time we're
killing Xwayland.

Fixing the possible race conditions between mutter, Xwayland and the X11
clients may take some time.

Meanwhile, make that an experimental feature "autoclose-xwayland".

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
2021-01-19 09:33:33 +01:00
Ian Douglas Scott
b2126fec92 gschema: Add missing summaries for toggle-tiled-left/toggle-tiled-right
Wording copied from `data/50-mutter-windows.xml`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1573>
2020-11-18 13:48:48 -08:00
Olivier Fourdan
935d594978 gschema/wayland: Do not disable the X Security extension
If Xwayland was built with the X Security extension enabled, it should
be safe to use, there is no need to disable it by default from mutter.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1485
2020-10-09 13:53:08 +00:00
Olivier Fourdan
58e2ac8671 gschema: really use line breaks in schema
The newline character `\n` in the schema does not produce a new line.
Use a newline instead.

fixes: dbe44f3a83
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1483
2020-10-08 14:54:45 +00:00
Björn Daase
dbe44f3a83 gschema: Force one bullet point per line
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
2020-10-08 15:41:19 +02:00
Björn Daase
e923641573 gschema: list experimental dma-buf-screen-sharing feature
The key was added in af9df1e5b6
but not added to the list due to the string freeze.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
2020-10-08 15:39:10 +02:00
Björn Daase
815583b534 gschema: Make "Requires a restart." strings consistent
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
2020-10-07 22:49:49 +02:00
Karol Herbst
9b9b912765 backends: force enable modifiers on tagged devices
Some devices can't scanout to linear buffers directly as the hw is not
capable of eg rendering into a linear depth buffer.

Add code to force kms-modifiers on udev taged devices.

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

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443
2020-09-28 14:00:44 +02:00
Olivier Fourdan
5171e35a97 xwayland: Add a setting to disable selected X extensions
The X server, including Xwayland, can be compiled with different X11
extensions enabled at build time.

When an X11 extension is built in the X server, it's usually also
enabled at run time. Users can chose to disable those extensions at run
time using the X server command line option "-extension".

However, in the case of Xwayland, it is spawned automatically by the
Wayland compositor, and the command line options are not configurable
by users.

Add a new setting to disable a selected set of X extension in Xwayland
at startup, without needing to rebuild Xwayland.

Of course, if Xwayland is not built with a given extension support in
the first place (which is the default for the security extension for
example), that option has no effect.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1405
2020-08-29 12:20:26 +02:00
Olivier Fourdan
17417a82a5 cleanup: remove controversial naming
Replace "whitelist" and "blacklist" with "allow_list" and "deny_list"
which better represent the purpose of those variables.

There is no functional change.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1396
2020-08-04 10:04:16 +02:00
Jonas Ådahl
2da27720ca display: Make check-alive timeout configureable
The check-alive feature is there for the user to be able to terminate
frozen applications more easily. However, sometimes applications are
implemented in a way where they fail to be reply to ping requests in a
timely manner, resulting in that, to the compositor, they are
indistinguishable from clients that have frozen indefinitely.

When using an application that has these issues, the GUI showed in
response to the failure to respond to ping requests can become annoying,
as it disrupts the visual presentation of the application.

To allow users to work-around these issues, add a setting allowing them
to configure the timeout waited until an application is considered
frozen, or disabling the check completely.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1080
2020-02-23 17:28:57 +00:00
Carlos Garnacho
7ef32f747b wayland: Add setting/api to check the policy to set up the X11 display
This replaces meta_should_autostart_x11_display(). The "on-demand" policy
is not honored yet.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/709
2019-08-06 00:41:36 +00:00
Olivier Fourdan
851b7d0639 keybindings: Trigger locate-pointer on key modifier
We trigger the "locate-pointer" mechanism when a special key modifier
(defaults to Control_L) key is pressed and released.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
https://gitlab.gnome.org/GNOME/gnome-shell/issues/981
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/merge_requests/19
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/86
2019-06-05 09:34:39 +00:00
Olivier Fourdan
c9cc07fd3a settings: Slack off “xwayland-allow-grabs” setting
To emulate X11 grabs, mutter as a Wayland compositor would disable its
own keyboard shortcuts and when the X11 window is an override redirect
window (which never receives focus), it also forces keyboard focus onto
that X11 O-R window so that all keyboard events are routed to the
window, just like an X11 server would.

But that's a bit of a “all-or-nothing” approach which prevents
applications that would legitimately grab the keyboard under X11 (like
virtual machine viewers) to work by default.

Change “xwayland-allow-grabs” to control whether the keyboard focus
should be locked onto override redirect windows in case of an X11 grab.

For stringent needs, careful users can still use the blacklisting
feature (i.e. a list containing “!*”) to prevent grabs from any X11
applications to affect other Wayland native applications.

https://gitlab.gnome.org/GNOME/mutter/issues/597
2019-06-03 09:34:31 +02:00
Carlos Garnacho
dae2c1d420 backends/native: Add rt-scheduler experimental key to set RT scheduling
This is similar to a change in kwin:
https://blog.martin-graesslin.com/blog/2017/09/kwinwayland-goes-real-time/

If the experimental features key has "rt-scheduler", make it claim the lowest
of RT scheduler priorities, this will be both educated to other RT processes
and improves responsiveness wrt all other processes.

This can only work if mutter/gnome-shell process receives CAP_SYS_NICE
somehow, e.g.: "setcap CAP_SYS_NICE=+ep `which gnome-shell`"

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/921
https://gitlab.gnome.org/GNOME/mutter/merge_requests/460
2019-05-10 21:47:53 +00:00
Marco Trevisan (Treviño)
63c40a9711 meson: Define srcdir and builddir using meson functions
No need to redefine paths starting from top src/build dirs, as meson can give us
this information for free using its functions.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
2019-05-02 19:56:23 +00:00
Georges Basile Stavracas Neto
763ae36cee
Drop Autotools
I saw Meson fade from the sky
On the wind I heard a sigh
As snowflakes cover fallen Makefiles
I will say this last goodbye

Meson is now coming
So ends Autotools days
Future is now coming
And we must away
Over Python and without Bashisms
Through lands where never Meson touched
By silver streams that run down to the Sea

Under parsers, beneath old legacy
Over snow one winter’s morn
I turned at last to paths that lead home
And though where the road then takes me
I cannot tell
We came all this way
But now comes the day
To bid you farewell

Many places I have been
Many sorrows I have seen
But I don’t regret
Nor will I forget
All Makefiles that took that road with me

I bid you all a very fond farewell.
2019-01-10 11:50:54 -02:00
Jonas Ådahl
ef85d1a643 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-11-06 18:51:44 +01:00
Jonas Ådahl
d5203f170e Make screen cast and remote desktop non-experimental
It's time to make this feature more accessible by not requiring editing
an array in gsettings.
2018-06-07 12:57:51 +00:00
Florian Müllner
32547d2eff data: Don't expose window shading shortcut
GTK+ doesn't support shading of client-side decorated windows, and likely
never will (not least because shading is conceptually questionable if the
app customizes the titlebar), and neither do other CSD implementations like
Chromium's. A shortcut that only works with a decreasing number of windows
is more confusing than helpful, so don't expose it.

https://bugzilla.gnome.org/show_bug.cgi?id=645460
2018-01-24 19:09:27 +01:00
Florian Müllner
dc37ee2782 data: Don't expose horizontal workspace keybindings to Settings
Given that GNOME has used a vertical workspace layout ever since 3.0,
allowing users to assign keyboard shortcuts for horizontal workspace
navigation isn't useful at all, as rightfully pointed out by Bastien
Nocera.

https://bugzilla.gnome.org/show_bug.cgi?id=645460
2018-01-24 19:09:27 +01:00
Piotr Drąg
70dfe8c97d Use Unicode quotation marks in new translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772218
2017-12-18 17:22:36 +01:00
Olivier Fourdan
519a0fd93d settings: Add xwayland grab settings
Add new settings to control which X11 windows are allowed to
issue Xwayland grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-12-18 13:15:17 +01:00
Olivier Fourdan
97635d6f84 Add restore-shortcuts to key bindings list
gnome-control-center uses this to list the keybindings, without this
users cannot change the default key combo to restore shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=789386
2017-11-10 17:59:26 +01:00
Olivier Fourdan
6c21a22e4d wayland: Use Super+Escape to re-enable shortcuts
Change the default key combo to re-enable normal keyboard shortcuts
processing while a shortcut inhibitor is in effect to Super+Escape as
primary system modifier key should be Super.

This should reduce the risk of potential conflict with other shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=789386
2017-11-10 17:58:00 +01:00
Piotr Drąg
bdbd2e96de Use Unicode quotation marks in a translatable string
Also adjusts existing translations for it.

See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772218
2017-08-29 18:08:08 +02:00
Jonas Ådahl
97f2c7c161 Add remote desktop and screen cast functionality
This commit adds basic screen casting and remote desktoping
functionalty. This works by exposing two D-Bus API services:
org.gnome.Mutter.ScreenCast and org.gnome.Mutter.RemoteDesktop.

The remote desktop API is used to create remote desktop sessions. For
each session, a D-Bus object is created, and an application can manage
the session by sending messages to the session object. A remote desktop
session the user to emit input events using the D-Bus methods on the
session object. To get framebuffer content, the application should
create an associated screen cast session.

The screen cast API is used to create screen cast sessions. One can so
far either create stand-alone screen cast sessions, or a screen cast
session associated with a remote desktop session. A remote desktop
associated screen cast session is managed by the remote desktop session.

So far only remote desktop managed screen cast sessions are implemented.

Each screen cast session may have one or more streams. A screen cast
stream is a stream of buffers of some part of the compositor content.
So far API exists for creating streams of monitors and windows, but
only monitor streams are implemented.

When a screen cast session is started, the one PipeWire stream is
created for each screen cast stream created for the session. When this
has happened, a PipeWireStreamAdded signal is emitted on the stream
object, passing a unique identifier. The application may use this
identifier to find the associated stream being advertised by the
PipeWire daemon.

The remote desktop and screen cast functionality must be explicitly be
enabled at ./configure time by passing --enable-remote-desktop to
./configure. Doing this will build both screen cast and remote desktop
support.

To actually enable the screen casting and remote desktop, the user must
enable the experimental feature. See
org.gnome.mutter.experimental-features.

https://bugzilla.gnome.org/show_bug.cgi?id=784199
2017-08-29 14:39:04 +08:00
Jonas Ådahl
e8a62861c9 Remove old monitor configuration system
Remove the old MetaMonitorConfig system and mark the new one as
non-experimental. This also removes the D-Bus property.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:20:53 +08:00
Alberts Muktupāvels
98606bc046 data: fix gettext domain
https://bugzilla.gnome.org/show_bug.cgi?id=691611
2017-08-10 22:17:55 +03:00
Olivier Fourdan
dd12f569d9 wayland: add inhibit shortcut mechanism
Add a mechanism to MetaWaylandSurface that inhibits compositor's own
shortcuts when the surface has input focus, so that clients can receive
all key events regardless of the compositor own shortcuts.

This will help with implementing "fake" active grabs in Wayland and
XWayland clients.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
Rui Matos
7e330bd65f keybindings: Add a switch-monitor builtin keybinding
Moved from g-s-d's media keys plugin, where it was called "video-out",
since it requires changing the current monitor configuration and we
want to remove the old DBus API.

This implementation is intentionally simple and not really meant for
more than debugging and validating the various configurations. A
better user experience will be introduced in gnome-shell with a custom
keybinding handler.

The default value includes <Super>P in addition to the standard keysym
for historical reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-19 11:18:53 +02:00
Rui Matos
e126b6ed16 data: Enable monitor-config-manager by default
We'll need to drop the old monitor configuration system to pave way to
better hi-dpi and multi-gpu support. Let's start by defaulting to the
new system in order to give it more real world testing.
2017-07-18 22:32:59 +02:00
Rui Matos
c614a2db28 keybindings: Add a rotate-monitor builtin keybinding
Moved from g-s-d's media keys plugin, where it was called
"video-rotate", since it requires changing the current monitor
configuration and we want to remove the old DBus API.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00