1
0
Fork 0
Commit graph

28128 commits

Author SHA1 Message Date
Jonas Ådahl
fe7bece31e wayland/surface-actor: Reset and sync subsurface state when resetting
A actor surface may be reset by an xdg_toplevel if a NULL buffer is
attached. This should reset the actor state of the toplevel to an empty
state, while unmapping the previous actor. Subsurfaces, however, should
stay intact, including their relationship to the toplevel. They should
also not be yanked away from the actor of the actor surface prior to it
resetting, so that a window-destroy animation can include the subsurface
actor.

This fixes a potential crash when a subsurface tries to commit to its
wl_surface after the destroy animation of the toplevel has finished, as
the actor would at that point have been destroyed and cleared from the
actor surface struct, causing a segmentation fault.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
2020-01-10 16:01:22 +00:00
Jonas Ådahl
3969285e5c shaped-texture: Make setting the same texture a no-op
Will be helpful when pushing state to the shaped texture, letting the
one pushing not have to care about checking if anything changed.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
2020-01-10 16:01:22 +00:00
Jonas Ådahl
60ebf19c9e shaped-texture: Minor clean up
Use cogl_clear_object(), add reference to texture when setting, and
remove redundant runtime type check.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
2020-01-10 16:01:22 +00:00
Jonas Ådahl
fcfe90aa9f wayland: Replace manual GNode subsurface iteration with macro
Similar to wl_list_foreach(), add
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE() that iterates over all the
subsurfaces of a surface, without the caller needing to care about
implementation details, such as leaf nodes vs non-leaf nodes.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
2020-01-10 16:01:21 +00:00
Jonas Ådahl
76ee026caa wayland/egl-stream: Cache texture snippet
While it's not very relevant now, as we would rarely create it anyway
since the buffer nor texture never changes for a surface, it will be in
the future, as the actor state (including its content,
MetaShapedTexture) will be synchronized by the MetaWaylandActorSurface
at a later point in time, and not by MetaWaylandSurface, at state
application time.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
2020-01-10 16:01:21 +00:00
Jonas Ådahl
6e5ac0b585 Use G_GNUC_FALLTHROUGH instead of comments
Get the same task done in a bit more C:y way.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/998
2020-01-09 17:58:29 +01:00
Björn Daase
17e20619ec gitlab: Add issue templates
This adds two GitLab issue templates for:
* Bugs
* Features

It is the equivalent to dd2e560255.

https://gitlab.gnome.org/GNOME/mutter/issues/385
2020-01-08 19:34:19 +00:00
Jonas Dreßler
c4fa30ac7d backends/native: Fix relative motion calculation if monitor isn't found
The method `relative_motion_across_outputs` is used to adjust the
distance/delta of a mouse movement across multiple monitors to take the
different scale factors of those monitors into account. This works by
getting the adjacent monitors that the movement-line/vector intersects
with and adjusting the final position (or end point of the
movement-line) by multiplying the parts of the line spanning across
different monitors with the scale factors of those monitors.

In the end of this calculation, we always want to set the new end
coordinates of the relative motion to the new end coordinates of the
adjusted movement-line. We currently only do that if all adjacent
monitors the line is crossing actually exist, because only then we end
up inside the "We reached the dest logical monitor" else-block and set
`x` and `y` to the correct values. Fix that and make sure the returned
values are also correct in case an adjacent monitor doesn't exist by
adding separate `target_x` and `target_y` variables which we update during
each pass of the while loop so we're always prepared for the while loop
exiting before the destination monitor was found.

Thanks to Axel Kittenberger for reporting the initial bug and tracking
the issue down to `relative_motion_across_outputs`.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/774
2020-01-07 20:18:46 +00:00
Georges Basile Stavracas Neto
84ea4ad990 clutter/brightness-contrast-effect: Compare float with G_APPROX_VALUE
Nobody should ever compare float for equality. Use G_APPROX_VALUE to
check that.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/992
2020-01-07 14:20:21 -03:00
Georges Basile Stavracas Neto
64685f4b20 clutter/offscreen-effect: Clear offscreen when pre-paint fails
Some ClutterOffscreenEffect subclasses, such as ClutterBrightnessContrastEffect,
early-return FALSE in pre-paint before chaining up. It's an important optimization
that avoids creating or updating the offscreen framebuffer.

However, if an offscreen framebuffer already exists by the time pre-paint fails,
it will be used *without* repaint the actor over it. That causes an old picture
of the actor to be displayed.

Fix that by always clearing the offscreen framebuffer when pre-paint fails.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/810

https://gitlab.gnome.org/GNOME/mutter/merge_requests/992
2020-01-07 14:20:21 -03:00
Georges Basile Stavracas Neto
bf594e9fb6 clutter/offscreen-effect: Clear offscreen framebuffer when disabling
When changing the 'enabled' property and disabling the offscreen effect,
it doesn't make sense to preserve the offscreen framebuffer. It's not
drawing, after all.

