diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2020-01-21 11:05:58 +0100 |
---|---|---|
committer | Florian Müllner <florian.muellner@gmail.com> | 2020-01-27 13:43:06 +0000 |
commit | 68598f7c0c1119eba08f4eabcb3d1ccf5d00f3d4 (patch) | |
tree | 90d9d4cbebfb5b08505204a3a8acdbc19b3f017f /src/gnome-shell-perf-tool.in | |
parent | ee7e62c9c8854ec5e0936ba0f1b49e8aed07c265 (diff) | |
download | gnome-shell-68598f7c0c1119eba08f4eabcb3d1ccf5d00f3d4.tar.gz |
perf-tool: Allow to run as a Wayland compositor
`gnome-shell-perf-tool` is initially designed to run on X11, using the
`--replace` option which does not work when gnome-shell is a Wayland
compositor.
A solution would be to run `gnome-shell-perf-tool` in place of just
`gnome-shell` to run the entire perf session under Wayland, but the
script `gnome-shell-perf-tool` does not spawn `gnome-shell` as a Wayladn
compositor, so that fails as well.
Add a `--wayland` option to `gnome-shell-perf-tool` so that it can
optionally spawn gnome-shell as a Wayland compositor so the whole perf
tool can be starred from a console with:
```
$ dbus-run-session -- gnome-shell-perf-tool --wayland
```
Alternatively, for testing purposes, it can also be started nested with:
```
$ dbus-run-session -- gnome-shell-perf-tool --nested
```
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2139
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/941
Diffstat (limited to 'src/gnome-shell-perf-tool.in')
-rwxr-xr-x | src/gnome-shell-perf-tool.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gnome-shell-perf-tool.in b/src/gnome-shell-perf-tool.in index 050c66b30..04072c4cd 100755 --- a/src/gnome-shell-perf-tool.in +++ b/src/gnome-shell-perf-tool.in @@ -45,6 +45,13 @@ def start_shell(perf_output=None): if options.replace: args.append('--replace') + if options.wayland or options.nested: + args.append('--wayland') + if options.nested: + args.append('--nested') + else: + args.append('--display-server') + return subprocess.Popen(args, env=env) def run_shell(perf_output=None): @@ -284,6 +291,10 @@ parser.add_option("", "--version", action="callback", callback=show_version, parser.add_option("-r", "--replace", action="store_true", help="Replace the running window manager") +parser.add_option("-w", "--wayland", action="store_true", + help="Run as a Wayland compositor") +parser.add_option("-n", "--nested", action="store_true", + help="Run as a Wayland nested compositor") options, args = parser.parse_args() |