1
0
Fork 0
Commit graph

26457 commits

Author SHA1 Message Date
Marek Černocký
52587f7152 Czech translation 2020-09-01 12:55:42 +02:00
Daniel Mustieles
bba985f6e2 Updated Spanish translation 2020-09-01 11:05:47 +02:00
Fabio Tomat
d421964792 Update Friulian translation 2020-09-01 07:40:59 +00:00
Carlos Garnacho
e2123768f6 wayland: Drop Xwayland abstract socket
This is unnecessary, and even counter productive with flatpak applications,
as there is a bind mount between the application and the socket.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1289

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1424
2020-08-31 19:46:27 +00:00
Florian Müllner
6b04b2ff60 clutter/backends: Rename master and slave devices
Just because X11/XI uses a particular terminology doesn't mean we
have to use the same terms in our own API. The replacement terms
are in line with gtk@1c856a208, which seems a better precedent
for consistency.

Follow-up to commit 17417a82a5.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1425
2020-08-31 21:07:03 +02:00
Florian Müllner
c1c061140f core/display: Remove obsolete typedef
The corresponding type was replaced in 2001.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1425
2020-08-31 21:07:03 +02:00
Matej Urbančič
161ac1a874 Updated Slovenian translation 2020-08-31 18:16:45 +02:00
Robert Mader
effb824412 shaped-texture: Add debug paint overlay for opaque regions
Using opaque painting paths can have a big impact on painting performance.
In order to easily validate whether we use the opaque paths, add a opaque
(green) or blended (purple) overlay over painted areas if the
`META_DEBUG_PAINT_OPAQUE_REGION` `MetaDebugPaintFlag` is set.

You can do so in `lg` via:
`Meta.add_debug_paint_flag(Meta.DebugPaintFlag.OPAQUE_REGION)`

This can be helpful for application developers, as previously it was not
trivial to check whether e.g. Wayland or X11 opaque regions where
properly set.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1372
2020-08-31 17:48:56 +02:00
Robert Mader
1f557a502b cogl/context: Add API to create named pipelines
In certain situations it's desirable to keep pipelines around for
the whole lifetime of the session. In order to not leak them and
properly clean them up on shutdown, introduce a new mechanism to
create named pipelines that are bound to their correstponding
context and may be used across file boundries.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1372
2020-08-31 15:47:08 +00:00
Robert Mader
20982bf2c8 util: Add paint debug flags
Analogous to `ClutterDrawDebugFlag` but intended for concepts that
are not present in Clutter, such as Wayland/X11 opaque regions.
Also add the first flag for the later.

To set the flag, run:
`Meta.add_debug_paint_flag(Meta.DebugPaintFlag.OPAQUE_REGION)`

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1372
2020-08-31 15:47:08 +00:00
Robert Mader
1dc6a15eac util: Small style cleanups
To make the code more pleasant to read.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1372
2020-08-31 15:47:08 +00:00
Марко Костић
19ddf13959 Update Serbian translation 2020-08-31 14:30:36 +00:00
Rafael Fontenelle
a454b229ac Update Brazilian Portuguese translation 2020-08-31 11:08:00 +00:00
Carlos Garnacho
8cc95e44f4 wayland: Reword comment
This is no longer directly related to DBus messages, but our own event
queue. Change the wording and use CLUTTER_PRIORITY_EVENTS to make it
bolder, even though it's the same than G_PRIORITY_DEFAULT.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
2020-08-31 08:40:12 +00:00
Carlos Garnacho
6f316345be wayland: Flush text_input.done event after IM key event
We set an idle to coalesce multiple IM events together, as the protocol
requires us to send them in one frame, and unfortunately there is no
idea about whether more IM events are upcoming.