Furthermore, because ClutterOffscreenEffect only checks if the offscreen
framebuffer exists to decide whether or not to redraw, keeping the fbo
alive is a waste of resources.

Clear the offscreen framebuffer when the effect is disabled or enabled.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/810

https://gitlab.gnome.org/GNOME/mutter/merge_requests/992
2020-01-07 14:19:33 -03:00
Georges Basile Stavracas Neto
3958e75ed2 clutter/offscreen-effect: Use g_clear_pointer for cleanup
It does the exact same checks, and saves us a few lines of code.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/992
2020-01-07 14:02:25 -03:00
Sebastian Keller
802309caf9 x11-selection: Plug MetaX11SelectionOutputStream leak
https://gitlab.gnome.org/GNOME/mutter/merge_requests/991
2020-01-06 19:54:00 +00:00
Sebastian Keller
468b09c01e theme: Plug GdkPixbuf leak
https://gitlab.gnome.org/GNOME/mutter/merge_requests/991
2020-01-06 19:54:00 +00:00
Sebastian Keller
c13ea4f48d theme: Plug GtkIconInfo leak
https://gitlab.gnome.org/GNOME/mutter/merge_requests/991
2020-01-06 19:54:00 +00:00
Carlos Garnacho
1e7285b2bb backends: Always enable tap-to-click/drag on opaque Wacom tablets
Touch-wise, those are essentially giant touchpads, but have no buttons
associated to the "touchpad" device (There may be pad buttons, but
those are not mouse buttons).

Without tap-to-click/drag, touch in those devices is somewhat useless
out of the box. Have them always enable these features, despite the
setting.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/968
2020-01-06 13:52:55 +00:00
Robert Mader
a8cb84c711 window-actor: Also cull out clip_region
From `meta_cullable_cull_out`:
```
Actors that may have fully opaque parts should also subtract out a region
that is fully opaque from @unobscured_region and @clip_region.
```

As we do no check for the intersection of these two elsewhere in the code,
let's substract from the clip region, too.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/985
2020-01-06 13:38:23 +00:00
Florian Müllner
9075a5bf1e Bump version to 3.35.3
Update NEWS.
2020-01-05 12:15:29 +01:00
Dz Chen
bd4ebd23f4 Update Chinese (China) translation 2019-12-27 08:15:48 +00:00
Fran Dieguez
31c7bcac29 Update Galician translation 2019-12-25 03:46:45 +00:00
Fran Dieguez
d3b1168e26 Update Galician translation 2019-12-25 02:05:34 +00:00
Sebastian Keller
674f52ba74 clutter/stage: Fix picking of rectangles with negative positions
FLT_MIN is the smallest *positive* number above 0 that can be
represented as floating point number. If this is used to initialize the
maximum x/y coordinates of a rectangle, this will always be used if all
x/y coordinates of the rectangle are negative. This means that picking
at 0,0 will always be a hit for such rectangles.

Since mutter creates such a window for server side decorations on X11,
this window will always be picked at 0,0 preventing clicking/hovering
the activities button in gnome-shell at that coordinate.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/893
2019-12-23 17:53:53 +01:00
Adam Jackson
498264959a cogl: Add support for GL_ANGLE_pack_reverse_row_order
This is the GLES equivalent of GL_MESA_pack_invert.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/980
2019-12-18 16:01:51 -05:00
Pascal Nowack
e89cea8e5a screen-cast: Fix window recording on HiDPI
Using the same scale for the window as the
logical monitor only works correctly when having
the experimental 'scale-monitor-framebuffer'
feature enabled.
Without this experimental feature, the stream
will contain a black screen, where the actual
window only takes a small part of it.

Therefore, use a scale of 1 for the non-
experimental case.

