1
0
Fork 0
Commit graph

7 commits

Author SHA1 Message Date
Jonas Ådahl
0330ce1f15 context: Make the context own MetaWaylandCompositor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 11:34:37 +02:00
Jonas Ådahl
aa306ac3ca Introduce MetaContextMain
This object intends to replace the scattered functions that are used to
make up what is effectively a "mutter context". It takes care of the
command line arguments that is now done in main.c, persistant virtual
monitors, and the like.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 11:25:21 +02:00
Jonas Ådahl
2e784e23a2 context: Add 'notify_ready()' vfunc and method
This intends to replace the call to `meta_register_with_session()` that
deals with X11 session management, and is called when the user is
"ready". In thet test context, doing that makes no sense, so make it a
no-op.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 10:59:40 +02:00
Jonas Ådahl
75f9085ab9 context: Add setup phase
During this phase, the backend is created and configured. Currently only
configured, but will gain more logic that currently main.c does with
various helpers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 10:59:40 +02:00
Jonas Ådahl
6e4d3e0f85 context: Add create_backend() vfunc
This lets the context implementation create a backend. Will later be
used in a 'setup' phase.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 10:59:40 +02:00
Jonas Ådahl
6c6b5b9a48 context: Add entry points for context configuration
Configuration is the first step of the lifetime of a context, after
creation; it's here where argc/argv is processed, and it's determined
what kind of compositor, etc, it is going to be.

The tests always run as Wayand compositors, so the configuration is
quite simple, but will involve more steps later on.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 10:43:28 +02:00
Jonas Ådahl
e020fdfddf Introduce mostly empty MetaContext type
This type is intended to replace the scattered functions used to
configure how the Mutter compositor is run. It currently doesn't do
anything, and only has a human readable name, intended to be set to e.g.
"GNOME Shell".

It's an abstract type, and is intended to be used via either a future
`MetaContextMain` for real display server use cases, and a
`MetaContextTest` for test cases.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
2021-07-15 10:43:28 +02:00