One good hint though are key events generated from the IM, we want to
apply all IM changes before the key event is processed, so make it sure
that the .done event is flushed before the key event is handled.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
2020-08-31 08:40:12 +00:00
Carlos Garnacho
51760692b0 clutter: Push commit/delete_sourrounding as IM events
These are not given directly to the input focus anymore, instead
queued up as events. This way, all actions triggered by the input
method (commit and preedit buffer ones, but also synthesized key
events) queue up the same way, and are thus processed in the exact
same order than they are given to us.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
2020-08-31 08:40:12 +00:00
Carlos Garnacho
fb6ff75a97 clutter: Prepare input focus for IM event delivery
The clutter_input_focus_filter_key_event() function has been made
a more generic filter_event(). Besides its old role about letting
key events go through the IM, it will also process the IM events
that are possibly injected as a result.

Users have been updated to these changes.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
2020-08-31 08:40:12 +00:00
Carlos Garnacho
d3b845902e clutter: Add IM events
These will be used to make IM commands into something that is processed
in a fixed order relative to key events.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
2020-08-31 08:40:12 +00:00
Daniel van Vugt
86af337585 background-content: Use redraw_clip when culling is unavailable
When in the overview culling via `self->clip_region` is unavailable.
The region is `NULL` because the paint call has not originated from a
`WindowGroup`, because the overview does not use `WindowGroup`.

So the main wallpaper was being painted in full while in the overview.
That's a waste of effort because `redraw_clip` is going to be used to
stencil/scissor out only the parts that are changing. We don't need to
paint *most* of the wallpaper, only the parts behind anything changing.

For the overview this reduces GPU power usage (intel_gpu_top) roughly
10% and reduces render times almost as much.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1363
2020-08-30 12:04:07 +00:00
Daniel van Vugt
30809665d8 background-content: Explicitly distinguish stage space from actor space
`meta_background_content_paint_content` was mixing two different
coordinate systems in `actor_pixel_rect`. It was initialized with
actor-local coordinates and then `if (self->clip_region)` would be
treated as stage coordinates. This worked because `self->clip_region`
was only non-NULL outside of the overview where both coordinate systems
were the same. So it always got the right answer, possibly by accident.

In order to enhance the function however we will need to know which
coordinate system we're working in, so now we make it explicit.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1363
2020-08-30 12:04:07 +00:00
Daniel van Vugt
0efecc1dc5 background-content: Don't set up pipeline unless it's needed
There was still a possibility we might return and not paint anything
so there's no need to set up the pipeline before that.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1363
2020-08-30 12:04:07 +00:00
Daniel van Vugt
a1dd3c43fb clutter-actor: Cull actors that don't intersect the redraw clip
Previously we only culled actors that didn't intersect the bounding box
of the redraw clip. Now we also cull those whose paint volume bounds don't
intersect the arbitrary shape of the redraw clip.

This was inspired by the activities overview where idle windows and
workspace previews were being needlessly repainted. In that particular
case this yields more than 10% reduction in render time. But it probably
helps in other situations too.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1359
2020-08-30 11:49:09 +00:00
Piotr Drąg
8e72566fc3 Update Polish translation 2020-08-30 12:55:39 +02:00
Kukuh Syafaat
4cc921d1cf Update Indonesian translation 2020-08-30 10:04:04 +00:00
Boyuan Yang
c8e073b0e6 Update Chinese (China) translation 2020-08-29 13:30:16 +00:00
Jonas Dreßler
0b9a71ea3c wayland/surface: Don't update outputs recursively on mapped changes
There's no need to update the outputs recursively in case the actor gets
mapped or unmapped. That's because mapping happens recursively itself,
so if a window with multiple subsurfaces is shown, all subsurfaces will
receive a "notify::mapped" signal.

Since this was the only remaining user of
meta_wayland_surface_update_outputs_recursively(), we can now remove
that function.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1358
2020-08-29 12:40:11 +00:00
Jonas Dreßler
35f847ac6d wayland/surface: Don't update outputs on all geometry changes
Since we now listen to the "stage-views-on-changed" signal (which
"catches" all the changes we want) on MetaWaylandActorSurfaces for
updating the wl_outputs the surface is on, we no longer need to call
meta_wayland_surface_update_outputs_recursively() on all geometry
changes, so remove that signal handler.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1358
2020-08-29 12:40:11 +00:00
Jonas Dreßler
abdbc14ca8 wayland/actor-surface: Update outputs on stage-views changes
ClutterActors new "stage-views-changed" signal fits pretty well for the
updating of wl_outputs a MetaWaylandActorSurface is on: With that signal
we get notified if the surface moved to a different CRTC, of which every
output has at least one.

