1
0
Fork 0
Commit graph

23625 commits

Author SHA1 Message Date
Jonas Ådahl
c663f4ae84 tests: Add env var to override plugin used for tests
This is so that the test suite can point at the non-installed version.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
0afaf5262b plugin: Rename the .so file from plugin.so to libplugin.so
This is the filename convention you get when you define a shared module
in meson, and since there is no particular reason to not include the
"lib" prefix, lets make it easier to port it over. While at it,
de-duplicate the retrieval of the plugin name.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
85fbf66179 Move meta-enum-type.*.in into meta/
It'll be installed in the meta/ directory, so put the template files in
the corresponding directory in the tarball. This will also simplify the
port to meson.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
a97cc84b81 Fix warnings when building without verbose mode 2018-11-06 17:17:36 +01:00
Jonas Ådahl
bc32655c28 Pass -D_GNU_SOURCE instead of defining it in source 2018-11-06 17:17:36 +01:00
Jonas Ådahl
176e6fcded x11: Require XInput 2.3 at build time
The needed libXi version was released 5 years ago, so should be fine.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
ecec99eedb x11: Require xrandr 1.5 at build time
While leaving the runtime checks in place, requiring xrandr 1.5 at build
time allows us to remove some seemingly unnecessary conditional
inclusion of functionality.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
2f4a68c8c3 Clean up include macros mess
The order and way include macros were structured was chaotic, with no
real common thread between files. Try to tidy up the mess with some
common scheme, to make things look less messy.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
92f4ffc0dd tests: Make testboxes an actual test
testboxes was a binary that did unit testing, but it wasn't integrated
to the test system, so in effect, it was never run. Instead integrate it
into the other mutter unit tests. This includes changing a few of
meta_warning()s into g_warning()s so that the GTest framework can handle
them.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
8a03f1ad02 Always generate meta-default-modes.h
This adds a hard requirement on having cvt installed, which in the past
was soft, where the generated file was added to the repository.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
e0727aba5f clutter/tests/micro-bench: Don't define unused macro
TESTS_DATA_DIR was not used by any of the tests, so no use defining it.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
14be04a630 clutter/tests: Unconditionally include tests using gdk-pixbuf
We already have gdk-pixbuf as a dependency, so there is no reason to
make it conditional here.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
0067f78155 clutter: Unconditionalize a few X11 extensions
We now require xcomposite, xkb, xi 2.2, at least at compile time.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
3e03d1e38e clutter/configure.ac: Remove left-over gbm and drm dependencies
The gbm and drm facing code has since long been moved into mutter.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
fe7a67f0e7 clutter/configure.ac: Remove unused gdk dependency 2018-11-06 17:17:36 +01:00
Jonas Ådahl
db77e2e187 clutter: Assume compiler supports visibility flag and attributes
Unconditionally pass -fvisibility=hidden to compiler and define
_CLUTTER_EXTERN to __attribute__((visibility("default"))) extern.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
e3c6e3b84d clutter: Fix a couple of guard macros
Use #ifdef instead of #if in a couple of places.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
0d9391e282 clutter: Remove examples
Running clutter apps standalone using mutters fork is not something
worth supporting.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
1e2610e4f4 clutter: Remove useless OS_LINUX macro
It was unconditionally set to 1.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
0095c2e340 clutter: Require full relative path when including 2018-11-06 17:17:36 +01:00
Jonas Ådahl
c90e63a91d clutter: Stop defining some unused macros 2018-11-06 17:17:36 +01:00
Jonas Ådahl
8c0e13ca7a clutter: Remove clutter specific version
Use the mutter version when something is still needed.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
8894ec462a cogl: Pass unit-tests file to run-tests.sh
There are different unit-tests file generated containing lists of tests
the test-runner.sh should run. Running run-tests.sh read the unit-tests
in the current directory, which is inconvenient to do when using meson.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
331e830cf6 cogl: Fix HAVE_COGL_GL guard
Macro was only defined when defined to 1.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
d68fcbc887 cogl: Make cogl-config.h include check explicit
Don't rely on some combination of macros, but an explicit definition to
check whether cogl-config.h was included.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
9dbdf6b724 cogl: Require relative full paths when including
I.e. including a OpenGL driver file, the path "driver/gl/..." must be
specified when including.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
530861b24d cogl: Remove left-over WebGL paths 2018-11-06 17:17:36 +01:00
Jonas Ådahl
11f8b12a9d clutter: Unconditionally include clutter-build-config.h 2018-11-06 17:17:36 +01:00
Jonas Ådahl
0163a0b0cd cogl: Unconditionally include cogl-config.h 2018-11-06 17:17:36 +01:00
Jonas Ådahl
12171e413b cogl: Unconditionally depend on cairo 2018-11-06 17:17:36 +01:00
Jonas Ådahl
99fb79f4cb cogl: Unconditionally include "strings.h" 2018-11-06 17:17:36 +01:00
Jonas Ådahl
24d8d40deb cogl/tests: Mark failing test as known failure
This allows us to enable running the tests again. Not fixing the
failure is at least better than not running the tests at all.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
97004e6114 cogl: Remove ARBfp pipeline support
As with fixed pipelines, we require the use of the GLSL pipeline in
mutter, and no point in supporting ARBfp anyway.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
8f58ad02fb cogl: Remove fixed pipeline support
We require being able to use shaders so stop supporting a pipeline that
wouldn't work to begin with.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
98af9bb251 cogl: Remove notion of a "cogl" version
Mutters copy of cogl isn't a separate library with its own version, so
remove the old version macros.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
7b2eaa76a4 cogl: Remove support for GLESv1
We have no need for it in mutters cogl variant.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
00a5523667 cogl: Remove some left over KMS backend stuff 2018-11-06 17:17:36 +01:00
Jonas Ådahl
f30cef3046 cogl: Always build CoglPango support 2018-11-06 17:17:36 +01:00
Jonas Ådahl
fba7d8c79c cogl: Always build CoglPath support 2018-11-06 17:17:36 +01:00
Jonas Ådahl
46942c24a3 cogl: Make various functions non-optional
Remove fallback implementations of some functions available in
gcc/clang and Linux/BSDs.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
9846a4d812 cogl: Make _Static_assert non-optional 2018-11-06 17:17:36 +01:00
Jonas Ådahl
da741ead25 cogl-gles2/Makefile.am: Add cogl/ includedir
Otherwise cogl-egl-defines.h isn't found when building out-of-tree.
2018-11-06 17:17:36 +01:00
Andrea Azzarone
31f525d566 x11: close display in an idle function
Closing a GdkDisplay during an event handler is not currently supported by Gdk
and it will result in a crash when doing e.g. 'mutter --replace'. Using an idle
function will close it safely in a subsequent main loop iteration.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/595
2018-11-05 12:04:01 +00:00
Ron Yorston
92cccf53df workspace-manager: Allow workspace layout to be overridden
meta_workspace_manager_override_workspace_layout is implemented by
calling meta_workspace_manager_update_workspace_layout which
respects the workspace_layout_overridden flag.  After the first call
to meta_workspace_manager_override_workspace_layout all subsequent
calls fail silently.

