Commit Graph

24100 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
1aac180e8d
cogl/matrix: Rotate using graphene 2019-03-20 15:17:13 +00:00
Georges Basile Stavracas Neto
d0590de9e8
cogl/matrix: Apply perspective with Graphene 2019-03-20 15:17:13 +00:00
Georges Basile Stavracas Neto
7c909d184c
cogl/matrix: Apply orthographic with graphene 2019-03-20 15:17:12 +00:00
Georges Basile Stavracas Neto
10f1d3118c
cogl/matrix: Frustum with graphene 2019-03-20 15:17:12 +00:00
Georges Basile Stavracas Neto
08015ce784
cogl/matrix: Remove more dead code 2019-03-20 15:17:12 +00:00
Georges Basile Stavracas Neto
25c7d15040
cogl/matrix: Remove cogl_matrix_ortho
It's deprecated and unused, and will only complicate transitioning
to Graphene even further.
2019-03-20 15:17:12 +00:00
Georges Basile Stavracas Neto
ecee159113
cogl/matrix: Scale using Graphene
It sucks that we have to double transpose the matrix.
2019-03-20 15:17:12 +00:00
Georges Basile Stavracas Neto
bb257868f3
cogl/matrix: Remove matrix flags and types 2019-03-20 15:17:11 +00:00
Georges Basile Stavracas Neto
a055e443aa
cogl/matrix: Multiply using Graphene 2019-03-20 15:17:11 +00:00
Georges Basile Stavracas Neto
c938b25d6a
cogl/matrix: Invert matrices with Graphene 2019-03-20 15:17:11 +00:00
Georges Basile Stavracas Neto
8e2658a601
cogl/matrix: Init translation matrix using Graphene 2019-03-20 15:17:11 +00:00
Georges Basile Stavracas Neto
3e02a89c2a
cogl/matrix: Use Graphene to compare matrices 2019-03-20 15:17:11 +00:00
Georges Basile Stavracas Neto
10dd3399ca
cogl/matrix: Use graphene to transpose matrix 2019-03-20 15:17:10 +00:00
Georges Basile Stavracas Neto
92a58d9afa
cogl: Add Graphene utility functions to Cogl 2019-03-20 15:17:10 +00:00
Georges Basile Stavracas Neto
54f9bebeb8
cogl/matrix: Change semantincs of cogl_matrix_get_array
CoglMatrix.get_array() returns the column-major CoglMatrix itself,
since the first fields of the matrix is effectively an array of
floats, and we can just pretend it is. Of course, it basically
ignores any C-specific type checking.

WIP
2019-03-20 15:17:10 +00:00
Georges Basile Stavracas Neto
88be11f6e2
cogl/matrix-stack: Move GL code to GL 2019-03-20 15:17:10 +00:00
Georges Basile Stavracas Neto
97206476ac
cogl/matrix-stack: Use graphene types on entries
This will help moving to graphene_matrix_t, since the convertions
between nodes and graphene types won't be necessary anymore.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:53 +00:00
Georges Basile Stavracas Neto
5790c23112
Replace ClutterGeometry by graphene_rect_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:53 +00:00
Georges Basile Stavracas Neto
13cac6bcf8
Replace ClutterRect by graphene_rect_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:52 +00:00
Georges Basile Stavracas Neto
eb10b79cb0
Replace ClutterPoint by graphene_point_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:52 +00:00
Georges Basile Stavracas Neto
a06ad3a923
Replace ClutterSize by graphene_size_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:52 +00:00
Georges Basile Stavracas Neto
cb36a7363f
clutter: Set progress function on graphene_point3d_t
This was dropped by the previous commit.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:52 +00:00
Georges Basile Stavracas Neto
4dd3e00609
Replace ClutterVertex by graphene_point3d_t
Pretty direct and straightforward port. This requires
a GNOME Shell counterpart.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:51 +00:00
Georges Basile Stavracas Neto
c66221db76
Replace CoglVector* by graphene_vec*_t
This is an extremely straightforward and minimalistic port of
CoglVector APIs to the corresponding Graphene APIs.