So start listening to that signal, which fixes a bug where the wl_output
of a surface changes, but its allocation remains the same (which means
no signals triggering an update of the outputs will be emitted) and no
enter/leave events for the new wl_outputs are sent to the client. This
can happen when a monitor is hotplugged but the new allocation is
exactly the same as the old one even though it's on a different monitor.

Since the "stage-views-on-changed" signal will also get emitted when a
parent actor of the surface is moved, this means we can now remove the
call to meta_wayland_surface_update_outputs_recursively() on window
position changes or the completion of window-effects.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1358
2020-08-29 12:40:11 +00:00
Yuri Chornoivan
f552ed1303 Update Ukrainian translation 2020-08-29 11:03:08 +00:00
Yuri Chornoivan
55c3c084de Update Ukrainian translation 2020-08-29 10:57:46 +00:00
Grey Christoforo
aaf70b28d1 screen-cast: Add vmwgfx to the DMA buffer deny list
VMWare has the same issues with mmap():ing DMA buffers cross process
boundaries so fall back to regular shared memory for 'vmwgfx' as well.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
2020-08-29 10:32:20 +00:00
Jonas Ådahl
986066ed40 screen-cast: Disable DMA buffer based screen casting for QXL
QXL doesn't support mmap():ing a DMA buffer allocated in mutter inside
the PipeWire stream consumer process. To make screen casting work again
on QXL, disable DMA buffer based screen casting for QXL.

Eventually, it should be the client that renegotiates the supported
buffer types, but until then we need this list.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
2020-08-29 10:32:20 +00:00
Jonas Ådahl
d73a858dc2 kms/device: Provide driver name and description
Retrieved from drmGetVersion(), to be used to identify what driver a DRM
device is driven by.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
2020-08-29 10:32:20 +00:00
Jonas Ådahl
d725acb267 screen-cast: Move DMA buffer allocation to MetaScreenCast
The aim with centralizing it is to be able to apply global policy to DMA
buffer allocations, e.g. disabling due to various hueristics.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
2020-08-29 10:32:19 +00:00
Jonas Ådahl
60c8d227ea backend: Add getter for MetaScreenCast
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
2020-08-29 10:32:19 +00:00
Olivier Fourdan
5171e35a97 xwayland: Add a setting to disable selected X extensions
The X server, including Xwayland, can be compiled with different X11
extensions enabled at build time.

When an X11 extension is built in the X server, it's usually also
enabled at run time. Users can chose to disable those extensions at run
time using the X server command line option "-extension".

However, in the case of Xwayland, it is spawned automatically by the
Wayland compositor, and the command line options are not configurable
by users.

Add a new setting to disable a selected set of X extension in Xwayland
at startup, without needing to rebuild Xwayland.

Of course, if Xwayland is not built with a given extension support in
the first place (which is the default for the security extension for
example), that option has no effect.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1405
2020-08-29 12:20:26 +02:00
Marco Trevisan (Treviño)
e44c42f254 seat-native: Process device added/removed events as ClutterEvents
Delay the addition and removal of devices using ClutterDeviceEvent's so that
they are processed following the libinput event order, and that we don't
have to flush the events on removal.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
2020-08-29 09:33:54 +00:00
Marco Trevisan (Treviño)
9db289b4ae seat-x11: Translate device enabled/disabled into clutter events
When a device is removed from the seat the events that this device may have
emitted just before being removed might still be in the stage events queue,
this may lead a to a crash because:

Once the device is removed, we dispose it and the staling event is
kept in queue and sent for processing at next loop.
During event processing we ask the backend to update the last device
with the disposed device
The device is disposed once the events referencing it, are free'd
The actual last device emission happens in an idle, but at this point
the device may have been free'd, and in any case will be still disposed
and so not providing useful informations.

