Commit Graph

24779 Commits

Author SHA1 Message Date
Jonas Ådahl
d4eb222644 later: Add tracing
https://gitlab.gnome.org/GNOME/mutter/merge_requests/757
2019-08-31 12:22:39 +00:00
Jonas Ådahl
a14fd1b955 compositor: Trace pre/post paint functions
https://gitlab.gnome.org/GNOME/mutter/merge_requests/757
2019-08-31 12:22:39 +00:00
Jonas Ådahl
ab1107973b backends/native: Add various cogl traces
Trace the time spent finishing a frame, posting KMS updates and some
other things.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/757
2019-08-31 12:22:39 +00:00
Tim Sabsch
4ab483d991 Update German translation 2019-08-29 22:02:29 +00:00
Trần Ngọc Quân
dabf72f3c0 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2019-08-28 14:07:16 +07:00
Anders Jonsson
907a1f5e48 Update Swedish translation 2019-08-27 18:41:44 +00:00
Jonas Ådahl
97140ab634 Revert "clutter/stage-cogl: Remove pending_swaps counter"
This reverts commit f57ce7254d.

It causes crashes, https://gitlab.gnome.org/GNOME/mutter/issues/735, and
changes various expectations relied upon by the renderer code, and being
close to release, it's safer to revert now and reconsider how to remove
the pending swap counter at a later point.
2019-08-27 20:16:01 +03:00
Florian Müllner
dc9c5417bc main: Add test initialization function
Since Clutter's backend relies on MetaBackend now, initialzation has
to go through meta_init(), both in mutter and in gnome-shell.

However the compositor enum and backend gtype used to enforce the
environment used for tests are private, so instead expose a test
initialization function that can be used from both mutter and
gnome-shell.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/750
2019-08-27 16:34:01 +00:00
Ray Strode
556e7694de iconcache: Avoid xrender picture formats when creating cairo surface
If an application provides its window icon via wmhints, then mutter
loads the pixmap specified by the application into a cairo xlib surface. When
creating the surface it specifies the visual, indirectly, via an XRender
picture format.

This is suboptimal, since XRender picture formats don't have a way to specify
16bpp depth, which an application may be using.

In particular, applications are likely to use 16bpp depth pixmaps for their
icons, if the video card offers a 16bpp framebuffer/root window.

This commit drops the XRender middleman, and just tells cairo a visual to use
directly.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/715
2019-08-27 18:47:41 +03:00
Ray Strode
1a5cba5df5 Revert "iconcache: Support 16bit icons"
This reverts commit b95d7e8276.

It's poisoning cairo's GC cache with a GC that has the wrong
colordepth, leading to a crash in unrelated code later on.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/715
2019-08-27 18:47:41 +03:00
Jonas Ådahl
cd0990c581 window-actor: Use new get_image() API to screen casting window content
This fixes screen casting of windows consisting of multiple surfaces to
work.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/752
2019-08-27 15:31:25 +00:00
Jonas Ådahl
96e831dd8a window-actor: Add API to get a cairo surface of the window
This currently uses a hack where it pushes a CoglFramebuffer backed by a
texture to the framebuffer stack, then calls clutter_actor_paint() on
the window actor causing it to render into the framebuffer. This has the
effect that all subsurfaces of a window will be drawn as part of the
window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/752
2019-08-27 15:31:25 +00:00
Jonas Ådahl
65fde269c6 screen-cast/window: Use window actor damaged signal instead of paint
We are really more interested in when a window is damaged, rather than
when it's painted, for screen casting windows. This also has the benefit
of not listening on the "paint" signal of the actor, meaning it'll open
doors for hacks currently necessary for taking a screenshot of a window
consisting of multiple surfaces.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/752
2019-08-27 15:31:25 +00:00
Jonas Ådahl
ad138210b3 window-actor: Add 'damaged' signal
Make it possible to listen for damage on a window actor. For X11, the
signal is emitted when damage is reported; for Wayland, it is emitted
when any of the surfaces associated with the window is damaged.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/752
2019-08-27 15:31:25 +00:00
Florian Müllner
6968f17f3f Revert "main: Add test initialization function"
This reverts commit 7e69d1400a.
2019-08-27 15:32:54 +03:00
Florian Müllner
7e69d1400a main: Add test initialization function
Since Clutter's backend relies on MetaBackend now, initialzation has
to go through meta_init(), both in mutter and in gnome-shell.