Make ClutterPlane use graphene_vec3_t internally too, for the
simplest purpose of keeping the patch focused.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:51 +00:00
Georges Basile Stavracas Neto
41a03f0589
Replace CoglQuaternion by graphene_quaternion_t
Same story, but smaller damage area. CoglQuaternion was used
in fewer places than CoglEuler, resulting in a smaller patch.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:51 +00:00
Georges Basile Stavracas Neto
4a4a423182
Replace CoglEuler by graphene_euler_t
As the first step into removing Cogl types that are covered by
Graphene, remove CoglEuler and replace it by graphene_euler_t.

This is a mostly straightforward replacement, except that the
naming conventions changed a bit. Cogl uses "heading" for the
Y axis, "pitch" for the X axis, and "roll" for the Z axis, and
graphene uses the axis themselves. That means the 1st and 2nd
arguments need to be swapped.

Also adapt the matrix stack to store a graphene_euler_t in the
rotation node -- that simplifies the code a bit as well.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:51 +00:00
Georges Basile Stavracas Neto
b1255bddcd
clutter: Pull in Clutter dependencies
Mutter requires Clutter, which requires Cogl. That means
Clutter requires all Cogl dependencies, and Mutter requires
all Clutter dependencies as well.

However, currently, Clutter does not pull in its dependencies,
which means we need to link against Cogl manually.

Add Clutter dependencies to declare_dependency() so that the
graphene dependency only needs to be declared once, for Cogl,
and pulled together.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:50 +00:00
Georges Basile Stavracas Neto
9cc096d189
Add Graphene dependency
Graphene is a small library with data types and APIs
specially crafted to computer graphics. It contains
performant implementations of matrices, vectors, points
and rotation tools. It is performance because, among
other reasons, it uses vectorized processor commands
to compute various operations.

Add Graphene dependency to Mutter.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:50 +00:00
Georges Basile Stavracas Neto
5d9c8b072e
ci: Update gsettings-desktop-schemas URL
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:50 +00:00
Georges Basile Stavracas Neto
8955f159ff
clutter/tests: Rename variable
Graphene uses C99 and includes stdbool.h, which adds a
new 'bool' type. Clutter has an a11y test that names a
variable as 'bool' too, and they do not play well together.