To avoid this, once a device has been added/removed from the seat, we queue
ClutterDeviceEvent events to inform the stack that the device state has
changed, preserving the order with the other actual generated device events.
In this way it can't happen that we emit another event before that the
device has been added or after that it has been removed.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1345
2020-08-29 09:33:54 +00:00
Marco Trevisan (Treviño)
cf67c54f87 clutter-seat: Handle device events and emit signals
Clutter device events are special events coming from the backend when an
input device is added or removed.

When such events are processed, we should make the seat to handle them by
calling vfunc that can be implemented by each backend and eventually
emitting the appropriate signal.

If a device is removed, we can also safely dispose it, as it can be
considered stale at this point.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
2020-08-29 09:33:54 +00:00
Marco Trevisan (Treviño)
928b32b1a1 clutter-event: Add device added/removed events
Add clutter device added and removed events to allow processing of them as
it happens in the backends, queuing them and performing actions in order.

This allows not to loose any event that is performed just before removing or
disabling a device, and still process the events in order in the event
queue.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
2020-08-29 09:33:54 +00:00
Marco Trevisan (Treviño)
5730b998fd backend: Use connect-after to perform actions on device removed
When a device is removed we perform some actions such as stopping the
"::last-device-changed" signal emission and unsetting the current device.
And we want to be sure that these actions happen after all the
device-removed operations are sorted out.

Related to: https://gitlab.gnome.org/GNOME/mutter/-/issues/1345
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
2020-08-29 09:33:54 +00:00
Marco Trevisan (Treviño)
0756826753 backend: Don't emit last-device updates with no device
When removing a device that has been just marked as the last in use, we may
try to notify that a NULL device is the last one.

This is not supported, as both update_last_device() and the clients of the
"::last-device-changed" signal are assuming that the last device is always
a valid ClutterInputDevice.

So let's avoid erroring, and stop the idle when clearing the current device.

Related to: https://gitlab.gnome.org/GNOME/mutter/-/issues/1345
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
2020-08-29 09:33:54 +00:00
Björn Daase
285f2a2124 cogl: Fix spelling of CoglPipelineStateComparator
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1410
2020-08-29 09:10:31 +00:00
Björn Daase
5ec9bde64f *: Fix spelling mistakes found by codespell
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1410
2020-08-29 09:10:31 +00:00
Benjamin Berg
5962ee7939 startup: Fix possible crash in startup notifications
A GAppInfo is not guaranteed to have a filename or an application (or
rather a desktop ID). Add a check for application_id to be non-NULL
before trying to call sn_launcher_set_application_id, which would crash
otherwise.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1392
2020-08-29 08:49:37 +00:00
Gwan-gyeong Mun
a4f1c5f330 Update Korean translation 2020-08-29 03:37:04 +00:00
Georges Basile Stavracas Neto
2b67030dbb streams: Don't bail out when cursor is outside the stream
PipeWire reuses buffers, and buffer metadatas, when streaming. When
the cursor is moved to outside the stream, the cursor meta also needs
to be updated, otherwise it'll use the cursor position of whatever is
in the buffer.

Don't bail out when cursor is outside the stream, and ensure to record
a metadata-only frame. This only applies to metadata streams.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1417
2020-08-28 16:34:56 +00:00
Georges Basile Stavracas Neto
7700dc904b screen-cast-stream-src: Properly unset cursor metadata
As per PipeWire docs, 0 means "invalid cursor", however the function to
unset the cursor was setting it to 1, which means "this is totally set
and valid cursor". This is likely bad copy-paste from the function
immediately below introduced by 9be189daa7.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1341

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1417
2020-08-28 16:34:56 +00:00
Carlos Garnacho
f69bb2097d backends/native: Use proper string format for uint64_t
This may stir some pain in 32bit arches.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1395
2020-08-28 13:40:15 +00:00
Asier Sarasua Garmendia
673e08e458 Update Basque translation 2020-08-28 10:57:34 +00:00