Patch is based on commit 3fa6a92cc5.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/976
2019-12-18 18:41:44 +01:00
Adam Jackson
e32e20521d cogl: Update documentation for COGL_PRIVATE_FEATURE_ANY_GL
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
9d5092cef5 cogl: Remove COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE
Only the backend cares about this at all, and it's always set.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
68d0c11d88 cogl: Remove COGL_PRIVATE_FEATURE_GL_EMBEDDED
Only the driver backend cares about this now, we can equivalently check
that the driver is COGL_DRIVER_GLES2.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
fdf830940b cogl: Remove COGL_PRIVATE_FEATURE_GL_WEB
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
10daade1c0 cogl: Remove COGL_PRIVATE_FEATURE_GL_FIXED, track it in the driver
At this point only the gl driver is at all aware of the difference
between core and compat contexts. COGL_PRIVATE_FEATURE_GL_FIXED is also
now quite misnamed, since we're using the GLSL pipeline even for pre-GL3
contexts. Remove the private feature and handle the few remaining
differences by checking the driver class inside the gl driver.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
9a3a6dc212 cogl: Move GL-specific context setup/teardown into the driver
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
f9599b64d0 cogl: Add context_{,de}init hooks to CoglDriverVtable
There's quite a bit of CoglContext that properly belongs to the driver.
Add some hooks to allow the context to create/destroy such state. We
don't have driver-private storage in the CoglContext yet, though we
probably should.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
a46fd33460 clutter: Remove unneeded X11 includes from various headers
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
d5a70c7669 cogl: Remove unneeded X11 includes from various headers
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
573ba108d9 cogl: Remove unused xlib state from CoglContext
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
9325bd9d8e cogl: Remove unneeded GLX includes from cogl-framebuffer-private.h
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
420fb28d3f cogl: Move GLX-related headers into winsys/
Makes it harder to accidentally include them from the core.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
5613f4f7f4 cogl: Remove unused explicit blend-enable controls
https://gitlab.gnome.org/GNOME/mutter/merge_requests/978
2019-12-18 15:58:52 +00:00
Daniel van Vugt
02db9ee577 cogl: Remove reference to nonexistent type CoglVertex2f
It is actually CoglVertexP2.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/979
2019-12-18 15:50:36 +00:00
Daniel van Vugt
4aab814c37 cogl: Upload clipping rectangles in parallel
That is as a single array in a single GL operation. Instead of doing
each one as a separate upload.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/971

https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:52:23 +08:00
Daniel van Vugt
a48206e827 cogl: Simplify add_stencil_clip_region coordinates
https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:46:58 +08:00
Daniel van Vugt
99cc435730 cogl: Add function cogl_2d_primitives_immediate
For use in batching multiple primitives as a single GL upload.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:46:54 +08:00
Yariv Barkan
67d9995280 backends/native: Get the correct value for pinch dy
Fix a typo - use the correct libinput api.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/974
2019-12-13 21:57:33 +02:00
Florian Müllner
82233cce65 Bump version to 3.35.2
Update NEWS.
2019-12-11 18:53:50 +01:00
Benjamin Berg
2e97ba316d ci: Change instructions to use podman
Podman can also be used to create the image. The only thing to keep in
mind with podman is to add --format docker, so that the image will be
compatible with all CI runners.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/966
2019-12-11 12:56:28 +01:00
Bruce Cowan
7186d09085 Update British English translation
(cherry picked from commit c05328f76a163be287a4f3660bfd0edc20c63ce7)
2019-12-11 10:25:52 +00:00
Jonas Ådahl
4fccc903b5 xwayland: Don't queue frame callbacks when role assigned
'xwayland: Do not queue frame callbacks unconditionally' changed the
frame callback behavior of Xwayland surfaces so that they behave the
same way as other actor surfaces (e.g. xdg-shell ones), except for the
case when they are initially assigned.

Remove this special casing as well including the now incorrect comment,
so that the Xwayland surfaces behave the same as the others in this
regard also when assigning.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/964
2019-12-10 09:15:49 +00:00
Robert Mader
06fa131235 clutter-timeline: Fix some indentation
In Gnome Builder this looks very odd, much worse than in git.
We'll probably not touch the code soon, so fix indentation
for better readability.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/965
2019-12-09 17:53:51 +01:00
Jonas Ådahl
132fbf49d7 wayland: Let MetaWaylandXdgPopup dismiss incorrectly placed popups
It's a xdg_popup detail, and not until the actual position is finalized
is the actual correctness known.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
2019-12-09 10:09:40 +01:00
Jonas Ådahl
d02c124e1d wayland/surface-role: Rename commit() vfunc apply_state()
The vfunc is not called when a surface commits its state, but when the
state is applied. Make this clearer by changing the name to
"apply_state" (and "pre_apply_state").

https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
2019-12-09 10:09:40 +01:00
Jonas Ådahl
554644f9e0 wayland: Rework asynchronous window configuration
This changes how asynchronous window configuration works. Prior to this
commit, it worked by MetaWindowWayland remembering the last
configuration it sent, then when the Wayland client got back to it, it
tried to figure out whether it was a acknowledgment of the configuration
or not, and finish the move. This failed if the client had acknowledged
a configuration older than the last one sent, and it had hacks to
somewhat deal with wl_shell's lack of configuration serial numbers.

This commits scraps that and makes the MetaWindowWayland take ownership
of sent configurations, including generating serial numbers. The
wl_shell implementation is changed to emulate serial numbers (assuming
each commit acknowledges the last sent configure event). Each
configuration sent to the client is kept around until the client one. At
this point, the position used for that particular configuration is used
when applying the acknowledged state, meaning cases where we have
already sent a new configuration when the client acknowledges a previous
one, we'll still use the correct position for the window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
2019-12-09 10:09:40 +01:00