Rename this variable to boolean.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:50 +00:00
Georges Basile Stavracas Neto
844722e8aa
cogl/tests: Remove usage of implicit API from color-mask test
Small cleanup that I happened to have here.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:49 +00:00
Georges Basile Stavracas Neto
3190692601
clutter/actor: Drop ClutterActor:clip property
This is a deprecated property that is not used anywhere
in the codebase. Not by GNOME Shell. Because it uses the
deprecated ClutterGeometry type, it's a good target for
cleaning up, given that ClutterGeometry will be dropped
later on.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:49 +00:00
Georges Basile Stavracas Neto
c829fd3374
Remove fog support
Fog is explicitly deprecated in favour of CoglSnippet API,
and in nowhere we are using this deprecated feature, which
means we can simply drop it without any sort of replacement.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-03-20 15:16:47 +00:00
Carlos Garnacho
f0b9654deb core: Remove startup sequences after timeout
The complete/remove semantics were split to cater for presenting windows,
so we must now separately do both here.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/501
2019-03-18 18:06:01 +00:00
Florian Müllner
a1e325f749 build: Don't use absolute paths with subdir keyword
Meson 0.50.0 made passing an absolute path to install_headers()'
subdir keyword a fatal error. This means we have to track both
relative (to includedir) paths for header subdirs and absolute
paths for generated headers now :-(

https://gitlab.gnome.org/GNOME/mutter/merge_requests/492
2019-03-18 12:37:14 +00:00
Jonas Ådahl
00b4556051 constraints: Don't use intersection when sliding with custom rule
If an intersection is empty, the (x, y) coordinates are undefined, so
just use the work area and in-progress constrained window rect when
sliding according to the SLIDE_X or SLIDE_Y custom placement rule.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
86b5247770 constraints: Only get parent rect once when placement rule constraining
We got it in a switch case, then again when finalizing. Only get it once
instead.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
23f31e518e constraints: Only readjust placement constraint when not checking
When check_only is TRUE, the constraint should not be applied, just
checked. We failed to comply here when a placed transient window was
to be moved together with its parent, updating the window position
directly even if check_only was TRUE.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
f580b28a27 window: Replace placement constrained bool with state
Using an actual state instead of a boolean makes it clearer it's a state
that changes. Eventually we might add more state too.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
b4f1569640 window: Unmanage rule placed window if ending up outside of parent
If a client maps a persistent popup with a placement rule, then resizes
the parent window so that the popup ends up outside of the parent,
unmanage the popup and log a warning about the client being buggy.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
f2d7165a52 window: Don't try to move hidden attached windows
When a parent window is moved, attached windows (attached modal dialogs
or popups) is moved with it. This is problematic when such a window
hasn't been shown yet (e.g. a popup that has been configured but not
shown), as it'll mean we try to constrain an empty window. Avoid this
issue by not trying to auto-move empty windows.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
1bd3c13fe1 wayland/xdg-shell: Split out popup placement out of setup finish
Makes the function slightly more comprehensible.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Jonas Ådahl
5d1eccfb6f boxes: Fix spelling in API
Change adjecent to adjacent.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
2019-03-17 14:12:40 +00:00
Khaled Hosny
c96cf0608d Update Arabic translation 2019-03-15 23:42:49 +02:00
Erik Kurzinger
056c45fe0c wayland/buffer: Try realizing EGLStream before EGLImage buffer
Currently, it is assumed that if querying the EGL_TEXTURE_FORMAT of a
Wayland buffer succeeds it is an EGLImage. However, this assumption will no
longer hold on upcoming versions of the NVIDIA EGL Wayland driver which
will include support for querying this attribute for EGLStream buffers as
well. Hence, we need to check if buffers are EGLStreams first.

Fixes #488
https://gitlab.gnome.org/GNOME/mutter/merge_requests/477
2019-03-14 14:39:52 -07:00
Tom Briden
2ac7f7f1e5 build: Make libsystemd an optional dependency
Otherwise it errors out before checking for elogind instead

https://gitlab.gnome.org/GNOME/mutter/merge_requests/491
2019-03-12 13:39:15 +00:00
Pablo Barciela
318164779c boxes: Actually check for rectangle containment
Fixes condition duplicated:

          /* If a contains b, just remove b */
          if (meta_rectangle_contains_rect (a, b))
            {
              delete_me = other;
            }
          /* If b contains a, just remove a */
          else if (meta_rectangle_contains_rect (a, b))
            {
              delete_me = compare;
            }

Closes https://gitlab.gnome.org/GNOME/mutter/issues/480
2019-03-12 05:03:53 +01:00
Florian Müllner
7bd33e7b00 frame: Remove flashing support
It's now unused.

https://gitlab.gnome.org/GNOME/mutter/issues/491
2019-03-12 00:27:07 +00:00
Florian Müllner
f8d62da2dc bell: Always flash window instead of frame
Traditionally visual alerts were implemented by flashing the focus
window's frame. As that only works for windows that we decorate,
flashing the whole window was added as a fallback for client-decorated
windows.

However that introduces some confusing inconsistency, better to just
always flash the entire window.

https://gitlab.gnome.org/GNOME/mutter/issues/491
2019-03-12 00:27:07 +00:00
Marco Trevisan (Treviño)
303e02bdac monitor: Fix indentation style on foreach functions
https://gitlab.gnome.org/GNOME/mutter/merge_requests/488
2019-03-12 00:15:43 +00:00