summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* display: Keep pointer to the contextJonas Ådahl2021-07-154-4/+32
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* stage/x11: Terminate using MetaContext instead of meta_quit()Jonas Ådahl2021-07-151-4/+5
| | | | | | Done for the nested backend when clicking the close button. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* main: Move MetaX11DisplayPolicy to a new meta-private-enums.hJonas Ådahl2021-07-158-8/+38
| | | | | | | | | As with the compositor type enum, also have the X11 display policy enum, as it's also effectively part of the context configuration. But as with the compositor type, move it to a header file for enums only, and since this is a private one, create a private variant meta-enums.h. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Make context owner of MetaDisplayJonas Ådahl2021-07-154-23/+32
| | | | | | | It may still be closed from elsewhere, e.g. when being replaced, but the reference is owned by MetaContext instead of itself. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Make the context owner of the backendJonas Ådahl2021-07-157-40/+126
| | | | | | | There is still the `_backend` singleton still, as there are still the `meta_get_backend()` that needs to work for now. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* main: Remove now unused functions used for running mutterJonas Ådahl2021-07-152-813/+7
| | | | | | The way to do this now is using a MetaContext. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add way to add custom option groupJonas Ådahl2021-07-152-0/+15
| | | | | | This will be used by gnome-shell. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add way to set plugin GType instead of nameJonas Ådahl2021-07-152-2/+25
| | | | | | Will be used by gnome-shell. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* main: Remove meta_test_init()Jonas Ådahl2021-07-153-112/+5
| | | | | | | This was the last user of the configuration override API, so that goes as well. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/persistent-virtual-monitor: Port to MetaContextJonas Ådahl2021-07-151-21/+15
| | | | | | | | Since this tests the `--virtual-monitor` command line argument, it uses the `MetaContextMain` variant of the context, as it's there that command line argument is handled. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* mutter: Port to MetaContextJonas Ådahl2021-07-151-14/+31
| | | | | | | Uses the new MetaContextMain, replacing piece by piece "real display server" setup done using mostly main.c functions. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* Introduce MetaContextMainJonas Ådahl2021-07-156-2/+704
| | | | | | | | | 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>
* tests/clutter: Port to MetaContextJonas Ådahl2021-07-154-89/+40
| | | | | | | | | The clutter tests neeed to start and stop, thus uses their own main loop instead of the one in MetaContext. Shouldn't matter, since nothing in mutter should happen that makes the test self-terminate from inside mutter. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Add 'no-x11' and 'test-client' constructor flagsJonas Ådahl2021-07-158-9/+35
| | | | | | | The 'no-x11' one will inhibit Xwayland from starting, and 'test-client' will make sure the test client path is properly discovered. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* clutter: Remove clutter_init_with_args()Jonas Ådahl2021-07-154-127/+2
| | | | | | Not used anymore. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* display: Don't include sn.h from display-private.hJonas Ådahl2021-07-153-4/+2
| | | | | | | It has some annoying macro requirement to not nag about API stability; try to limit its exposure. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/stage-view-tests: Port to MetaContextJonas Ådahl2021-07-151-42/+7
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/ref-test-sanity: Port to MetaContextJonas Ådahl2021-07-151-33/+10
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/headless-start: Port to MetaContextJonas Ådahl2021-07-151-40/+7
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/headless-start: Stop ignoring the missed frame warningsJonas Ådahl2021-07-151-20/+0
| | | | | | They don't seem to happen anymore. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/test-runner: Port to MetaContextJonas Ådahl2021-07-152-54/+18
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* monitor-manager/test: Add default fall back initial configJonas Ådahl2021-07-151-1/+43
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Add 'run-tests' signal that can replace g_test_run()Jonas Ådahl2021-07-151-1/+18
| | | | | | For tests that doesn't use g_test_run(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/test-runner: Assorted style cleanupJonas Ådahl2021-07-151-3/+6
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Handle dealing with option entriesJonas Ådahl2021-07-153-0/+53
| | | | | | | | | | | Users can add option entries, and it'll be part of the configuration phase. Create the main group manually to be able to set a user_data pointer; this will be required to not have to rely on globals when parsing options using a callback. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/unit-tests: Port to MetaContextJonas Ådahl2021-07-151-43/+14
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Add 'before-tests' and 'after-tests' signalsJonas Ådahl2021-07-151-1/+32
| | | | | | Will be used to set up and tear down test infrastructure. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests/native-headless: Port to MetaContextJonas Ådahl2021-07-151-40/+6
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Add helper to run a test sessionJonas Ådahl2021-07-152-0/+56
| | | | | | | Takes care of setup, starting, running, and terminating, as well as running the GLib test suite. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* main: Temporarily tie meta_quit() to meta_context_terminate*()Jonas Ådahl2021-07-152-2/+45
| | | | | | | Makes it possible for mutter internally to use meta_quit() both if we're running using a MetaContext or the scattered functions. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add 'notify_ready()' vfunc and methodJonas Ådahl2021-07-154-0/+17
| | | | | | | | | 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>
* context/test: Respect MUTTER_SYNC envvarJonas Ådahl2021-07-151-0/+2
| | | | | | | | It just calls meta_set_syncing() accordingly. Is currently done by meta_init() either when the env var is set, or when a command line argument is passed. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Enable 'scale-monitor-framebuffer' backend settingJonas Ådahl2021-07-151-0/+10
| | | | | | This is done in all tests, so make life easier by doing it here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Init debug utils during setup phaseJonas Ådahl2021-07-151-0/+1
| | | | | | Is currently done during meta_init(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Init introspection paths during setupJonas Ådahl2021-07-151-0/+10
| | | | | | This is currently done during meta_init(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Change to home directory during setupJonas Ådahl2021-07-151-0/+15
| | | | | | Is currently done during meta_init(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Initialize signal handlers during setupJonas Ådahl2021-07-151-0/+33
| | | | | | Is currently done during meta_init(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Init prefs when startingJonas Ådahl2021-07-151-0/+3
| | | | | | Is currently done by meta_start(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add start/run/terminate phasesJonas Ådahl2021-07-152-0/+110
| | | | | | | | | | | | The start phase creates the MetaDisplay object, and initializes Wayland, and creates the main loop. The run phase runs the main loop and handles returning an error if the context was terminated with an error. The terminate phase terminates the main loop, with or without an error. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Load plugin during setup phaseJonas Ådahl2021-07-153-0/+33
| | | | | | | The plugin must be configured by the context implementation during the configure phase. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add setup phaseJonas Ådahl2021-07-154-0/+64
| | | | | | | | 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>
* util: Export meta_set_syncing() symbolJonas Ådahl2021-07-151-0/+3
| | | | | | | Will be set by MetaContextTest, until we can move away from the function completely. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Set up locale on initJonas Ådahl2021-07-151-0/+6
| | | | | | | Taken from main.c, which does that when getting the main option context, which happens to happen early in a process's lifetime. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add create_backend() vfuncJonas Ådahl2021-07-153-18/+61
| | | | | | | 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>
* context/test: Add test context type enumJonas Ådahl2021-07-152-2/+13
| | | | | | | | A test context type will later determine what kind of backend the test case should use; i.e. whether the nested or headless backend should be used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context/test: Configure test setup during configurationJonas Ådahl2021-07-152-12/+14
| | | | | | | This includes setting up the GLib test framework, overriding the X11 and Wayland display names. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* test-utils: Expose helper for ensuring client pathJonas Ådahl2021-07-152-4/+7
| | | | | | Will be used by the test context to reduce boiler plate. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* context: Add entry points for context configurationJonas Ådahl2021-07-154-0/+66
| | | | | | | | | | | 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>
* main: Move MetaCompositorType to a new meta-enums.hJonas Ådahl2021-07-1511-8/+40
| | | | | | | | It'll be part of and owned by MetaContext, intending to replace `meta_is_wayland_compositor()`, but place it in a new file for public enums so that it can be used from wherever. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
* tests: Introduce MetaContextTestJonas Ådahl2021-07-153-0/+96
| | | | | | | | | | | | | This introduces a MetaContext implementation aimed to be used for test cases, with as little boiler plate as possible needed in the test. It currently doesn't do anything, just fills out the GObject boiler plate and sets a name. Build it into every core test, for compilation, even though it isn't used anywhere yet. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>