However the compositor enum and backend gtype used to enforce the
environment used for tests are private, so instead expose a test
initialization function that can be used from both mutter and
gnome-shell.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/750
2019-08-27 15:29:55 +03:00
Florian Müllner
ccefa87351 build: Add postinstall script
... to compile schemas and update the desktop database when installing
from source rather than building a distribution package.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/756
2019-08-27 09:57:54 +00:00
Robert Mader
a3c97ee535 surface-actor-wayland: Handle stex being disposed
As the MetaShapedTexture might already got finalized, this can lead to a crash.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/755
2019-08-27 08:55:51 +00:00
Robert Mader
77229f99b8 wayland: Implement subsurface.place_below() for parents
Flatten the subsurface actor tree, making all surface actors children
of the window actor.
Save the subsurface state in a GNode tree in MetaWaylandSurface, where
each surface holds two nodes, one branch, which can be the tree root
or be attached to a parent surfaces branch, and a leaf, which is
used to save the position relative to child branch nodes.

Each time a surface is added or reordered in the tree, unparent all
surface actors from the window actor, traverse all leaves of the
tree and readd the corresponding surface actors back to the window
actor.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/664
2019-08-27 11:31:00 +03:00
Jonas Dreßler
a51437ee2b clutter/input-pointer-a11y: Include success boolean in stop signals
Add a boolean parameter to the signal to inform the handler whether the
timeout completed successfully or not. This allows the shell to
gracefully end the pie timer animation and show a success animation when
the click happens.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/745
2019-08-27 07:36:57 +00:00
Carlos Garnacho
78232fa3eb core: Check X11 display availability before use in MetaStackTracker
This object can be generally triggered without a X11 display, so make sure
this is alright. For guard window checks, use our internal
meta_stack_tracker_is_guard_window() call, which is already no-x11 aware.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/730
2019-08-26 17:39:10 +00:00
Carlos Garnacho
433e1b388d core: Move Stack to StackTracker synchronization back to stack.c
We indirectly were relying on the MetaX11Stack for this. We strictly
need the _NET_CLIENT_LIST* property updates there, so move our own
internal synchronization to common code.

Fixes stacking changes of windows while there's no MetaX11Display.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/730
2019-08-26 17:39:10 +00:00
Georges Basile Stavracas Neto
9b7d918537 surface-actor: Unref shaped texture on dispose
The MetaShapedTexture created by MetaSurfaceActor used to
be a ClutterActor, which means destruction was taken care
by Clutter.

Now that it's a plain GObject, we need to manually clean it
up.

Cleanup the shaped texture on disposal.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/753
2019-08-26 20:14:00 +03:00
Jordi Mas
4c59eb0910 Update Catalan translation 2019-08-26 15:24:11 +02:00
Robert Mader
5cfea4fee3 wayland/dnd-surface: Apply surface offset
The surface offset allows an application to move itself in relative
coordinates to its previous position. It is rather ill defined and
partly incompatible with other functionality, which is why we ignore
it generally.

For dnd-surfaces though, it is the de-facto standard for applications
to properly position the dnd-icon below the cursor. Therefore apply
the offset on actor sync by setting the feedback actor anchor.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/684
2019-08-26 11:57:49 +00:00
Robert Mader
7275cf60bd wayland/feedback-actor: Use float for position and anchor
To be correct with fractional scaling. Furthermore, we currently
use it only with ClutterPoint values, which are floats already.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/684
2019-08-26 11:57:49 +00:00
Hans de Goede
acbefa5263 wayland: pointer-confinement: Listen to "geometry-changed" on the surface, not the actor
Commit b12c92e206 ("wayland: Add MetaWaylandSurface::geometry-changed signal")
Added a "geometry-changed" signal on MetaWaylandSurface, but the matching
changes to src/wayland/meta-pointer-confinement-wayland.c made it listen
for geometry-changed on the surface-actor instead of on the surface itself,
leading to errors like these:

gnome-shell[37805]: ../gobject/gsignal.c:2429: signal 'geometry-changed' is invalid for instance '0x5653aa7cfe50' of type 'MetaSurfaceActorWayland'

This commit fixes this.

Fixes: b12c92e206 ("wayland: Add MetaWaylandSurface::geometry-changed signal")

