24965a78da
window: Make monitor from rect finder helper more clearly named
...
The function finds a suitable logical monitor given the window
rectangle; this wasn't all that clear from the name
"calculate_main_logical_monitor".
This is in preparation for finding a new logical monitor using things
other than the geometry of the window.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
a25081ffb5
tests/respect-constraints: Explicitly set monitor size
...
The test depends on a certain monitor size; make sure to set that up
front.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
e743334fe0
tests/runner: Add 'sync_shown' command
...
This command will block until a previously asynchronously shown window
is shown. E.g.
show w/1 async
... do stuff ..
sync_shown w/1
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
5c26d786f5
tests/runner: Add 'resize_monitor' metatest command
...
This will allow tests to change monitor resolution. The first argument
is the monitor ID; there is always one monitor added by default, and it
has the id 0. It's currently not possible to add more monitors, so
passing '0' is the only valid way to resize monitors.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
06d9ed3da7
tests/runner: Recreate the virtual monitor for each test
...
This ensures that the virtual monitor has an expected initial state each
test.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
532c63e96c
tests/runner: Make test runner use the headless backend
...
Using the headless backend means we can use virtual monitors, which
means we can unblock add support for hotplugging via metatests.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
10a2787a71
tests/runner: Remove support running tests as an X11 WM
...
This hasn't worked for a while, since the test always runs the nested
backend, meaning it's a Wayland compositor. To unblock testing window
management in combination to monitor changes, lets remove the
unreachable X11 WM paths, so that we can start using virtual monitors.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554 >
2022-08-11 11:32:42 +00:00
811f280817
build: Add missing include
...
util-private.h includes glib-i18n-lib.h, which requires GETTEXT_PACKAGE
to be defined. The define comes from config.h,
but that cannot be included in headers, so we have to make sure
that any source file that pulls in util-private.h (or a header
that includes it) includes config.h first.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2566 >
2022-08-10 20:28:40 +02:00
2a725f0bd9
cursor-renderer-native: Don't retry forever after GBM cursor functions fail
...
This avoids flooding the log with every cursor change:
```
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.404: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.450: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.451: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
```
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2354
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2520 >
2022-08-10 15:35:55 +00:00
c430731436
output-xrandr: Less line wrapping
...
To silence CI warnings from check-code-style.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2511 >
2022-08-10 14:41:46 +00:00
9d7cebd8e6
monitor-manager: Remove struct member indentation
...
To silence CI warnings from check-code-style.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2511 >
2022-08-10 14:41:46 +00:00
5476feeaf2
monitor-config-store: Parentheses for correct indentation
...
To silence check-code-style complaints in CI, but also for consistency
(other cases already have parentheses).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2511 >
2022-08-10 14:41:46 +00:00
3d044c351e
monitor-config-store: Remove whitespace to silence check-code-style warning
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2511 >
2022-08-10 14:41:46 +00:00
8019714b5d
texture-mipmap: Fix some leaks and tidy up
...
Seems we were leaking mipmap->mipmap_texture and mipmap->fb.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2562 >
2022-08-10 11:52:39 +00:00
5356bc865f
main: Add meta-context to the header
...
The meta_restart function now requires it.
Fixes f772b4cde6
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2559 >
2022-08-10 10:47:51 +00:00
23526a99c7
x11-display: Unset GDK_BACKEND environment variable
...
mutter needs GDK to use the x11 backend. It already calls
gdk_set_allowed_backends ("x11") for this purpose; however, if
GDK_BACKEND=wayland (or any other non-x11 backend possibly) happened to
be in the environment, GDK would fail to initialize at all. This would
result in mutter not registering as X11 window manager, and all X11
clients hanging.
Big thanks to Olivier Fourdan for figuring this out!
v2:
* Restore original value of GDK_BACKEND environment variable after
initializing GDK.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2022283
Bug: https://bugs.debian.org/1008992
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2496 >
2022-08-10 08:34:48 +00:00
30daad4da5
cogl/pipeline/vertend/glsl: Move out unit test to its own file
...
Fix a memory leak while at it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
2c72032668
tests/cogl/unit: Run most tests with all drivers
...
All tests but one (so far) will in one way or the other depend on what
driver is used, so run the tests on all.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
07f8edde22
cogl/pipeline/opengl: Move out unit test to separate file
...
Also rename the suffix to "-glsl" to not confuse OpenGL with GLES2
since this test covers both.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
16a7f77701
cogl/pipeline-state: Move out working unit test to separate file
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
ae0f6c549f
cogl/pipeline-state: Move out failing test to its own file
...
This test is a known failure, so mark it as such. It's stored in its own
file since keeping it in the same as the passing test isn't markable
using meson.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
57382b6aff
test/cogl/unit: Allow marking known failures
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
4905a55f64
cogl/pipeline-cache: Move unit test to its own file
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
d0861c8ae2
cogl: Move out bitmask unit test to separate file
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
9a9e7e471c
tests/cogl: Add unit test framework
...
It consists of only a macro and build description logic.
Adds a macro for simpler tests that doesn't require a context; unit
tests requiring a context should use the same framework as conform
tests.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
4ebaa433ee
cogl: Remove now empty conform test suite
...
All working tests have already migrated to the test suite using mutter;
move the old unported tests over too, and remove the conform test
framework, as it is no longer used.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:13 +00:00
5d40a5eeea
tests/cogl: Migrate fence test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
2b43ff5963
tests/cogl: Migrate texture rg test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
e7f535a21d
tests/cogl: Migrate pipeline shader state test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
94744061de
tests/cogl: Migrate texture no allocate test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
d066fb5380
tests/cogl: Migrate pipeline cache unrefs texture test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
68dcde0bdb
tests/cogl: Migrate copy/replace texture test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
20111fa8ca
tests/cogl: Migrate primitive and journal test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
3750ed6a26
tests/cogl: Migrate framebuffer bits test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
09990f8bcc
tests/cogl: Migrate texture get/set data test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
85ad013b2d
tests/cogl: Migrate alpha texture test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
629c23b229
tests/cogl: Migrate npot texture test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
33c582d33a
tests/cogl: Migrate map buffer range test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
0a841ce846
tests/cogl: Migrate alpha test test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
5b0fa9cff4
tests/cogl: Migrate layer remove test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
c0746a04f9
tests/cogl: Migrate no-gl header test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
590290cd6d
tests/cogl: Migrate point sprite tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
41e5ee63d3
tests/cogl: Migrate point size attribute tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
2746861c6a
tests/cogl: Migrate point size test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
ae9b4a1bcf
tests/cogl: Migrate write texture formats test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
ddb982ba6e
tests/cogl: Migrate read texture formats test
...
This test fails on gl and gl3, but not on gles2; mark is at such.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
bfd5e87c92
tests/cogl: List known failures
...
Some tests fail on e.g. gl and gl3, but not on gles2; allow describing
that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
400cc89364
tests/cogl: Migrate sparse pipeline test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
8dc0489b33
tests/cogl: Migrate primitive tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00
559c9c8795
tests/cogl: Migrate journal test
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555 >
2022-08-08 21:59:12 +00:00