Reset workspace_layout_overridden to FALSE before calling
meta_workspace_manager_update_workspace_layout.

https://gitlab.gnome.org/GNOME/mutter/issues/270
2018-10-30 10:54:57 +01:00
Pekka Paalanen
4282067e24 gpu-kms: assert on invalid flip attempts
drmModePageFlip() is guaranteed to fail for the invalid FB id 0.
Therefore it never makes sense to call this function with such argument.
Disabling a CRTC must be done with SetCrtc instead, for example.

Trying to flip to FB 0 not only fails, but it also causes Mutter to
never try page flip on this output again, using drmModeSetCrtc()
instead.
2018-10-25 09:57:39 +00:00
Pekka Paalanen
85e9784a22 renderer/native: fix next_fb_id race on CPU copy path
There was a race in setting next_fb_id when a secondary GPU was using
the CPU copy path. Losing this race caused the attempt to
drmModePageFlip () to FB ID 0 which is invalid and always fails. Failing
to flip causes Mutter to fall back to drmModeSetCrtc () permanently.

In meta_onscreen_native_swap_buffers_with_damage ():
- update_secondary_gpu_state_pre_swap_buffers ()
  - copy_shared_framebuffer_cpu () but only on the CPU copy path
    - secondary_gpu_state->gbm.next_fb_id is set
- wait_for_pending_flips ()
  - Waits for any remaining page flip events and executes and destroys
    the related page flip closures.
    - on_crtc_flipped ()
      - meta_onscreen_native_swap_drm_fb ()
        - swap_secondary_drm_fb ()
	  - secondary_gpu_state->gbm.next_fb_id = 0;
- meta_onscreen_native_flip_crtcs ()
  - meta_onscreen_native_flip_crtc ()
    - meta_gpu_kms_flip_crtc () gets called with fb_id = 0

This race was observed lost when running 'mutter --wayland' on a machine
with two outputs on Intel and one output on DisplayLink USB dock, and
wiggling around a weston-terminal window between the Intel and
DisplayLink outputs. It took from a second to a minute to trigger. For
testing with DisplayLink outputs Mutter also needed a patch to take the
DisplayLink output into use, as it would have otherwise been ignored
being a platform device rather than a PCI device.

Fix this race by first waiting for pending flips and only then
proceeding with the swap operations. This should be safe, because the
pending flips could have completed already before entering
meta_onscreen_native_swap_buffers_with_damage ().
2018-10-25 09:57:39 +00:00
Jonas Ådahl
49fea735aa wayland/text-input: Ignore text-input state commit when not focused
We might unset focus, or already be out of focus (e.g. an X11 client or
clutter text entry is focused) when a text-input state is committed by
the client. We handled this before, except when text input was
explicitly disabled by the client, the Wayland text-input was in focus
by the input method, and it focused itself out.

Simplify the logic a bit by just dropping the state on the floor in all
cases where after any potential focus changes were done, we are not
focused.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/353
2018-10-23 14:13:33 +02:00
Jonas Ådahl
8200995fdb shaped-texture: Clean up texture regions
We allocated texture regions, but didn't free them when finished,
causing a leak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
2018-10-20 15:47:50 +02:00
Jonas Ådahl
71a62bb18f constraints: Make current placement rule stack allocated
We're not going to keep it past the function scope, so no reason to put
it on the heap. We also didn't free it, so this'll fix a memory leak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
2018-10-20 15:46:37 +02:00
Florian Müllner
76abe87090 xprops: Make sure text_property_to_utf8() returns UTF8
Commit 840378ae68 changed the code to use XmbTextPropertyToTextList()
instead of gdk_text_property_to_utf8_list_for_display(), but didn't
take into account that the replacement returns text in the current
locale's encoding, while any callers (rightfully) expect UTF8.

Fix this by converting the text if necessary.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/227
2018-10-12 15:01:36 +02:00