https://gitlab.gnome.org/GNOME/mutter/merge_requests/751
2019-08-26 13:24:58 +02:00
Fran Dieguez
2b64861ee1 Update Galician translation 2019-08-25 16:07:57 +00:00
Balázs Úr
ea90b803fa Update Hungarian translation 2019-08-24 20:57:04 +00:00
Matej Urbančič
56e8aab280 Updated Slovenian translation 2019-08-24 20:08:57 +02:00
Rūdolfs Mazurs
1b58341e50 Update Latvian translation 2019-08-24 16:56:37 +00:00
Piotr Drąg
634c31d7cb backends: Don’t translate GLib properties
https://gitlab.gnome.org/GNOME/mutter/merge_requests/749
2019-08-24 17:10:32 +02:00
Olivier Fourdan
b8dcd5f842 clutter/main: Ignore synthetic events for accessibility
When a dwell click causes the pointer to move to another surface, a
synthetic event is generated which triggers another dwell click.

Make sure we ignore those to avoid dwell clicking twice in a raw.

Suggested-by: Carlos Garnacho <carlosg@gnome.org>
https://gitlab.gnome.org/GNOME/mutter/merge_requests/747
2019-08-24 12:43:20 +03:00
Olivier Fourdan
14e02635ff clutter/input-pointer-a11y: Trigger dwell detection in a timeout
Restarting the dwell click immediately would result in a contant
animation showing.

Start dwell detection in its own timeout handler, which has the nice
effect of not constantly showing a dwell animation and also making sure
that the dwell click timeout is started when pointer movement stops.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/747
2019-08-24 12:43:20 +03:00
Jonas Dreßler
9b3b5badfb clutter/input-pointer-a11y: Fix dwell timeout start after moving pointer
Sometimes the dwell timeout doesn't start again after quickly moving the
pointer. That happens if `should_stop_dwell` returns TRUE for the last
motion event we receive: It will stop the current timeout, but not start
a new one until we receive another event where the moved distance is
smaller than the threshold.

To fix this, always call `should_start_dwell` and `start_dwell_timeout`
instead of using an else-block, this makes sure we start a new dwell
timeout still during the same motion event that stopped the old one.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/746
2019-08-24 09:25:14 +00:00
Jonas Dreßler
47c1558287 clutter/input-pointer-a11y: Remove unneeded character
https://gitlab.gnome.org/GNOME/mutter/merge_requests/746
2019-08-24 09:25:14 +00:00
Carlos Garnacho
cc7e843c44 tests: Move clutter-test-utils.[ch] to src/tests
And add the necessary glue so those initialize a X11 clutter backend.
This should get Clutter tests that are dependent on windowing to work
again, thus they were enabled back again.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
cfb8f18cef clutter: Move tests to src/tests
Clutter doesn't hold anymore backend implementations, move tests where
we have one that we may assign.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
c0a71720af backends: Don't use glib types in new native backend objects
https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
8b03d9ecc3 clutter: Move evdev input to src/backends/native
The end goal is to have all clutter backend code in src/backends. Input
is the larger chunk of it, which is now part of our specific
MutterClutterBackendNative, this extends to device manager, input devices,
tools and keymap.

This was supposed to be nice and incremental, but there's no sane way
to cut this through. As a result of the refactor, a number of private
Clutter functions are now exported for external backends to be possible.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
ea54ce7d96 clutter: Drop functions to get XVisualInfo
We don't need nor use visuals anymore.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
cb31e3e12a clutter: Drop unused function to translate to screen coordinates
We don't have anything like GdkInputMode that we'd like to honor, this
can just be dropped.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
c710a56903 backends: Move nested stage to src/backends/x11/nested
We now have a MetaStageX11, so it's extra confusing to have both in
the same directory.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
96d5bde9b7 backends: Don't use glib types in new X11 backend objects
https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
ad72fa46b0 clutter: Move X11 input to src/backends/x11
The end goal is to have all clutter backend code in src/backends. Input
is the larger chunk of it, which is now part of our specific
MutterClutterBackendX11, this extends to device manager, input devices,
tools and keymap.

This was supposed to be nice and incremental, but there's no sane way
to cut this through. As a result of the refactor, a number of private
Clutter functions are now exported for external backends to be possible.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
fa4580de53 clutter: Temporarily comment out clutter tests
It will be enabled back in later commits. We're set for quite a ride
here.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
5e343e2c16 clutter: Remove support for foreign stages
We have no use for this.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
ef93bb6471 clutter: Remove event retrieval toggle
This is x11-specific API that was added back when clutter was out
of tree. Just remove it and directly do what we want.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
d6aaef9954 clutter: Drop _() define
It's an unused no-op, we can do without it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00
Carlos Garnacho
2ca351366e clutter/cally: Remove needless per-backend code in cally
We can poke the X11 stage to translate to root coordinates, or just assume
the compositor will cover the root window area and avoid per-backend behavior
here.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
2019-08-24 08:59:08 +00:00