Compare commits

...

116 Commits

Author SHA1 Message Date
Florian Müllner
f80e5dd8e4 Bump version to 3.35.92
Update NEWS.
2020-03-01 02:25:34 +01:00
Matej Urbančič
f484efaac1 Updated Slovenian translation 2020-02-29 22:48:56 +01:00
Jonas Ådahl
f97804f4f4 wayland/xdg-shell: Add support for explicit popup repositioning
This commit completes the implementation of `xdg_wm_base` version 3,
which introduces support for synchronized implicit and explicit popup
repositioning.

Explicit repositioning works by the client providing a new
`xdg_positioner` object via a new request `xdg_popup.reposition`. If the
repositioning is done in combination with the parent itself being
reconfigured, the to be committed state of the parent is provided by the
client via the `xdg_positioner` object, using
`xdg_positioner.set__parent_configure`.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
5c37f5104e wayland/xdg-shell: Add support implicit popup moving
This sets the `is_reactive` flag on the window placement rules, causing
the popups to be reconfigured as they are affected by environmental
changes, such as the parent moving in a way making the popup partially
offscreen.

As with synchronization, the implementation is dormant, as the
version of the advertised global isn't bumped yet, as the new protocol
version is not yet fully implemented.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
d08a8de265 window: Implement asynchronous popup moving
This commits adds support on the MetaWindow and constraints engine side
for asynchronously repositioning a window with a placement rule, either
due to environmental changes (e.g. parent moved) or explicitly done so
via `meta_window_update_placement_rule()`.

This is so far unused, as placement rules where this functionality is
triggered are not yet constructed by the xdg-shell implementation, and
no users of `meta_window_update_placement_rule()` exists yet.

To summarize, it works by making it possible to produce placement rules
with the parent rectangle a window should be placed against, while
creating a pending configuration that is not applied until acknowledged
by the client using the xdg-shell configure/ack_configure mechanisms.

An "temporary" constrain result is added to deal with situations
where the client window *must* move immediately even though it has not yet
acknowledged a new configuration that was sent. This happens for example
when the parent window is moved, causing the popup window to change its
relative position e.g. because it ended up partially off-screen. In this
situation, the temporary position corresponds to the result of the
movement of the parent, while the pending (asynchronously configured)
position is the relative one given the new constraining result.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
6c82feb1b8 wayland/window-configuration: Track resize flags and gravity too
Will later be used to determine in what way a pending configuration will
resize.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
0dac91cffc Add MetaGravity and replace X11 equivalent with it
MetaGravity is an enum, where the values match the X11 macros used for
gravity, with the exception that `ForgetGravity` was renamed
`META_GRAVITY_NONE` to have less of a obscure name.

The motivation for this is to rely less on libX11 data types and macros
in generic code.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
ff381d1d52 constraints: Pass constrained relative coordinates to window impl
A placement rule placed window positions itself relative to its parent,
thus converting between relative coordinates to absolute coordinates,
then back to relative coordinates implies unwanted restrictions for
example when the absolute coordinate should not be calculated againts
the current parent window position.

Deal with this by keeping track of the relative position all the way
from the constraining engine to the move-resize window implementation.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
05e9d6ab9e window: Put placement related fields in a anynomous struct
To organize things a bit better, put the fields related to the placement
rule state in its own anonymous struct inside MetaWindow. While at it,
rename the somewhat oddly named variable that in practice means the
current relative window position.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
d22f947bf5 wayland/window: Pass popup configuration using relative coordinates
After popup placement rules have gone through the constraints engine has
ended up resulting in an actual move, pass the window configuration down
the path using relative coordinates, as that is what the next layer
(xdg-shell implementation) actually cares about.

In the future, this will also be helpful when the configured position is
not against the current state of the parent.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
9b97e5ed58 place: Make placement rule processing provide relative coordinates
A placement rule is always about placing a window relative to its
parent. In order to eventually place it against predicted future parent
positions, make the placement rule processing output relative
coordinates, having the caller deal with turning them into absolute.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Jonas Ådahl
7f9fac2ba2 window/wayland: Don't inhibit finishing moves if any window is resized
meta_window_wayland_finish_move_resize() inhibited window moves to be
finished if there was a resize grab active at the time, in order to
handle window resizing. Change this to only affect the grabbed window
itself, so that e.g. a popup can be positioned according to a pending
configuration while there is an active resize grab.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
2020-02-29 21:01:50 +00:00
Carlos Garnacho
64eaf70279 xwayland: Allow setting up maintenance processes
This is made a signal, so the upper layers (read: gnome-shell) may
decide what services to spawn. The signal argument contains a task
that will resume MetaX11Display startup after it is returned upon.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/945
2020-02-29 20:41:26 +00:00
Carlos Garnacho
e3149e6021 wayland: Pass private X connection on GNOME_SETUP_DISPLAY
This envvar will be picked up by the services spawned together with Xwayland
startup, and used instead of the regular DISPLAY meant for regular clients.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/945
2020-02-29 20:41:26 +00:00
Carlos Garnacho
166a464515 wayland: Set up initialization X11 socket
This is used by GDK and the X11 bits, but may also be used for
other initialization services we might need to run along with
Xwayland initialization.

However, as the -initfd argument in Xwayland is a fairly new
feature, add some meson build-time checks so that the feature
is handled transparently while allowing to explicitly set/unset
it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/945
2020-02-29 20:41:26 +00:00
Carlos Garnacho
38e58b837b core: Use DISPLAY envvar to forward in the launch context
The meta_x11_get_display_name() will return our private connection, which
is not what we want to transfer to clients being launched.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/945
2020-02-29 20:41:26 +00:00
Robert Mader
39a8c047d1 background-actor: Do not copy empty clip/unobscured regions
Clip and unobscured regions stricly shrink during culling. If they
are already empty, simply reference the empty region to reduce allocations.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1082
2020-02-29 19:44:01 +00:00
Robert Mader
c979cd95aa surface-actor: Do not copy empty clip/unobscured regions
Clip and unobscured regions stricly shrink during culling. If they
are already empty, simply reference the empty region to reduce allocations.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1082
2020-02-29 19:44:01 +00:00
Robert Mader
6831f2edb4 window-actor/x11: Disable culling on window actor level
This shape region culling was wrongly implemented in f5a28aa9, as it
does not take frame offsets into account, and is also redundant, as
we already set the opaque region of the underlying surface accordingly.

The other parts were implemented in ac7aa114, the reason given in
the commit message:
```
Wayland clients do this through the opaque region in the surface
actor. However X11 clients were considered fully transparent for
culling purposes, which may result in mutter painting other bits
of the background or other windows that will be painted over in
reality.
```

is wrong though - culling on X11 actors works just fine and did only
not work in Wayland sessions because of a bug that got fixed in
19814497.

In conclusion the whole part appears to be redundand and some testing
done suggests the same. Drop it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1082
2020-02-29 19:44:01 +00:00
Robert Mader
372d73e275 surface-actor: Cull out surfaces without alpha channel
If a opaque region is explicitly set we should not consider the surface
opaque, as that implies e.g. a shape region is set.

If no opque region is set but the texture does not have an alpha channel,
we can savely cull it out.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1082
2020-02-29 19:44:01 +00:00
Robert Mader
0ada90024f wayland/actor-surface: Check for MetaXwaylandSurface instead of window type
The previous check would not ignore subsurfaces. Use the chance to directly
check for the surface role instead - it's much cleaner.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1082
2020-02-29 19:44:01 +00:00
Jonas Dreßler
46e38ff61a cogl/clip-stack: Set color and depth mask when drawing rectangle clips
Just like with the other functions drawing to the stencil buffer, we
should make sure the depth and color masks are set to FALSE during
drawing.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
2020-02-29 19:29:31 +00:00
Jonas Dreßler
1e0b015ce8 cogl/clip-stack: Explicitely initialize the stencil mask
We need the stencil buffer to consist of binary values of 0 and 1
because we're doing additions and subtractions on the buffer, so even
though this is the default, explicitely set the stencil mask to 0x1.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
2020-02-29 19:29:31 +00:00
Jonas Dreßler
72054332c5 cogl/clip-stack: Restore old matrices after drawing to stencil buffer
When using a region clip and something has a rectangle clip pushed, a
special drawing method for ClutterTexts (emit_vertex_buffer_geometry()
in cogl-pango-display-list.c) starts to fail and clipping issues with
long texts (because emit_vertex_buffer_geometry() is only used for texts
longer than 25 characters) start to appear. This specifically happened
in Looking Glass, where the StViewport of the ScrollView sets a
rectangle clips and the texts are usually longer than 25 characters.

This is caused by the changing of the perspective and modelview matrix
when drawing to the stencil buffer and started happening when
region-clipping was introduced with commit 8598b654. Even though the
changing of the matrices was done before that, too, the issue probably
didn't happen because `rect->can_be_scissor` was TRUE and no stencil
buffer clipping was used at all.

To fix this, temporarily save the old matrices, then set the new ones
and restore the old ones when we're done drawing to the stencil buffer.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2246

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
2020-02-29 19:29:31 +00:00
Jonas Dreßler
d30ef0dd3b cogl/clip-stack: Use "merge" parameter for rectangle clips
Just like for the other sorts of clips, use a "merge" parameter instead
of a "first" parameter.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
2020-02-29 19:29:31 +00:00
sicklylife
84275688f3 Update Japanese translation 2020-02-29 16:06:38 +00:00
sicklylife
90a1eb4275 Update Japanese translation 2020-02-29 15:54:35 +00:00
Daniel van Vugt
73e3207a85 clutter-actor: Add detail to captured-event
So that subscribers can choose the class of events they're interested in
and not be woken by everything else.

Needed by: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/925

Related to: https://gitlab.gnome.org/GNOME/mutter/issues/283

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1000
2020-02-29 13:34:00 +00:00
worldofpeace
8a6673bb55 build: ensure absolute path to sysprof dbus interface dir
We want sysprof's exact datadir for compatability with
platforms where software is installed into their own
individual immutable prefix's. Such that, mutter's prefix will
never equate to sysprof's. This depends on a MR in sysprof [0]
which adds datadir to its pkgconfig files, as these files will always
have the proper path we want.

This adds version a constraint on sysprof_dep, as datadir was added to
the .pc in this version.

[0]: https://gitlab.gnome.org/GNOME/sysprof/merge_requests/19

https://gitlab.gnome.org/GNOME/mutter/merge_requests/957
2020-02-29 13:17:40 +01:00
Piotr Drąg
35c16a9f4b Update Polish translation 2020-02-29 13:17:07 +01:00
Jonas Ådahl
390fd7ddcf cursor-renderer-native: Fix hw cursor for non-square sprites
wl_shm_buffer_get_width() was used where wl_shm_buffer_get_height()
should have used, resulting in only square cursors working. Make
rectangular cursors work again.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1099
2020-02-28 21:49:58 +00:00
Carlos Garnacho
4b513a31ae compositor: Shuffle x11 compositing bits in MetaCompositor
Given that on Wayland we are pretty much guaranteed to finish MetaX11Display
setup after the MetaCompositor is enabled, we may drop the
meta_compositor_manage() x11 initialization bits, and move them into the
MetaX11Compositor subclass where it's actually needed.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Carlos Garnacho
25c9e66c73 xwayland: Do not block on Xwayland initialization
We artificially made Xwayland initialization synchronous, as we used
to rely on MetaX11Display and other bits during meta_display_open().
With support for Xwayland on demand and --no-x11, this is certainly
not the case.

So drop the main loop surrounding Xwayland initialization, and turn
it into an async operation called from meta_display_init_x11(). This
function is turned then into the high-level entry point that will
get you from no X server to having a MetaX11Display.

The role of meta_init() in Xwayland initialization is thus reduced
to setting up the sockets. Notably no processes are spawned from here,
deferring that till there is a MetaDisplay to poke.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Carlos Garnacho
649911b6b3 core: Make meta_display_init_x11() an async function
This ATM completes the task right away, but we will want to do
further things here that are asynchronous in nature, so prepare
for this operation being async.

Since the X11 backend doesn't really need this, make it go on
the fast lane and open the MetaX11Display right away, the case
of mandatory Xwayland on a wayland session is now handled
separately.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Carlos Garnacho
8c332a4704 tests: Set fatal log handler on clutter tests
With Xwayland initialization going async, these errors will seep
into the parts controlled by g_test*(), resulting in the harmless
errors about DBus names not acquired turned fatal.

Set an error log handler, and specifically ignore those.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Carlos Garnacho
21994bb00d tests: Ensure MetaX11Display is initialized before running tests
It might not be available right on initialization time if X11 is started
asynchronously. As this is a requirement for our tests, ensure it is there
before proceeding with the test.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Carlos Garnacho
87a06c63ad x11: Set up the compositing manager selection on meta_display_init_x11()
This used to be set on meta_compositor_manage(), but only if there is a
MetaX11Display. Given meta_display_init_x11() is Wayland only, and we can
always assume compositing to be enabled, just have it invariably set after
the X server is up.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00
Georges Basile Stavracas Neto
09026e5f0e monitor-stream-src: Use cogl_framebuffer_finish()
Even though cogl_framebuffer_flush() was supposed to be enough,
it ends up creating streams with odd visual glitches that look
very much like unfinished frames.

Switch back to cogl_framebuffer_finish(), which is admittedly
an overkill, but it's what works for now. There is anedoctal
evidence showing it doesn't incur in worse performance.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:52:19 -03:00
Georges Basile Stavracas Neto
1f190a7cfe screen-cast-stream-src: Remove unused parameter
The 'data' parameter is not used in maybe_record_cursor(), so remove
it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:52:19 -03:00
Georges Basile Stavracas Neto
86168b945c window-stream-source: Draw into DMA buffer image
Much like monitor streaming, implement window streaming by
making the window actor draw itself with a paint context
that used the passed framebuffer.

Now that all MetaScreenCastStreamSrc subclasses implement
blit_to_framebuffer, remove the conditional check from
meta_screen_cast_stream_src_blit_to_framebuffer().

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:52:19 -03:00
Georges Basile Stavracas Neto
680a54aff6 monitor-stream-src: Implement blitting view framebuffers
Add the vfunc override that actually consume the new Cogl API. Every
view that fits into the logical monitor is rendered.

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

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:52:03 -03:00
Georges Basile Stavracas Neto
548073ec27 screen-cast-stream-src: Support DMA buffer sharing
Implement PipeWire's add_buffer and remove buffer, try and export
a DMA buffer first and, on failure, fallback to memfd.

When DMA buffers are successfully created and shared, blit the
framebuffer contents when drawing instead of downloading the pixels.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:29:03 -03:00
Georges Basile Stavracas Neto
d366fb335d renderer-native: Implement DMA buffer creation
Create a new gbm_bo using the same given geometry, and export the new
bo's DMA buffer fd. The new bo lives as long as necessary to be used,
and reused, by PipeWire.

Unfortunately, PipeWire doesn't support modifiers properly, so use the
linear format for now. For now, a hardcoded format of DRM_FORMAT_XRGB8888
is set, so we don't need to negotiate the format with PipeWire early.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:29:02 -03:00
Georges Basile Stavracas Neto
7fbb47b2bb renderer-native: Move DMA buffer creation to an auxiliary function
This will be reused by the DMA buffer exporting function.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 15:28:22 -03:00
Georges Basile Stavracas Neto
3881c1f952 cogl/context: Add cogl_renderer_create_dma_buf() and family
This is a winsys-specific API that allows exporting a DMA buffer fd.
The CoglDmaBufHandle structure allows passing the ownership of the
DMA buffer to whoever is using it, so the winsys doesn't need to
manually track it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 14:54:48 -03:00
Georges Basile Stavracas Neto
038a3170bf cogl/framebuffer: Add cogl_framebuffer_flush
In future patches, we'll create additional CoglFramebuffers that
will be shared via DMA-Buf with PipeWire. When recording frames,
we'll blit the current onscreen framebuffer into the shared one.

However, that presents a problem: cogl_framebuffer_blit() mimics
glBlitFramebuffer() semantics, and doesn't do an implicit flush
of the GPU command stream. As a consequence, clients may receive
unblitted or incomplete framebuffers.

We could use cogl_framebuffer_finish() to ensure the commands were
submitted to the GPU, but it is too harsh -- it blocks the CPU
completely until the commands are finished!

Add cogl_framebuffer_flush(), which ensures the command stream is
submitted to the GPU without blocking the CPU. Even though we don't
use the framebuffer specifically, it may be useful in the future
for e.g. a potential Vulkan backend to have access to the framebuffer.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1086
2020-02-28 10:52:34 -03:00
Alan Mortensen
f27de9620a Updated Danish translation 2020-02-28 14:01:26 +01:00
Robert Mader
969ad54feb cursor-renderer/native: Remove unnecessary endian check
Both cases have the same content.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/526
2020-02-28 10:22:11 +00:00
Robert Mader
987ce5bec0 cursor-renderer/native: Implement scaled/transformed hardware cursors
If the cursor sprite does not match the scale factor or transformation
of the monintor, we currently fall back to a software cursor, causing
redraws of the shell. This commit implements scaling and transforming
of the cursor sprite, so we can use it with hardware planes, too.

This commit does the following steps:

1. Make sure we reupload the cursor image if the cursor is over
a logical monitor not matching the scale or transform from the previous
update.
2. Before upload to the hardware plane, scale and transform the cursor
image if possible and necessary.
3. Make sure we always use the hardware cursor if possible (only fall
back to software/OGL cursor if it is visible on multiple logical monitors
with differet scales/transforms).
4. Transform or scale the cursor coordinates if necessary.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/526
2020-02-28 10:22:11 +00:00
Robert Mader
d600cd9aee monitor-transform: Add generic function to get relative transform
It takes transforms A and B and returns the transform to get from
A to B.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/526
2020-02-28 10:22:11 +00:00
Robert Mader
1fc7935858 backends/cursor: Add API to set and get the texture buffer transform
In Wayland clients can commit transformed surfaces, so the compositor
can directly use them on hardware planes. We already support that
for other surfaces, this is the first step to also support it on
cursor sprites.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/526
2020-02-28 10:22:11 +00:00
Kukuh Syafaat
b5354fb3cd Update Indonesian translation 2020-02-28 02:13:12 +00:00
Jonas Ådahl
01aaced129 crtc: Don't leak MetaCrtcConfig
We never freed it except when CRTC disabled during runtime.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1095
2020-02-27 20:35:07 +00:00
Jonas Ådahl
ff59b5d041 monitor: Move logical <-> CRTC transform helpers to MetaOutput
So that we avoid leaking the internal guts of MetaOutput into
MetaMonitor, while also making it possible to use it without a
MetaMonitor at hand.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1064
2020-02-27 09:47:22 +01:00
Jonas Ådahl
92f0eb9d14 monitor: Use transform helper when dealing with panel orientation
Replace the open coded monitor transform math with the new helper.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1064
2020-02-27 09:47:08 +01:00
Jonas Ådahl
e6913d1471 monitor-transform: Add meta_monitor_transform_transform() helper
Intended to replace various manual monitor transform enum math here and
there. Tests added as well, to test some hand picked transforms.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1064
2020-02-27 09:07:25 +01:00
Fran Dieguez
d495dc6c63 Update Galician translation 2020-02-26 20:57:31 +00:00
Carlos Garnacho
88bb24f66e backends/native: Shuffle udev client initialization in MetaSeatNative
This may be used indirectly before creation as we dispatch libinput events
right after creation (to let input devices be known), so those device
additions would trigger the touch-mode checks.

Creating it in advance results in checks being correctly performed, although
redundantly.

Spotted by Bastien Nocera.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1067
2020-02-26 18:32:05 +00:00
Arun Raghavan
6e7316ef11 build: Use dbus interface dir from pkg-config
Using 'datadir' breaks prefixed builds (as we look for interface files
in the prefix we are going to install to).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1094
2020-02-26 15:37:00 +00:00
Jonas Ådahl
9fa56176fd monitor-manager-xrandr: Don't try to disable disabled CRTC
When applying a configuration to XRANDR, we first disable CRTCs that
happen to extend outside of the to-be X11 screen size. While doing so,
we fail to actually check whether the CRTC is active or not, meaning
we'll try to query the content of the CRTC configuration even though it
has none, leading to a NULL pointer dereference.

Fix this by simply ignoring non-configured CRTCs.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1093
2020-02-26 16:14:04 +01:00
Marek Černocký
fb81199dec Updated Czech translation 2020-02-26 14:13:21 +01:00
Christian Hergert
b7f47ea17f clutter: add tracing for frameclock cycle
This adds a new frameclock tracing mark for a single cycle of the frame
clock. Doing so allows Sysprof to potentially do more with the information
that happens during the frameclock. For example, we can now find
allocations that happen while the frame clock is advancing.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1088
2020-02-26 12:33:00 +00:00
Sebastian Keller
71101cab82 clutter/cogl/stage: Remove duplicate region union
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1089
2020-02-26 07:26:10 +00:00
Sebastian Keller
c4b28b0939 clutter/cogl/stage: Don't leak FB damage region on redraw
offset_scale_and_clamp_region() creates a new region resulting in
view_damage which at this point is the only thing left pointing to what
originally was fb_damage getting overwritten and being leaked.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1089
2020-02-26 07:26:10 +00:00
Florian Müllner
38954de11c ci: Adjust URL check
While the old merge request URLs still work, gitlab recently started
including an additional /- for merge requests.

Adjust the regex to account for that, so that simply copying the URL
from gitlab works again.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1090
2020-02-26 06:28:46 +00:00
Gwan-gyeong Mun
964ea60090 Update Korean translation 2020-02-26 03:00:37 +00:00
Jonas Ådahl
159c83b914 clutter: Move redraw clip management to views
The stage window handled the redraw clip in a global manner; this would
interfere if we want to paint views individually as it'd mean
intersecting views (i.e. mirrored monitors) would loose the redraw clip
once the first view was painted. It also is awkward to have a global
state for something that is built up before redrawing, and only really
valid during paint, due to buffer damage history.

This commits removes all redraw clip management from the stage window,
moving it all into the stage views. When a redraw clip is added to the
stage, every affected view will get the same redraw clip added to it,
and eventually when painted, the stage window (ClutterStageCogl) will
retrieve the redraw clip for each view as it repaints them.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 19:18:54 +01:00
Jonas Ådahl
b68c630329 clutter/cogl/stage: Use g_clear_pointer() to clean up regions
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 19:18:54 +01:00
Jonas Ådahl
fe1ccea1e1 clutter: Pass redraw clip via paint context
Instead of users fetching it via `clutter_stage_get_redraw_clip()`, pass
it via the paint context. This is helpful as it is only valid during a
paint, making it more obvious that it needs to be handled differently
when there is no redraw clip (i.e. we're painting off-screen).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 19:18:54 +01:00
Jonas Ådahl
c483b52d24 clutter/stage: Pass redraw clip instead of extents when painting view
That's the struct we have ready, the callee can just call
cairo_region_get_extents() if it only cares about the extents rectangle.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 19:18:54 +01:00
Jonas Ådahl
f3dcba27f5 clutter/cogl/stage: Simplify region transform code
Add a helper that scales and clamps a region, aimed to be used when
transforming between framebuffer coordinate space and view coordinate
spaces.

This helps readability by moving out the verbose for loops that deals
with the individual rects of a region to the helper, making the logic
where it's used much simpler.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 19:18:54 +01:00
Jonas Ådahl
86ccc28413 clutter/cogl/stage: Rename have_clip to is_full_redraw
The 'have_clip' variable has repeatedly confused me to meaning that
there is a clip. What it actually means is that the effective clip
covers the whole view; the 'redraw_clip == NULL' meaning full redraw is
an important implementation detail for the context, and makes the
intention of the variable unclear; especially since we will after a
couple of blocks will *always* have a clip, just that it covers the
whole view.

Rename the variable to 'is_full_redraw' and negate the meaning, aiming
to make things a lot more clear.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
0d039c3ba3 clutter/view: Don't take paint rect after paint
It was unused, and will be become unused by the primary paint function
as well, so go ahead and remove it here first.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
adcbc2aa5f clutter/cogl/stage: Use fb size for for fallback fb clip region
When calculating the fallback framebuffer clip region, which should be
the region in framebuffer coordinates, we didn't scale the view layout
with the view framebuffer scale, meaning for any other scale than 1,
we'd draw a too small region of the view. Fix this by just using the
size of the framebuffer directly, avoiding any scale dependent
calculation all together.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
860906246e clutter/cogl/stage: Simplify swap_event boolean logic
We'll expect a swap event if any of the view paints resulted in a swap;
make the logic dealing with this clearer by making changing the less
vilible '|| swap_event' postfix with a up front '|=' operator.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
37d7df612b clutter/stage/cogl: Name variable to make coordinate space obvious
The ambiguous "clip" was renamed to "fb_clip_region", as it was called
at the call site. This should make it more clear that the clip is in
buffer coordinate space.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
0baf4578c8 clutter/stage/cogl: Remove some leftover whitespace
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
2d6665950c crtc: Move logical monitor pointer to MetaMonitor
Since the last code fetching the logical monitor state directly from the
CRTC has been removed, we can move the logical monitor pointer to a more
natural place.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
1c98f01a65 renderer-native: Draw stage separately per CRTC
Prior to this commit the stage was drawn separately for each logical
monitor. This allowed to draw different parts of the stage with
different transformations, e.g. with a different viewport to implement
HiDPI support.

Go even further and have one view per CRTC. This causes the stage to
e.g. draw two mirrored monitors twice, instead of using the same
framebuffer on both. This enables us to do two things: one is to support
tiled monitors and monitor mirroring using the EGLStreams backend; the
other is that it'll enable us to tie rendering directly to the CRTC it
will render for. It is also a requirement for rendering being affected
by CRTC state, such as gamma.

It'll be possible to still inhibit re-drawing of the same content
twice, but it should be implemented differently, so that it will still
be possible to implement features requiring the CRTC split.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
e3f30371aa renderer-native: Fix a couple of style misses
Removed stray newline, and fixed an incorrect indentation.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
1a14c4d3c9 renderer-x11-nested: Remove stray newline
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
292d2754ae clutter/stage: Remove stray newline
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
fe42d56db3 crtc: Move configured state to separate struct
To make it more reliable to distinguish between values that are read
from the backend implementation (which is likely to be irrelevant for
anything but the backend implementation), split out those values (e.g.
layout).

This changes the meaning of what was MetaCrtc::rect, to a
MetaCrtcConfig::layout which is the layout the CRTC has in the global
coordinate space.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
a11f9bd513 boxes: Add 'round' rounding strategy
It just calls roundf(), and is intended to be used when the graphene
rectangle is approximately integer aligned.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
7f6cafa847 logical-monitor: Pass monitor in the for each CRTC helper callback
Will be used in later commits.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Jonas Ådahl
1b67f49f7f monitor: Move logical to CRTC transform helper to MetaOutput
So that it can be used on a per output basis in the future.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
2020-02-25 18:39:51 +01:00
Balázs Úr
c447d76cd4 Update Hungarian translation 2020-02-25 06:32:01 +00:00
Christian Hergert
d327cedb83 clutter: avoid redundant _clutter_paint_node_init_types()
This only needs to be initialized once but is in the hot path of creating
new paint nodes (for which we create many). Instead, do this as part of
the clutter_init() workflow to keep it out of the hot path.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1087
2020-02-25 01:14:09 +00:00
Christian Hergert
0c55e87d8f cogl: reduce temporary allocations calculating redraw regions
When calculating regions, a lot of temporary allocations are created. For
the array of rects (which is often a short number of them) we can use
stack allocations up to 1 page (256 cairo_rectangle_int_t). For building
a region of rectangles, cairo and pixman are much faster if you have all
of the rectangles up front or else it mallocs quite a bit of temporary
memory.

If we re-use the cairo_rectangle_int_t array we've already allocated (and
preferably on the stack), we can delay the creation of regions until after
the tight loop.

Additionally, it requires fewer allocations to union two cairo_region_t
than to incrementally union the rectangles into the region.

Before (percentages are of total number of allocations)

     TOTAL    FUNCTION
[ 100.00%]    [Everything]
[ 100.00%]      [gnome-shell --wayland --display-server]
[  99.67%]        _start
[  99.67%]          __libc_start_main
[  99.67%]            main
[  98.60%]              meta_run
[  96.90%]                g_main_loop_run
[  96.90%]                  g_main_context_iterate.isra.0
[  96.90%]                    g_main_context_dispatch
[  90.27%]                      clutter_clock_dispatch
[  86.54%]                        _clutter_stage_do_update
[  85.00%]                          clutter_stage_cogl_redraw
[  84.98%]                            clutter_stage_cogl_redraw_view
[  81.09%]                              cairo_region_union_rectangle

After (overhead has much dropped)

     TOTAL    FUNCTION
[ 100.00%]    [Everything]
[  99.80%]      [gnome-shell --wayland --display-server]
[  99.48%]        _start
[  99.48%]          __libc_start_main
[  99.48%]            main
[  92.37%]              meta_run
[  81.49%]                g_main_loop_run
[  81.49%]                  g_main_context_iterate.isra.0
[  81.43%]                    g_main_context_dispatch
[  39.40%]                      clutter_clock_dispatch
[  26.93%]                        _clutter_stage_do_update
[  25.80%]                          clutter_stage_cogl_redraw
[  25.60%]                            clutter_stage_cogl_redraw_view

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1071
2020-02-24 22:44:35 +00:00
Christian Hergert
81d11ac0a8 clutter: avoid g_signal_emit_by_name() from ClutterActor
g_signal_emit_by_name() is used to emit signals on ClutterContainer when
actors are removed or added. It happens to do various interface lookups
which are a bit unneccessary and can allocate memory.

Simply using emission wrappers makes all of that go away.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1083
2020-02-24 22:36:27 +00:00
Asier Sarasua Garmendia
84261d1db3 Update Basque translation 2020-02-24 16:41:35 +00:00
Daniel Mustieles
a0441ad666 Updated Spanish translation 2020-02-24 16:48:17 +01:00
Emin Tufan Çetin
67152916e1 Update Turkish translation 2020-02-24 15:06:58 +00:00
Jonas Dreßler
b98ebe60b2 clutter/x11: Stop tracking stage changes on crossing events
On x11 we emulate pointer events from touch events as long as there's
only one touchpoint on screen, this obviously leads to x11 sending us
crossing events triggered by the emulated pointer. Now if we get a leave
event and set the stage of the ClutterInputDevice to NULL, new touch
events will be discarded by clutters backend because the core pointer
doesn't have a stage associated. This means Mutter completely loses
state of a touchpoint as soon as it crosses a shell actor.

An easy reproducer for this issue is to start the four-finger-workspace
gesture above a window and to move the pointer emulating touch outside
of the window, this will freeze the gesture as the gesture no longer
receives touch events.

To fix this, stop tracking stage changes on crossing events and simply
leave the ClutterInputDevice stage as-is. In our case there is only one
stage anyway and that won't change in the future.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/423
2020-02-24 10:54:56 +00:00
Jonas Dreßler
ad8ba69423 wayland/pointer: Use g_signal_connect_swapped for one signal
Remove the rather useless callback function that's currently used for
handling the "visibility-changed" signal and instead connect to the
signal using `g_signal_connect_swapped()`.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1077
2020-02-24 09:52:06 +00:00
Jonas Dreßler
bf24b816c2 wayland/pointer: Add support for the new ClutterSeat inhibit-unfocus API
The last commit added a new API to ClutterSeat to inhibit setting the
focus-surface of the MetaWaylandPointer to NULL, let's do that.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1077
2020-02-24 09:52:06 +00:00
Jonas Dreßler
a9b1134dfb clutter/seat: Add API to inhibit unfocus of the cursor surface/actor
Add API to ClutterSeat that allows inhibiting the unsetting of the
pointer focus surface. This can be useful for drawing custom cursor
textures like the magnifier of gnome-shell does.

In the future this API should also control unsetting of Clutters
focus-actor, not just the focus surface, that's not really needed right
now since we never unset the focus-actor anyway.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1077
2020-02-24 09:52:06 +00:00
Rafael Fontenelle
6fb6a23389 Update Brazilian Portuguese translation 2020-02-24 09:40:26 +00:00
Jonas Ådahl
2da27720ca display: Make check-alive timeout configureable
The check-alive feature is there for the user to be able to terminate
frozen applications more easily. However, sometimes applications are
implemented in a way where they fail to be reply to ping requests in a
timely manner, resulting in that, to the compositor, they are
indistinguishable from clients that have frozen indefinitely.

When using an application that has these issues, the GUI showed in
response to the failure to respond to ping requests can become annoying,
as it disrupts the visual presentation of the application.

To allow users to work-around these issues, add a setting allowing them
to configure the timeout waited until an application is considered
frozen, or disabling the check completely.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1080
2020-02-23 17:28:57 +00:00
Olivier Fourdan
f9326cfa3d wayland/data-device: Fix crash with offer from X11 client
If a data offer comes from an X11 client, the Wayland resource would be
NULL, causing a crash in `data_offer_choose_action()` trying to get the
resource version.

So instead of doing the version check in `data_offer_choose_action()`,
do it early when creating the data source.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1057
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1073
2020-02-23 16:36:16 +00:00
Olivier Fourdan
963108a9a6 wayland/data-device: Check resource version on cancel
For clarity, check the resource version needs the "cancelled" message in
the actual vmethod rather than from the caller function.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1073
2020-02-23 16:36:15 +00:00
Olivier Fourdan
b8355a6686 xwayland: Not all xwayland surface have a window
`meta_xwayland_surface_get_relative_coordinates()` may cause a crash if
the Xwayland surface has no window associated.

That can be observed when using drag and drop from an X11 window to a
Wayland native window:

```
    at src/core/window.c:4503
    at src/wayland/meta-xwayland-surface.c:200
    at src/wayland/meta-wayland-surface.c:1517
    at src/wayland/meta-wayland-pointer.c:1048
    at src/wayland/meta-wayland-pointer.c:840
    at src/wayland/meta-wayland-pointer.c:865
    at src/wayland/meta-wayland-pointer.c:954
    at src/wayland/meta-wayland-pointer.c:456
    at src/wayland/meta-wayland-pointer.c:993
    at src/wayland/meta-wayland-data-device.c:1004
    at src/wayland/meta-wayland-data-device.c:1278
    at src/wayland/meta-xwayland-dnd.c:326
```

Check if the xwayland surface has an associated MetaWindow prior to get
its buffer rect.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1073
2020-02-23 16:36:15 +00:00
Christian Hergert
4c421959dc clutter: fix hole in ClutterPaintNode
Fixing the missalignment takes the structure from 80 bytes down to 72.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1081
2020-02-21 22:36:31 +00:00
Sebastian Keller
aedcfcd010 sound-player: Fix invalid write after playback is cancelled early
The cancellable of a request might already be cancelled by the time
the cancelled_cb is connected resulting in finish_cb being called via
ca_context_cancel before g_cancellable_connect returns. In this case
the request that is written to has already been freed.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/1060
2020-02-21 16:06:18 +00:00
Jonas Dreßler
d7c7311ceb clutter/seat: Add gtkDoc comments for touch-mode property
It's not that easy to find out when the touch-mode is enabled without
reading the code, so document that.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1075
2020-02-21 15:24:58 +00:00
Jonas Dreßler
41d72e86e0 backends/native: Also check touch-mode on object initialization
On a Surface Pro 2017, touch-mode is currently only detected correctly
after detaching and attaching the Type Cover (detachable keyboard) once,
it seems that `has_external_keyboard` is only set to the correct value
after MetaSeatNative is initialized.

So fix that and call `update_touch_mode()` once again when the object is
initialized and the `has_external_keyboard` and `has_touchscreen`
properties have been finally updated.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1075
2020-02-21 15:24:58 +00:00
Daniel van Vugt
282b09c17e clutter/actor: Add CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE
Which offscreens actor rendering only in cases where it hasn't changed for
2 frames or more. This avoids the performance penalty of offscreening an
actor whose content is trying to animate at full frame rate. It will
switch automatically.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1069
2020-02-21 18:07:46 +08:00
Wim Taymans
c5d2fc856a screen-cast: Update to PipeWire 0.3 API
Update to 0.3 API

[jadahl: update Dockerfile to include new enough pipewire]

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

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1062
2020-02-20 18:45:31 +01:00
Robert Mader
f5a28aa9e4 window-actor: Make culling of opaque windows X11 only
It is only useful for clients that do not set an opaque region but
still can be detected as being opaque. This is helpful for X11 clients
as opaque regions only got introduced around 2012 and only as part of EWMH
and are thus not used in many cases.
On Wayland however opaque regions have been part of the core protocol from the
beginnig and we can assume they are used more commonly.

As the current implementation in `MetaWindowActor` does not handle Wayland
subsurfaces well, instead of adding more complexity just move it to
`MetaWindowActorX11`.

While on it, take the shape region into account that is set when clients
use the X Nonrectangular Window Shape Extension Protocol, so we have exact
culling with those clients.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1058
2020-02-20 15:57:51 +00:00
Asier Sarasua Garmendia
6206511846 Update Basque translation 2020-02-20 15:42:44 +00:00
Jonas Ådahl
a209a14898 renderer-native: Use hardware acceleration check in generic layer
No need to duplicate it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
2020-02-20 10:40:42 +00:00
Jonas Ådahl
3e6a55aff0 renderer: Add API to check whether renderer is hardware accelerated
Also expose an introspected variant via the MetaBackend.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
2020-02-20 10:40:42 +00:00
Jonas Ådahl
704fea6323 renderer-native: Move 'backend' field to MetaRenderer
So that it can be used by the generic MetaRenderer class, as well as
other sub types, as well.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
2020-02-20 10:40:42 +00:00
Jonas Ådahl
8c1e6ebde0 remote-access-handle: Expose disable-animations property
Set to TRUE if a screen cast session asked for animations to be
disabled.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
2020-02-20 10:40:42 +00:00
Jonas Ådahl
81512ad0dc screen-cast-session: Add 'disable-animations' property
Allow screen casters (e.g. VNC remote desktop services) to ask for
animations to be inhibited, in order to lower the number of frames sent
over the network.

Currently only sets a field on the screen cast session object. Later
it'll be exposed via the remote access handle and via D-Bus by
gnome-shell.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
2020-02-20 10:40:42 +00:00
Christian Hergert
d122b66abc clutter/actor: avoid transform node for identity matrix
If the transform matrix is an identity, then positioning wont change and
we can avoid creating the transform node altogether. This is based on
a similar find in GTK today while reducing temporary allocations.

This cuts the number of transforms created in clutter_actor_paint() by
about half under light testing of GNOME Shell from 6.8% to 2.4% of
allocations.

Before:

    ALLOCATED      TOTAL    FUNCTION
[   20.4 MiB] [  21.20%]    clutter_actor_paint
[   11.0 MiB] [  11.45%]      clutter_paint_node_paint
[    6.6 MiB] [   6.84%]      clutter_transform_node_new
[    2.5 MiB] [   2.61%]      clutter_actor_node_new

After:

    ALLOCATED      TOTAL    FUNCTION
[   33.4 MiB] [  24.12%]    clutter_actor_paint
[   26.2 MiB] [  18.91%]      clutter_paint_node_paint
[    3.4 MiB] [   2.43%]      clutter_actor_node_new
[    3.3 MiB] [   2.41%]      clutter_transform_node_new

Allocation amounts will have differed due to different amounts of running
time, but the % of allocations has now dropped below
clutter_actor_node_new() which should be expected.

https://gitlab.gnome.org/GNOME/mutter/issues/1056
2020-02-20 06:41:34 +00:00
182 changed files with 5370 additions and 3094 deletions

View File

@@ -11,6 +11,7 @@ RUN dnf -y update && dnf -y upgrade && \
dnf install -y 'dnf-command(builddep)' && \
dnf install -y 'dnf-command(copr)' && \
dnf copr enable -y fmuellner/gnome-shell-ci && \
dnf copr enable -y jadahl/mutter-ci && \
dnf -y update && dnf -y upgrade && \
dnf builddep -y mutter && \
@@ -26,4 +27,6 @@ RUN dnf -y update && dnf -y upgrade && \
dnf remove -y gnome-bluetooth-libs-devel dbus-glib-devel upower-devel python3-devel && \
dnf remove -y --noautoremove mutter mutter-devel && \
dnf upgrade -y 'pkgconfig(libpipewire-0.3)' && \
dnf clean all

View File

@@ -19,7 +19,7 @@ fi
function commit_message_has_url() {
commit=$1
commit_message=$(git show -s --format='format:%b' $commit)
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(-/\)\?\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
return $?
}

39
NEWS
View File

@@ -1,3 +1,42 @@
3.35.92
=======
* Fix visibility of initially hidden windows [Jonas Å.; !1066]
* Avoid flicker when (un)redirecting windows [Sebastian; #997]
* Let BindConstraints update the preferred size [Emmanuele; !1070]
* Learn about GLES3 [Adam; !882]
* Ping windows on every window focus [Jonas D.; !891]
* Remove overhead from hot code paths [Christian;
#1056, !1081, !1083, !1071, !1087]
* Allow remote desktop services to inhibit animations [Jonas Å.; !838]
* Update screen-cast code to PipeWire 0.3 API [Wim; !1062]
* Make check-alive timeouts configurable [Jonas Å.; !1080]
* Make each stage view correspond to a single CRTC [Jonas Å.; !1042]
* Implement scaled/transformed hardware cursors [Robert; !526]
* Use DMA buffers for screencasting if possible [Georges; !1086]
* Make Xwayland startup asynchronous [Carlos; !944]
* Fix clipping glitches in long text entries [Jonas D.; !1096]
* Add side channel for starting required X11 services [Carlos; !945]
* Support synchronized wayland popup moving [Jonas Å.; !705]
* Fixed crashes [Olivier, Jonas Å.; !1073, !1093]
* Plugged memory leaks [Sebastian, Jonas Å.; !1089, !1095]
* Misc. bug fixes and cleanups [Jonas Å, Olivier, Florian, Daniel, Jonas D.,
Robert, Sebastian, Christian, Arun, Carlos, worldofpeace; !1061, #1043,
!1067, !1068, !1065, !835, !1058, !1069, !1075, #1060, !1077, !423, !1090,
!1088, !1094, #1067, !1064, !1099, !957, !1000, !1082]
Contributors:
Emmanuele Bassi, Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
Christian Hergert, Adam Jackson, Sebastian Keller, Robert Mader,
Florian Müllner, Georges Basile Stavracas Neto, Arun Raghavan, Wim Taymans,
Daniel van Vugt, worldofpeace, Jonas Ådahl
Translators:
Yi-Jyun Pan [zh_TW], Asier Sarasua Garmendia [eu], Rafael Fontenelle [pt_BR],
Emin Tufan Çetin [tr], Daniel Mustieles [es], Balázs Úr [hu],
Gwan-gyeong Mun [ko], Marek Černocký [cs], Fran Dieguez [gl],
Kukuh Syafaat [id], Alan Mortensen [da], Piotr Drąg [pl], sicklylife [ja],
Matej Urbančič [sl]
3.35.91
=======
* Honor accelerometer orientation on monitor config changes [Hans; !959]

View File

@@ -600,10 +600,11 @@ cally_actor_real_remove_actor (ClutterActor *container,
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), 0);
atk_parent = ATK_OBJECT (data);
atk_child = clutter_actor_get_accessible (actor);
if (atk_child)
if (clutter_actor_has_accessible (actor))
{
atk_child = clutter_actor_get_accessible (actor);
g_value_init (&values.old_value, G_TYPE_POINTER);
g_value_set_pointer (&values.old_value, atk_parent);

View File

@@ -631,7 +631,7 @@
#include "clutter-color-static.h"
#include "clutter-color.h"
#include "clutter-constraint-private.h"
#include "clutter-container.h"
#include "clutter-container-private.h"
#include "clutter-content-private.h"
#include "clutter-debug.h"
#include "clutter-easing.h"
@@ -1124,6 +1124,20 @@ static GQuark quark_actor_layout_info = 0;
static GQuark quark_actor_transform_info = 0;
static GQuark quark_actor_animation_info = 0;
static GQuark quark_key = 0;
static GQuark quark_motion = 0;
static GQuark quark_pointer_focus = 0;
static GQuark quark_button = 0;
static GQuark quark_scroll = 0;
static GQuark quark_stage = 0;
static GQuark quark_destroy = 0;
static GQuark quark_client = 0;
static GQuark quark_delete = 0;
static GQuark quark_touch = 0;
static GQuark quark_touchpad = 0;
static GQuark quark_proximity = 0;
static GQuark quark_pad = 0;
G_DEFINE_TYPE_WITH_CODE (ClutterActor,
clutter_actor,
G_TYPE_INITIALLY_UNOWNED,
@@ -3474,8 +3488,8 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
cogl_pipeline_set_color (outline, &cogl_color);
pipeline_node = clutter_pipeline_node_new (outline);
clutter_paint_node_set_name (pipeline_node,
"ClutterActor (paint volume outline)");
clutter_paint_node_set_static_name (pipeline_node,
"ClutterActor (paint volume outline)");
clutter_paint_node_add_primitive (pipeline_node, prim);
clutter_paint_node_add_child (node, pipeline_node);
cogl_object_unref (prim);
@@ -3489,8 +3503,8 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
pango_layout_set_text (layout, label, -1);
text_node = clutter_text_node_new (layout, color);
clutter_paint_node_set_name (text_node,
"ClutterActor (paint volume label)");
clutter_paint_node_set_static_name (text_node,
"ClutterActor (paint volume label)");
clutter_paint_node_add_rectangle (text_node,
&(ClutterActorBox) {
.x1 = pv->vertices[0].x,
@@ -3586,8 +3600,8 @@ _clutter_actor_paint_cull_result (ClutterActor *self,
pango_layout_set_text (layout, label, -1);
text_node = clutter_text_node_new (layout, &color);
clutter_paint_node_set_name (text_node,
"ClutterActor (paint volume text)");
clutter_paint_node_set_static_name (text_node,
"ClutterActor (paint volume text)");
clutter_paint_node_add_rectangle (text_node,
&(ClutterActorBox) {
.x1 = 0.f,
@@ -3743,7 +3757,13 @@ needs_flatten_effect (ClutterActor *self)
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT))
return FALSE;
if (priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ALWAYS)
/* We need to enable the effect immediately even in ON_IDLE because that can
* only be implemented efficiently within the effect itself.
* If it was implemented here using just priv->is_dirty then we would lose
* the ability to animate opacity without repaints.
*/
if ((priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ALWAYS) ||
(priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE))
return TRUE;
else if (priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY)
{
@@ -3862,7 +3882,7 @@ clutter_actor_paint_node (ClutterActor *actor,
clear_flags = COGL_BUFFER_BIT_DEPTH;
node = clutter_root_node_new (fb, &bg_color, clear_flags);
clutter_paint_node_set_name (node, "stageClear");
clutter_paint_node_set_static_name (node, "stageClear");
clutter_paint_node_add_rectangle (node, &box);
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
@@ -3877,7 +3897,7 @@ clutter_actor_paint_node (ClutterActor *actor,
/ 255;
node = clutter_color_node_new (&bg_color);
clutter_paint_node_set_name (node, "backgroundColor");
clutter_paint_node_set_static_name (node, "backgroundColor");
clutter_paint_node_add_rectangle (node, &box);
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
@@ -3997,11 +4017,14 @@ clutter_actor_paint (ClutterActor *self,
clutter_actor_get_transform (self, &transform);
transform_node = clutter_transform_node_new (&transform);
clutter_paint_node_add_child (transform_node, root_node);
clutter_paint_node_unref (root_node);
if (!cogl_matrix_is_identity (&transform))
{
transform_node = clutter_transform_node_new (&transform);
clutter_paint_node_add_child (transform_node, root_node);
clutter_paint_node_unref (root_node);
root_node = g_steal_pointer (&transform_node);
root_node = g_steal_pointer (&transform_node);
}
#ifdef CLUTTER_ENABLE_DEBUG
/* Catch when out-of-band transforms have been made by actors not as part
@@ -4158,7 +4181,7 @@ clutter_actor_continue_paint (ClutterActor *self,
*/
framebuffer = clutter_paint_context_get_base_framebuffer (paint_context);
dummy = _clutter_dummy_node_new (self, framebuffer);
clutter_paint_node_set_name (dummy, "Root");
clutter_paint_node_set_static_name (dummy, "Root");
/* XXX - for 1.12, we use the return value of paint_node() to
* decide whether we should emit the ::paint signal.
@@ -4198,6 +4221,11 @@ clutter_actor_continue_paint (ClutterActor *self,
run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
}
if (priv->current_effect == priv->flatten_effect &&
priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE &&
run_flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY)
run_flags |= CLUTTER_EFFECT_PAINT_BYPASS_EFFECT;
_clutter_effect_paint (priv->current_effect, paint_context, run_flags);
priv->current_effect = old_current_effect;
@@ -4568,7 +4596,7 @@ clutter_actor_remove_child_internal (ClutterActor *self,
/* we need to emit the signal before dropping the reference */
if (emit_actor_removed)
g_signal_emit_by_name (self, "actor-removed", child);
_clutter_container_emit_actor_removed (CLUTTER_CONTAINER (self), child);
if (notify_first_last)
{
@@ -6531,6 +6559,20 @@ clutter_actor_class_init (ClutterActorClass *klass)
quark_actor_transform_info = g_quark_from_static_string ("-clutter-actor-transform-info");
quark_actor_animation_info = g_quark_from_static_string ("-clutter-actor-animation-info");
quark_key = g_quark_from_static_string ("key");
quark_motion = g_quark_from_static_string ("motion");
quark_pointer_focus = g_quark_from_static_string ("pointer-focus");
quark_button = g_quark_from_static_string ("button");
quark_scroll = g_quark_from_static_string ("scroll");
quark_stage = g_quark_from_static_string ("stage");
quark_destroy = g_quark_from_static_string ("destroy");
quark_client = g_quark_from_static_string ("client");
quark_delete = g_quark_from_static_string ("delete");
quark_touch = g_quark_from_static_string ("touch");
quark_touchpad = g_quark_from_static_string ("touchpad");
quark_proximity = g_quark_from_static_string ("proximity");
quark_pad = g_quark_from_static_string ("pad");
object_class->constructor = clutter_actor_constructor;
object_class->set_property = clutter_actor_set_property;
object_class->get_property = clutter_actor_get_property;
@@ -8566,7 +8608,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[CAPTURED_EVENT] =
g_signal_new (I_("captured-event"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
G_STRUCT_OFFSET (ClutterActorClass, captured_event),
_clutter_boolean_handled_accumulator, NULL,
_clutter_marshal_BOOLEAN__BOXED,
@@ -13212,7 +13254,7 @@ clutter_actor_add_child_internal (ClutterActor *self,
}
if (emit_actor_added)
g_signal_emit_by_name (self, "actor-added", child);
_clutter_container_emit_actor_added (CLUTTER_CONTAINER (self), child);
if (notify_first_last)
{
@@ -13876,8 +13918,70 @@ clutter_actor_event (ClutterActor *actor,
if (capture)
{
g_signal_emit (actor, actor_signals[CAPTURED_EVENT], 0,
event,
GQuark detail = 0;
switch (event->type)
{
case CLUTTER_NOTHING:
break;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
detail = quark_key;
break;
case CLUTTER_MOTION:
detail = quark_motion;
break;
case CLUTTER_ENTER:
case CLUTTER_LEAVE:
detail = quark_pointer_focus;
break;
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
detail = quark_button;
break;
case CLUTTER_SCROLL:
detail = quark_scroll;
break;
case CLUTTER_STAGE_STATE:
detail = quark_stage;
break;
case CLUTTER_DESTROY_NOTIFY:
detail = quark_destroy;
break;
case CLUTTER_CLIENT_MESSAGE:
detail = quark_client;
break;
case CLUTTER_DELETE:
detail = quark_delete;
break;
case CLUTTER_TOUCH_BEGIN:
case CLUTTER_TOUCH_UPDATE:
case CLUTTER_TOUCH_END:
case CLUTTER_TOUCH_CANCEL:
detail = quark_touch;
break;
case CLUTTER_TOUCHPAD_PINCH:
case CLUTTER_TOUCHPAD_SWIPE:
detail = quark_touchpad;
break;
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
detail = quark_proximity;
break;
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
detail = quark_pad;
break;
case CLUTTER_EVENT_LAST: /* Just keep compiler warnings quiet */
break;
}
g_signal_emit (actor,
actor_signals[CAPTURED_EVENT],
detail,
event,
&retval);
goto out;
}
@@ -21157,7 +21261,7 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
color.alpha = clutter_actor_get_paint_opacity_internal (self);
node = clutter_texture_node_new (texture, &color, priv->min_filter, priv->mag_filter);
clutter_paint_node_set_name (node, "Texture");
clutter_paint_node_set_static_name (node, "Texture");
if (priv->content_repeat == CLUTTER_REPEAT_NONE)
clutter_paint_node_add_rectangle (node, &box);
@@ -21178,3 +21282,14 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
return node;
}
gboolean
clutter_actor_has_accessible (ClutterActor *actor)
{
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE);
if (CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible)
return CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible (actor);
return TRUE;
}

View File

@@ -299,10 +299,11 @@ struct _ClutterActorClass
gboolean (* touch_event) (ClutterActor *self,
ClutterTouchEvent *event);
gboolean (* has_accessible) (ClutterActor *self);
/*< private >*/
/* padding for future expansion */
gpointer _padding_dummy[26];
gpointer _padding_dummy[25];
};
/**
@@ -380,6 +381,8 @@ CLUTTER_EXPORT
const gchar * clutter_actor_get_name (ClutterActor *self);
CLUTTER_EXPORT
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
CLUTTER_EXPORT
gboolean clutter_actor_has_accessible (ClutterActor *self);
CLUTTER_EXPORT
gboolean clutter_actor_is_visible (ClutterActor *self);

View File

@@ -352,7 +352,7 @@ clutter_canvas_paint_content (ClutterContent *content,
return;
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
clutter_paint_node_set_name (node, "Canvas Content");
clutter_paint_node_set_static_name (node, "Canvas Content");
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);

View File

@@ -0,0 +1,36 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright 2020 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLUTTER_CONTAINER_PRIVATE_H__
#define __CLUTTER_CONTAINER_PRIVATE_H__
#include <clutter/clutter-container.h>
G_BEGIN_DECLS
void _clutter_container_emit_actor_added (ClutterContainer *container,
ClutterActor *actor);
void _clutter_container_emit_actor_removed (ClutterContainer *container,
ClutterActor *actor);
G_END_DECLS
#endif /* __CLUTTER_CONTAINER_PRIVATE_H__ */

View File

@@ -37,6 +37,7 @@
#include "clutter-actor-private.h"
#include "clutter-child-meta.h"
#include "clutter-container-private.h"
#include "clutter-debug.h"
#include "clutter-main.h"
#include "clutter-marshal.h"
@@ -1250,3 +1251,23 @@ clutter_container_child_notify (ClutterContainer *container,
child,
pspec);
}
void
_clutter_container_emit_actor_added (ClutterContainer *container,
ClutterActor *actor)
{
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
g_signal_emit (container, container_signals[ACTOR_ADDED], 0, actor);
}
void
_clutter_container_emit_actor_removed (ClutterContainer *container,
ClutterActor *actor)
{
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
g_signal_emit (container, container_signals[ACTOR_REMOVED], 0, actor);
}

View File

@@ -538,6 +538,10 @@ typedef enum /*< prefix=CLUTTER_ACTOR >*/
* virtual returns %TRUE.
* @CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: Always redirect the actor to an
* offscreen buffer even if it is fully opaque.
* @CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE: Only redirect the actor if it is the
* most efficient thing to do based on its recent repaint behaviour. That
* means when its contents are changing less frequently than it's being used
* on stage.
*
* Possible flags to pass to clutter_actor_set_offscreen_redirect().
*
@@ -545,8 +549,9 @@ typedef enum /*< prefix=CLUTTER_ACTOR >*/
*/
typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
{
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1<<0,
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1<<1
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1 << 0,
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1 << 1,
CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE = 1 << 2
} ClutterOffscreenRedirect;
/**
@@ -673,12 +678,15 @@ typedef enum /*< prefix=CLUTTER_BIND >*/
* has queued a redraw before this paint. This implies that the effect
* should call clutter_actor_continue_paint() to chain to the next
* effect and can not cache any results from a previous paint.
* @CLUTTER_EFFECT_PAINT_BYPASS_EFFECT: The effect should not be used
* on this frame, but it will be asked to paint the actor still.
*
* Flags passed to the paint or pick method of #ClutterEffect.
*/
typedef enum /*< prefix=CLUTTER_EFFECT_PAINT >*/
{
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0),
CLUTTER_EFFECT_PAINT_BYPASS_EFFECT = (1 << 1)
} ClutterEffectPaintFlags;
/**

View File

@@ -130,7 +130,7 @@ clutter_image_paint_content (ClutterContent *content,
return;
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
clutter_paint_node_set_name (node, "Image Content");
clutter_paint_node_set_static_name (node, "Image Content");
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
}

View File

@@ -63,6 +63,7 @@
#include "clutter-main.h"
#include "clutter-master-clock.h"
#include "clutter-mutter.h"
#include "clutter-paint-node-private.h"
#include "clutter-private.h"
#include "clutter-settings-private.h"
#include "clutter-stage-manager.h"
@@ -970,6 +971,9 @@ clutter_init_real (GError **error)
if (clutter_enable_accessibility)
cally_accessibility_init ();
/* Initialize types required for paint nodes */
_clutter_paint_node_init_types ();
return CLUTTER_INIT_SUCCESS;
}

View File

@@ -29,6 +29,8 @@
* of #ClutterMasterClock.
*/
#include <cogl/cogl-trace.h>
#include "clutter-build-config.h"
#include "clutter-master-clock.h"
@@ -461,6 +463,8 @@ clutter_clock_dispatch (GSource *source,
_clutter_threads_acquire_lock ();
COGL_TRACE_BEGIN (ClutterMasterClockTick, "Master Clock (tick)");
/* Get the time to use for this frame */
master_clock->cur_tick = g_source_get_time (source);
@@ -492,6 +496,8 @@ clutter_clock_dispatch (GSource *source,
g_slist_free_full (stages, g_object_unref);
COGL_TRACE_END (ClutterMasterClockTick);
_clutter_threads_release_lock ();
return TRUE;

View File

@@ -469,6 +469,13 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
ClutterOffscreenEffectPrivate *priv = self->priv;
if (flags & CLUTTER_EFFECT_PAINT_BYPASS_EFFECT)
{
clutter_actor_continue_paint (priv->actor, paint_context);
cogl_clear_object (&priv->offscreen);
return;
}
/* If we've already got a cached image and the actor hasn't been redrawn
* then we can just use the cached image in the FBO.
*/

View File

@@ -20,7 +20,8 @@
#include "clutter-paint-context.h"
ClutterPaintContext * clutter_paint_context_new_for_view (ClutterStageView *view);
ClutterPaintContext * clutter_paint_context_new_for_view (ClutterStageView *view,
const cairo_region_t *redraw_clip);
gboolean clutter_paint_context_is_drawing_off_stage (ClutterPaintContext *paint_context);

View File

@@ -26,6 +26,8 @@ struct _ClutterPaintContext
GList *framebuffers;
ClutterStageView *view;
cairo_region_t *redraw_clip;
};
G_DEFINE_BOXED_TYPE (ClutterPaintContext, clutter_paint_context,
@@ -33,7 +35,8 @@ G_DEFINE_BOXED_TYPE (ClutterPaintContext, clutter_paint_context,
clutter_paint_context_unref)
ClutterPaintContext *
clutter_paint_context_new_for_view (ClutterStageView *view)
clutter_paint_context_new_for_view (ClutterStageView *view,
const cairo_region_t *redraw_clip)
{
ClutterPaintContext *paint_context;
CoglFramebuffer *framebuffer;
@@ -41,6 +44,7 @@ clutter_paint_context_new_for_view (ClutterStageView *view)
paint_context = g_new0 (ClutterPaintContext, 1);
g_ref_count_init (&paint_context->ref_count);
paint_context->view = view;
paint_context->redraw_clip = cairo_region_copy (redraw_clip);
framebuffer = clutter_stage_view_get_framebuffer (view);
clutter_paint_context_push_framebuffer (paint_context, framebuffer);
@@ -77,6 +81,7 @@ clutter_paint_context_dispose (ClutterPaintContext *paint_context)
g_list_free_full (paint_context->framebuffers,
cogl_object_unref);
paint_context->framebuffers = NULL;
g_clear_pointer (&paint_context->redraw_clip, cairo_region_destroy);
}
void
@@ -115,6 +120,12 @@ clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context)
paint_context->framebuffers);
}
const cairo_region_t *
clutter_paint_context_get_redraw_clip (ClutterPaintContext *paint_context)
{
return paint_context->redraw_clip;
}
/**
* clutter_paint_context_get_framebuffer:
* @paint_context: The #ClutterPaintContext

View File

@@ -59,4 +59,7 @@ void clutter_paint_context_push_framebuffer (ClutterPaintContext *paint_context,
CLUTTER_EXPORT
void clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context);
CLUTTER_EXPORT
const cairo_region_t * clutter_paint_context_get_redraw_clip (ClutterPaintContext *paint_context);
#endif /* CLUTTER_PAINT_CONTEXT_H */

View File

@@ -49,11 +49,11 @@ struct _ClutterPaintNode
ClutterPaintNode *next_sibling;
ClutterPaintNode *last_child;
guint n_children;
GArray *operations;
gchar *name;
const gchar *name;
guint n_children;
volatile int ref_count;
};

View File

@@ -171,8 +171,6 @@ clutter_paint_node_real_finalize (ClutterPaintNode *node)
{
ClutterPaintNode *iter;
g_free (node->name);
if (node->operations != NULL)
{
guint i;
@@ -297,7 +295,8 @@ clutter_paint_node_get_type (void)
*
* The @name will be used for debugging purposes.
*
* The @node will copy the passed string.
* The @node will intern @name using g_intern_string(). If you have access to a
* static string, use clutter_paint_node_set_static_name() instead.
*
* Since: 1.10
*/
@@ -307,8 +306,22 @@ clutter_paint_node_set_name (ClutterPaintNode *node,
{
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
g_free (node->name);
node->name = g_strdup (name);
node->name = g_intern_string (name);
}
/**
* clutter_paint_node_set_static_name: (skip)
*
* Like clutter_paint_node_set_name() but uses a static or interned string
* containing the name.
*/
void
clutter_paint_node_set_static_name (ClutterPaintNode *node,
const char *name)
{
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
node->name = name;
}
/**
@@ -1181,8 +1194,6 @@ _clutter_paint_node_create (GType gtype)
{
g_return_val_if_fail (g_type_is_a (gtype, CLUTTER_TYPE_PAINT_NODE), NULL);
_clutter_paint_node_init_types ();
return (gpointer) g_type_create_instance (gtype);
}

View File

@@ -56,6 +56,9 @@ void clutter_paint_node_paint (Clutter
CLUTTER_EXPORT
void clutter_paint_node_set_name (ClutterPaintNode *node,
const char *name);
CLUTTER_EXPORT
void clutter_paint_node_set_static_name (ClutterPaintNode *node,
const char *name);
CLUTTER_EXPORT
CoglFramebuffer * clutter_paint_node_get_framebuffer (ClutterPaintNode *node);

View File

@@ -248,6 +248,9 @@ gboolean _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1
const cairo_rectangle_int_t *src2,
cairo_rectangle_int_t *dest);
gboolean clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2);
struct _ClutterVertex4
{

View File

@@ -41,6 +41,7 @@ enum
PTR_A11Y_DWELL_CLICK_TYPE_CHANGED,
PTR_A11Y_TIMEOUT_STARTED,
PTR_A11Y_TIMEOUT_STOPPED,
IS_UNFOCUS_INHIBITED_CHANGED,
N_SIGNALS,
};
@@ -62,6 +63,8 @@ struct _ClutterSeatPrivate
{
ClutterBackend *backend;
unsigned int inhibit_unfocus_count;
/* Keyboard a11y */
ClutterKbdA11ySettings kbd_a11y_settings;
@@ -275,6 +278,22 @@ clutter_seat_class_init (ClutterSeatClass *klass)
G_TYPE_FROM_CLASS (object_class),
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEANv);
/**
* ClutterSeat::is-unfocus-inhibited-changed:
* @seat: the #ClutterSeat that emitted the signal
*
* The ::is-unfocus-inhibited-changed signal is emitted when the
* property to inhibit the unsetting of the focus-surface of the
* #ClutterSeat changed. To get the current state of this property,
* use clutter_seat_is_unfocus_inhibited().
*/
signals[IS_UNFOCUS_INHIBITED_CHANGED] =
g_signal_new (I_("is-unfocus-inhibited-changed"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
props[PROP_BACKEND] =
g_param_spec_object ("backend",
P_("Backend"),
@@ -282,6 +301,12 @@ clutter_seat_class_init (ClutterSeatClass *klass)
CLUTTER_TYPE_BACKEND,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
/**
* ClutterSeat:touch-mode:
*
* The current touch-mode of the #ClutterSeat, it is set to %TRUE if the
* requirements documented in clutter_seat_get_touch_mode() are fulfilled.
**/
props[PROP_TOUCH_MODE] =
g_param_spec_boolean ("touch-mode",
P_("Touch mode"),
@@ -508,6 +533,85 @@ clutter_seat_set_pointer_a11y_dwell_click_type (ClutterSeat
priv->pointer_a11y_settings.dwell_click_type = click_type;
}
/**
* clutter_seat_inhibit_unfocus:
* @seat: a #ClutterSeat
*
* Inhibits unsetting of the pointer focus-surface for the #ClutterSeat @seat,
* this allows to keep using the pointer even when it's hidden.
*
* This property is refcounted, so clutter_seat_uninhibit_unfocus() must be
* called the exact same number of times as clutter_seat_inhibit_unfocus()
* was called before.
**/
void
clutter_seat_inhibit_unfocus (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_if_fail (CLUTTER_IS_SEAT (seat));
priv = clutter_seat_get_instance_private (seat);
priv->inhibit_unfocus_count++;
if (priv->inhibit_unfocus_count == 1)
g_signal_emit (G_OBJECT (seat), signals[IS_UNFOCUS_INHIBITED_CHANGED], 0);
}
/**
* clutter_seat_uninhibit_unfocus:
* @seat: a #ClutterSeat
*
* Disables the inhibiting of unsetting of the pointer focus-surface
* previously enabled by calling clutter_seat_inhibit_unfocus().
*
* This property is refcounted, so clutter_seat_uninhibit_unfocus() must be
* called the exact same number of times as clutter_seat_inhibit_unfocus()
* was called before.
**/
void
clutter_seat_uninhibit_unfocus (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_if_fail (CLUTTER_IS_SEAT (seat));
priv = clutter_seat_get_instance_private (seat);
if (priv->inhibit_unfocus_count == 0)
{
g_warning ("Called clutter_seat_uninhibit_unfocus without inhibiting before");
return;
}
priv->inhibit_unfocus_count--;
if (priv->inhibit_unfocus_count == 0)
g_signal_emit (G_OBJECT (seat), signals[IS_UNFOCUS_INHIBITED_CHANGED], 0);
}
/**
* clutter_seat_is_unfocus_inhibited:
* @seat: a #ClutterSeat
*
* Gets whether unsetting of the pointer focus-surface is inhibited
* for the #ClutterSeat @seat.
*
* Returns: %TRUE if unsetting is inhibited, %FALSE otherwise
**/
gboolean
clutter_seat_is_unfocus_inhibited (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_val_if_fail (CLUTTER_IS_SEAT (seat), FALSE);
priv = clutter_seat_get_instance_private (seat);
return priv->inhibit_unfocus_count > 0;
}
/**
* clutter_seat_create_virtual_device:
* @seat: a #ClutterSeat
@@ -569,6 +673,21 @@ clutter_seat_warp_pointer (ClutterSeat *seat,
CLUTTER_SEAT_GET_CLASS (seat)->warp_pointer (seat, x, y);
}
/**
* clutter_seat_get_touch_mode:
* @seat: a #ClutterSeat
*
* Gets the current touch-mode state of the #ClutterSeat @seat.
* The #ClutterSeat:touch-mode property is set to %TRUE if the following
* requirements are fulfilled:
*
* - A touchscreen is available
* - No external keyboard is attached to the device
* - A tablet mode switch, if present, is enabled
*
* Returns: %TRUE if the device is a tablet that doesn't have an external
* keyboard attached, %FALSE otherwise.
**/
gboolean
clutter_seat_get_touch_mode (ClutterSeat *seat)
{

View File

@@ -159,6 +159,16 @@ void clutter_seat_get_pointer_a11y_settings (ClutterSeat *seat,
CLUTTER_EXPORT
void clutter_seat_set_pointer_a11y_dwell_click_type (ClutterSeat *seat,
ClutterPointerA11yDwellClickType click_type);
CLUTTER_EXPORT
void clutter_seat_inhibit_unfocus (ClutterSeat *seat);
CLUTTER_EXPORT
void clutter_seat_uninhibit_unfocus (ClutterSeat *seat);
CLUTTER_EXPORT
gboolean clutter_seat_is_unfocus_inhibited (ClutterSeat *seat);
CLUTTER_EXPORT
ClutterVirtualInputDevice *clutter_seat_create_virtual_device (ClutterSeat *seat,
ClutterInputDeviceType device_type);

View File

@@ -36,9 +36,9 @@ typedef struct _ClutterStageQueueRedrawEntry ClutterStageQueueRedrawEntry;
/* stage */
ClutterStageWindow *_clutter_stage_get_default_window (void);
void _clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip);
void clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip);
void _clutter_stage_emit_after_paint (ClutterStage *stage);

View File

@@ -20,8 +20,7 @@
#include "clutter/clutter-stage-view.h"
void clutter_stage_view_after_paint (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
void clutter_stage_view_after_paint (ClutterStageView *view);
gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view);
@@ -33,7 +32,15 @@ gboolean clutter_stage_view_is_dirty_projection (ClutterStageView *view);
void clutter_stage_view_set_dirty_projection (ClutterStageView *view,
gboolean dirty);
void clutter_stage_view_add_redraw_clip (ClutterStageView *view,
cairo_rectangle_int_t *clip);
void clutter_stage_view_add_redraw_clip (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
gboolean clutter_stage_view_has_full_redraw_clip (ClutterStageView *view);
gboolean clutter_stage_view_has_redraw_clip (ClutterStageView *view);
const cairo_region_t * clutter_stage_view_peek_redraw_clip (ClutterStageView *view);
cairo_region_t * clutter_stage_view_take_redraw_clip (ClutterStageView *view);
#endif /* __CLUTTER_STAGE_VIEW_PRIVATE_H__ */

View File

@@ -23,6 +23,8 @@
#include <cairo-gobject.h>
#include <math.h>
#include "clutter/clutter-private.h"
enum
{
PROP_0,
@@ -50,6 +52,9 @@ typedef struct _ClutterStageViewPrivate
CoglOffscreen *shadowfb;
CoglPipeline *shadowfb_pipeline;
gboolean has_redraw_clip;
cairo_region_t *redraw_clip;
guint dirty_viewport : 1;
guint dirty_projection : 1;
} ClutterStageViewPrivate;
@@ -166,12 +171,11 @@ clutter_stage_view_invalidate_offscreen_blit_pipeline (ClutterStageView *view)
}
static void
clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
const cairo_rectangle_int_t *rect,
CoglPipeline *pipeline,
CoglFramebuffer *src_framebuffer,
CoglFramebuffer *dst_framebuffer,
gboolean can_blit)
clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
CoglPipeline *pipeline,
CoglFramebuffer *src_framebuffer,
CoglFramebuffer *dst_framebuffer,
gboolean can_blit)
{
CoglMatrix matrix;
@@ -204,8 +208,7 @@ clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
}
void
clutter_stage_view_after_paint (ClutterStageView *view,
const cairo_rectangle_int_t *rect)
clutter_stage_view_after_paint (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
@@ -222,7 +225,6 @@ clutter_stage_view_after_paint (ClutterStageView *view,
if (priv->shadowfb)
{
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->offscreen_pipeline,
priv->offscreen,
priv->shadowfb,
@@ -231,7 +233,6 @@ clutter_stage_view_after_paint (ClutterStageView *view,
else
{
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->offscreen_pipeline,
priv->offscreen,
priv->framebuffer,
@@ -243,7 +244,6 @@ clutter_stage_view_after_paint (ClutterStageView *view,
{
clutter_stage_view_ensure_shadowfb_blit_pipeline (view);
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->shadowfb_pipeline,
priv->shadowfb,
priv->framebuffer,
@@ -307,6 +307,86 @@ clutter_stage_view_get_offscreen_transformation_matrix (ClutterStageView *view,
view_class->get_offscreen_transformation_matrix (view, matrix);
}
void
clutter_stage_view_add_redraw_clip (ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
if (priv->has_redraw_clip && !priv->redraw_clip)
return;
if (!clip)
{
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
priv->has_redraw_clip = TRUE;
return;
}
if (clip->width == 0 || clip->height == 0)
return;
if (!priv->redraw_clip)
{
if (!clutter_util_rectangle_equal (&priv->layout, clip))
priv->redraw_clip = cairo_region_create_rectangle (clip);
}
else
{
cairo_region_union_rectangle (priv->redraw_clip, clip);
if (cairo_region_num_rectangles (priv->redraw_clip) == 1)
{
cairo_rectangle_int_t redraw_clip_extents;
cairo_region_get_extents (priv->redraw_clip, &redraw_clip_extents);
if (clutter_util_rectangle_equal (&priv->layout, &redraw_clip_extents))
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
}
}
priv->has_redraw_clip = TRUE;
}
gboolean
clutter_stage_view_has_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->has_redraw_clip;
}
gboolean
clutter_stage_view_has_full_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->has_redraw_clip && !priv->redraw_clip;
}
const cairo_region_t *
clutter_stage_view_peek_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->redraw_clip;
}
cairo_region_t *
clutter_stage_view_take_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
priv->has_redraw_clip = FALSE;
return g_steal_pointer (&priv->redraw_clip);
}
void
clutter_stage_view_transform_to_onscreen (ClutterStageView *view,
gfloat *x,
@@ -419,6 +499,7 @@ clutter_stage_view_dispose (GObject *object)
g_clear_pointer (&priv->offscreen, cogl_object_unref);
g_clear_pointer (&priv->offscreen_pipeline, cogl_object_unref);
g_clear_pointer (&priv->shadowfb_pipeline, cogl_object_unref);
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
G_OBJECT_CLASS (clutter_stage_view_parent_class)->dispose (object);
}

View File

@@ -178,77 +178,6 @@ _clutter_stage_window_clear_update_time (ClutterStageWindow *window)
iface->clear_update_time (window);
}
void
_clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip)
{
ClutterStageWindowInterface *iface;
g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->add_redraw_clip != NULL)
iface->add_redraw_clip (window, stage_clip);
}
/* Determines if the backend will clip the rendering of the next
* frame.
*
* Note: at the start of each new frame there is an implied clip that
* clips everything (i.e. nothing would be drawn) so this function
* will return True at the start of a new frame if the backend
* supports clipped redraws.
*/
gboolean
_clutter_stage_window_has_redraw_clips (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->has_redraw_clips != NULL)
return iface->has_redraw_clips (window);
return FALSE;
}
/* Determines if the backend will discard any additional redraw clips
* and instead promote them to a full stage redraw.
*
* The ideas is that backend may have some heuristics that cause it to
* give up tracking redraw clips so this can be used to avoid the cost
* of calculating a redraw clip when we know it's going to be ignored
* anyway.
*/
gboolean
_clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->ignoring_redraw_clips != NULL)
return iface->ignoring_redraw_clips (window);
return TRUE;
}
cairo_region_t *
_clutter_stage_window_get_redraw_clip (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->get_redraw_clip != NULL)
return iface->get_redraw_clip (window);
return NULL;
}
void
_clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus)

View File

@@ -51,12 +51,6 @@ struct _ClutterStageWindowInterface
gint64 (* get_update_time) (ClutterStageWindow *stage_window);
void (* clear_update_time) (ClutterStageWindow *stage_window);
void (* add_redraw_clip) (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *stage_rectangle);
gboolean (* has_redraw_clips) (ClutterStageWindow *stage_window);
gboolean (* ignoring_redraw_clips) (ClutterStageWindow *stage_window);
cairo_region_t * (* get_redraw_clip) (ClutterStageWindow *stage_window);
void (* set_accept_focus) (ClutterStageWindow *stage_window,
gboolean accept_focus);
@@ -94,12 +88,6 @@ void _clutter_stage_window_schedule_update (ClutterStageWin
gint64 _clutter_stage_window_get_update_time (ClutterStageWindow *window);
void _clutter_stage_window_clear_update_time (ClutterStageWindow *window);
void _clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip);
gboolean _clutter_stage_window_has_redraw_clips (ClutterStageWindow *window);
gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window);
cairo_region_t * _clutter_stage_window_get_redraw_clip (ClutterStageWindow *window);
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus);

View File

@@ -144,8 +144,6 @@ struct _ClutterStagePrivate
gpointer paint_data;
GDestroyNotify paint_notify;
cairo_rectangle_int_t view_clip;
int update_freeze_count;
guint redraw_pending : 1;
@@ -559,6 +557,33 @@ pick_record_contains_point (ClutterStage *stage,
return TRUE;
}
static void
clutter_stage_add_redraw_clip (ClutterStage *stage,
cairo_rectangle_int_t *clip)
{
GList *l;
for (l = _clutter_stage_peek_stage_views (stage); l; l = l->next)
{
ClutterStageView *view = l->data;
if (!clip)
{
clutter_stage_view_add_redraw_clip (view, NULL);
}
else
{
cairo_rectangle_int_t view_layout;
cairo_rectangle_int_t intersection;
clutter_stage_view_get_layout (view, &view_layout);
if (_clutter_util_rectangle_intersection (&view_layout, clip,
&intersection))
clutter_stage_view_add_redraw_clip (view, &intersection);
}
}
}
static inline void
queue_full_redraw (ClutterStage *stage)
{
@@ -577,7 +602,7 @@ queue_full_redraw (ClutterStage *stage)
if (stage_window == NULL)
return;
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
clutter_stage_add_redraw_clip (stage, NULL);
}
static gboolean
@@ -903,15 +928,18 @@ setup_view_for_pick_or_paint (ClutterStage *stage,
}
static void
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
{
ClutterPaintContext *paint_context;
cairo_rectangle_int_t clip_rect;
paint_context = clutter_paint_context_new_for_view (view);
paint_context = clutter_paint_context_new_for_view (view, redraw_clip);
cairo_region_get_extents (redraw_clip, &clip_rect);
setup_view_for_pick_or_paint (stage, view, &clip_rect);
setup_view_for_pick_or_paint (stage, view, clip);
clutter_actor_paint (CLUTTER_ACTOR (stage), paint_context);
clutter_paint_context_destroy (paint_context);
}
@@ -920,9 +948,9 @@ clutter_stage_do_paint_view (ClutterStage *stage,
* for picking or painting...
*/
void
_clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
{
ClutterStagePrivate *priv = stage->priv;
@@ -931,15 +959,11 @@ _clutter_stage_paint_view (ClutterStage *stage,
COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintView, "Paint (view)");
priv->view_clip = *clip;
if (g_signal_has_handler_pending (stage, stage_signals[PAINT_VIEW],
0, TRUE))
g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view);
g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view, redraw_clip);
else
CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view);
priv->view_clip = (cairo_rectangle_int_t) { 0 };
CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view, redraw_clip);
}
void
@@ -1416,16 +1440,12 @@ clutter_stage_do_redraw (ClutterStage *stage)
static GSList *
_clutter_stage_check_updated_pointers (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
ClutterBackend *backend;
ClutterSeat *seat;
GSList *updating = NULL;
GList *l, *devices;
cairo_region_t *clip;
graphene_point_t point;
clip = _clutter_stage_window_get_redraw_clip (priv->impl);
backend = clutter_get_default_backend ();
seat = clutter_backend_get_default_seat (backend);
devices = clutter_seat_list_devices (seat);
@@ -1433,6 +1453,8 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
for (l = devices; l; l = l->next)
{
ClutterInputDevice *dev = l->data;
ClutterStageView *view;
const cairo_region_t *clip;
if (clutter_input_device_get_device_mode (dev) !=
CLUTTER_INPUT_MODE_MASTER)
@@ -1448,6 +1470,11 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
if (!clutter_input_device_get_coords (dev, NULL, &point))
continue;
view = clutter_stage_get_view_at (stage, point.x, point.y);
if (!view)
continue;
clip = clutter_stage_view_peek_redraw_clip (view);
if (!clip || cairo_region_contains_point (clip, point.x, point.y))
updating = g_slist_prepend (updating, dev);
break;
@@ -1557,6 +1584,22 @@ clutter_stage_real_queue_relayout (ClutterActor *self)
parent_class->queue_relayout (self);
}
static gboolean
is_full_stage_redraw_queued (ClutterStage *stage)
{
GList *l;
for (l = _clutter_stage_peek_stage_views (stage); l; l = l->next)
{
ClutterStageView *view = l->data;
if (!clutter_stage_view_has_full_redraw_clip (view))
return FALSE;
}
return TRUE;
}
static gboolean
clutter_stage_real_queue_redraw (ClutterActor *actor,
ClutterActor *leaf,
@@ -1578,12 +1621,12 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
if (stage_window == NULL)
return TRUE;
if (_clutter_stage_window_ignoring_redraw_clips (stage_window))
if (is_full_stage_redraw_queued (stage))
return FALSE;
if (redraw_clip == NULL)
{
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
clutter_stage_add_redraw_clip (stage, NULL);
return FALSE;
}
@@ -1615,43 +1658,20 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
stage_clip.width = intersection_box.x2 - stage_clip.x;
stage_clip.height = intersection_box.y2 - stage_clip.y;
_clutter_stage_window_add_redraw_clip (stage_window, &stage_clip);
clutter_stage_add_redraw_clip (stage, &stage_clip);
return FALSE;
}
gboolean
_clutter_stage_has_full_redraw_queued (ClutterStage *stage)
{
ClutterStageWindow *stage_window = _clutter_stage_get_window (stage);
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage) || stage_window == NULL)
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
return FALSE;
if (stage->priv->redraw_pending &&
!_clutter_stage_window_has_redraw_clips (stage_window))
return TRUE;
else
if (!stage->priv->redraw_pending)
return FALSE;
}
cairo_region_t *
clutter_stage_get_redraw_clip (ClutterStage *stage)
{
ClutterStagePrivate *priv;
cairo_rectangle_int_t clip;
cairo_region_t *region;
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
priv = stage->priv;
region = _clutter_stage_window_get_redraw_clip (priv->impl);
if (region)
return region;
/* Set clip to the full extents of the stage */
_clutter_stage_window_get_geometry (priv->impl, &clip);
return cairo_region_create_rectangle (&clip);
return is_full_stage_redraw_queued (stage);
}
static ClutterActor *
@@ -1980,13 +2000,11 @@ clutter_stage_finalize (GObject *object)
}
static void
clutter_stage_real_paint_view (ClutterStage *stage,
ClutterStageView *view)
clutter_stage_real_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
{
ClutterStagePrivate *priv = stage->priv;
const cairo_rectangle_int_t *clip = &priv->view_clip;
clutter_stage_do_paint_view (stage, view, clip);
clutter_stage_do_paint_view (stage, view, redraw_clip);
}
static void
@@ -2212,6 +2230,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
* ClutterStage::paint-view:
* @stage: the stage that received the event
* @view: a #ClutterStageView
* @redraw_clip: a #cairo_region_t with the redraw clip
*
* The ::paint-view signal is emitted before a #ClutterStageView is being
* painted.
@@ -2226,8 +2245,9 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, paint_view),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE_VIEW);
G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW,
G_TYPE_POINTER);
/**
* ClutterStage::presented: (skip)
@@ -2803,13 +2823,17 @@ clutter_stage_read_pixels (ClutterStage *stage,
.height = height,
});
cairo_region_get_extents (clip, &clip_rect);
cairo_region_destroy (clip);
if (clip_rect.width == 0 || clip_rect.height == 0)
return NULL;
{
cairo_region_destroy (clip);
return NULL;
}
framebuffer = clutter_stage_view_get_framebuffer (view);
clutter_stage_do_paint_view (stage, view, &clip_rect);
clutter_stage_do_paint_view (stage, view, clip);
cairo_region_destroy (clip);
view_scale = clutter_stage_view_get_scale (view);
pixel_width = roundf (clip_rect.width * view_scale);
@@ -4316,7 +4340,6 @@ capture_view (ClutterStage *stage,
texture_width, texture_height);
cairo_surface_set_device_scale (image, view_scale, view_scale);
data = cairo_image_surface_get_data (image);
stride = cairo_image_surface_get_stride (image);
@@ -4450,8 +4473,12 @@ capture_view_into (ClutterStage *stage,
if (paint)
{
cairo_region_t *region;
_clutter_stage_maybe_setup_viewport (stage, view);
clutter_stage_do_paint_view (stage, view, rect);
region = cairo_region_create_rectangle (rect);
clutter_stage_do_paint_view (stage, view, region);
cairo_region_destroy (region);
}
view_scale = clutter_stage_view_get_scale (view);
@@ -4477,49 +4504,42 @@ capture_view_into (ClutterStage *stage,
cogl_object_unref (bitmap);
}
static ClutterStageView *
get_view_at_rect (ClutterStage *stage,
cairo_rectangle_int_t *rect)
{
ClutterStagePrivate *priv = stage->priv;
GList *views = _clutter_stage_window_get_views (priv->impl);
GList *l;
for (l = views; l; l = l->next)
{
ClutterStageView *view = l->data;
cairo_rectangle_int_t view_layout;
cairo_region_t *region;
cairo_rectangle_int_t view_capture_rect;
clutter_stage_view_get_layout (view, &view_layout);
region = cairo_region_create_rectangle (&view_layout);
cairo_region_intersect_rectangle (region, rect);
cairo_region_get_extents (region, &view_capture_rect);
cairo_region_destroy (region);
if (view_capture_rect.width == 0 || view_capture_rect.height == 0)
continue;
g_assert (view_capture_rect.width == rect->width &&
view_capture_rect.height == rect->height);
return view;
}
return NULL;
}
void
clutter_stage_capture_into (ClutterStage *stage,
gboolean paint,
cairo_rectangle_int_t *rect,
uint8_t *data)
{
ClutterStageView *view;
ClutterStagePrivate *priv = stage->priv;
GList *l;
int bpp = 4;
int stride;
view = get_view_at_rect (stage, rect);
capture_view_into (stage, paint, view, rect, data, rect->width * bpp);
stride = rect->width * 4;
for (l = _clutter_stage_window_get_views (priv->impl); l; l = l->next)
{
ClutterStageView *view = l->data;
cairo_rectangle_int_t view_layout;
cairo_region_t *region;
cairo_rectangle_int_t capture_rect;
int x_offset, y_offset;
clutter_stage_view_get_layout (view, &view_layout);
region = cairo_region_create_rectangle (&view_layout);
cairo_region_intersect_rectangle (region, rect);
cairo_region_get_extents (region, &capture_rect);
cairo_region_destroy (region);
x_offset = capture_rect.x - rect->x;
y_offset = capture_rect.y - rect->y;
capture_view_into (stage, paint, view,
&capture_rect,
data + (x_offset * bpp) + (y_offset * stride),
stride);
}
}
/**

View File

@@ -84,8 +84,9 @@ struct _ClutterStageClass
gboolean (* delete_event) (ClutterStage *stage,
ClutterEvent *event);
void (* paint_view) (ClutterStage *stage,
ClutterStageView *view);
void (* paint_view) (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip);
/*< private >*/
/* padding for future expansion */
@@ -205,8 +206,6 @@ guchar * clutter_stage_read_pixels (ClutterStage
gint width,
gint height);
CLUTTER_EXPORT
cairo_region_t * clutter_stage_get_redraw_clip (ClutterStage *stage);
CLUTTER_EXPORT
void clutter_stage_ensure_viewport (ClutterStage *stage);
CLUTTER_EXPORT

View File

@@ -214,6 +214,16 @@ _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1,
}
}
gboolean
clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2)
{
return ((src1->x == src2->x) &&
(src1->y == src2->y) &&
(src1->width == src2->width) &&
(src1->height == src2->height));
}
float
_clutter_util_matrix_determinant (const ClutterMatrix *matrix)
{

View File

@@ -49,6 +49,8 @@
#include "cogl/cogl-trace.h"
#define MAX_STACK_RECTS 256
typedef struct _ClutterStageViewCoglPrivate
{
/*
@@ -288,97 +290,6 @@ clutter_stage_cogl_resize (ClutterStageWindow *stage_window,
{
}
static gboolean
clutter_stage_cogl_has_redraw_clips (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* NB: at the start of each new frame there is an implied clip that
* clips everything (i.e. nothing would be drawn) so we need to make
* sure we return True in the un-initialized case here.
*/
if (!stage_cogl->initialized_redraw_clip ||
(stage_cogl->initialized_redraw_clip &&
stage_cogl->redraw_clip))
return TRUE;
else
return FALSE;
}
static gboolean
clutter_stage_cogl_ignoring_redraw_clips (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* NB: a NULL clip means a full stage redraw is required */
if (stage_cogl->initialized_redraw_clip &&
!stage_cogl->redraw_clip)
return TRUE;
else
return FALSE;
}
/* A redraw clip represents (in stage coordinates) the bounding box of
* something that needs to be redrawn. Typically they are added to the
* StageWindow as a result of clutter_actor_queue_clipped_redraw() by
* actors such as ClutterGLXTexturePixmap. All redraw clips are
* discarded after the next paint.
*
* A NULL stage_clip means the whole stage needs to be redrawn.
*
* What we do with this information:
* - we keep track of the bounding box for all redraw clips
* - when we come to redraw; we scissor the redraw to that box and use
* glBlitFramebuffer to present the redraw to the front
* buffer.
*/
static void
clutter_stage_cogl_add_redraw_clip (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *stage_clip)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* If we are already forced to do a full stage redraw then bail early */
if (clutter_stage_cogl_ignoring_redraw_clips (stage_window))
return;
/* A NULL stage clip means a full stage redraw has been queued and
* we keep track of this by setting a NULL redraw_clip.
*/
if (stage_clip == NULL)
{
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->initialized_redraw_clip = TRUE;
return;
}
/* Ignore requests to add degenerate/empty clip rectangles */
if (stage_clip->width == 0 || stage_clip->height == 0)
return;
if (!stage_cogl->redraw_clip)
{
stage_cogl->redraw_clip = cairo_region_create_rectangle (stage_clip);
}
else
{
cairo_region_union_rectangle (stage_cogl->redraw_clip, stage_clip);
}
stage_cogl->initialized_redraw_clip = TRUE;
}
static cairo_region_t *
clutter_stage_cogl_get_redraw_clip (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
if (stage_cogl->using_clipped_redraw && stage_cogl->redraw_clip)
return cairo_region_copy (stage_cogl->redraw_clip);
return NULL;
}
static inline gboolean
valid_buffer_age (ClutterStageViewCogl *view_cogl,
int age)
@@ -395,7 +306,8 @@ valid_buffer_age (ClutterStageViewCogl *view_cogl,
static void
paint_damage_region (ClutterStageWindow *stage_window,
ClutterStageView *view,
cairo_region_t *swap_region)
cairo_region_t *swap_region,
cairo_region_t *queued_redraw_clip)
{
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
@@ -432,8 +344,7 @@ paint_damage_region (ClutterStageWindow *stage_window,
}
/* Red for the clip */
if (stage_cogl->initialized_redraw_clip &&
stage_cogl->redraw_clip)
if (queued_redraw_clip)
{
static CoglPipeline *overlay_red = NULL;
@@ -443,13 +354,13 @@ paint_damage_region (ClutterStageWindow *stage_window,
cogl_pipeline_set_color4ub (overlay_red, 0x33, 0x00, 0x00, 0x33);
}
n_rects = cairo_region_num_rectangles (stage_cogl->redraw_clip);
n_rects = cairo_region_num_rectangles (queued_redraw_clip);
for (i = 0; i < n_rects; i++)
{
cairo_rectangle_int_t rect;
float x_1, x_2, y_1, y_2;
cairo_region_get_rectangle (stage_cogl->redraw_clip, i, &rect);
cairo_region_get_rectangle (queued_redraw_clip, i, &rect);
x_1 = rect.x;
x_2 = rect.x + rect.width;
y_1 = rect.y;
@@ -466,13 +377,14 @@ static gboolean
swap_framebuffer (ClutterStageWindow *stage_window,
ClutterStageView *view,
cairo_region_t *swap_region,
gboolean swap_with_damage)
gboolean swap_with_damage,
cairo_region_t *queued_redraw_clip)
{
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
int *damage, n_rects, i;
if (G_UNLIKELY ((clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)))
paint_damage_region (stage_window, view, swap_region);
paint_damage_region (stage_window, view, swap_region, queued_redraw_clip);
n_rects = cairo_region_num_rectangles (swap_region);
damage = g_newa (int, n_rects * 4);
@@ -536,34 +448,52 @@ scale_and_clamp_rect (const graphene_rect_t *rect,
_clutter_util_rectangle_int_extents (&tmp, dest);
}
static cairo_region_t *
offset_scale_and_clamp_region (const cairo_region_t *region,
int offset_x,
int offset_y,
float scale)
{
int n_rects, i;
cairo_rectangle_int_t *rects;
g_autofree cairo_rectangle_int_t *freeme = NULL;
n_rects = cairo_region_num_rectangles (region);
if (n_rects == 0)
return cairo_region_create ();
if (n_rects < MAX_STACK_RECTS)
rects = g_newa (cairo_rectangle_int_t, n_rects);
else
rects = freeme = g_new (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
cairo_region_get_rectangle (region, i, &rects[i]);
for (i = 0; i < n_rects; i++)
{
graphene_rect_t tmp;
_clutter_util_rect_from_rectangle (&rects[i], &tmp);
graphene_rect_offset (&tmp, offset_x, offset_y);
scale_and_clamp_rect (&tmp, scale, &rects[i]);
}
return cairo_region_create_rectangles (rects, n_rects);
}
static void
paint_stage (ClutterStageCogl *stage_cogl,
ClutterStageView *view,
cairo_region_t *clip)
paint_stage (ClutterStageCogl *stage_cogl,
ClutterStageView *view,
cairo_region_t *redraw_clip)
{
ClutterStage *stage = stage_cogl->wrapper;
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t paint_rect;
cairo_rectangle_int_t view_rect;
graphene_rect_t rect;
float fb_scale;
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
cairo_region_get_extents (clip, &clip_rect);
_clutter_util_rect_from_rectangle (&clip_rect, &rect);
scale_and_clamp_rect (&rect, 1.0f / fb_scale, &paint_rect);
_clutter_util_rectangle_offset (&paint_rect,
view_rect.x,
view_rect.y,
&paint_rect);
_clutter_stage_maybe_setup_viewport (stage, view);
_clutter_stage_paint_view (stage, view, &paint_rect);
clutter_stage_paint_view (stage, view, redraw_clip);
clutter_stage_view_after_paint (view, &paint_rect);
clutter_stage_view_after_paint (view);
}
static void
@@ -683,7 +613,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
clutter_stage_view_cogl_get_instance_private (view_cogl);
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
cairo_rectangle_int_t view_rect;
gboolean have_clip;
gboolean is_full_redraw;
gboolean may_use_clipped_redraw;
gboolean use_clipped_redraw;
gboolean can_blit_sub_buffer;
@@ -691,7 +621,8 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
gboolean do_swap_buffer;
gboolean swap_with_damage;
ClutterActor *wrapper;
cairo_region_t *redraw_clip = NULL;
cairo_region_t *redraw_clip;
cairo_region_t *queued_redraw_clip;
cairo_region_t *fb_clip_region;
cairo_region_t *swap_region;
cairo_rectangle_int_t redraw_rect;
@@ -713,55 +644,34 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
has_buffer_age = cogl_is_onscreen (fb) && is_buffer_age_enabled ();
redraw_clip = clutter_stage_view_take_redraw_clip (view);
/* NB: a NULL redraw clip == full stage redraw */
if (!stage_cogl->redraw_clip)
have_clip = FALSE;
if (!redraw_clip)
is_full_redraw = TRUE;
else
{
cairo_region_t *view_region;
redraw_clip = cairo_region_copy (stage_cogl->redraw_clip);
view_region = cairo_region_create_rectangle (&view_rect);
cairo_region_intersect (redraw_clip, view_region);
have_clip = !cairo_region_equal (redraw_clip, view_region);
cairo_region_destroy (view_region);
}
is_full_redraw = FALSE;
may_use_clipped_redraw = FALSE;
if (_clutter_stage_window_can_clip_redraws (stage_window) &&
(can_blit_sub_buffer || has_buffer_age) &&
have_clip &&
!is_full_redraw &&
/* some drivers struggle to get going and produce some junk
* frames when starting up... */
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3)
{
graphene_rect_t rect;
cairo_rectangle_int_t *rects;
int n_rects, i;
may_use_clipped_redraw = TRUE;
fb_clip_region = cairo_region_create ();
n_rects = cairo_region_num_rectangles (redraw_clip);
rects = g_new (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_rectangle_int_t new_fb_clip_rect;
cairo_region_get_rectangle (redraw_clip, i, &rects[i]);
_clutter_util_rect_from_rectangle (&rects[i], &rect);
graphene_rect_offset (&rect, -view_rect.x, -view_rect.y);
scale_and_clamp_rect (&rect, fb_scale, &new_fb_clip_rect);
cairo_region_union_rectangle (fb_clip_region, &new_fb_clip_rect);
}
g_free (rects);
fb_clip_region = offset_scale_and_clamp_region (redraw_clip,
-view_rect.x,
-view_rect.y,
fb_scale);
if (fb_scale != floorf (fb_scale))
{
int n_rects, i;
cairo_rectangle_int_t *rects;
subpixel_compensation = ceilf (fb_scale);
n_rects = cairo_region_num_rectangles (fb_clip_region);
@@ -780,12 +690,20 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else
{
cairo_rectangle_int_t rect = { 0, 0, view_rect.width, view_rect.height };
fb_clip_region = cairo_region_create_rectangle (&rect);
cairo_rectangle_int_t fb_rect;
fb_rect = (cairo_rectangle_int_t) {
.width = fb_width,
.height = fb_height,
};
fb_clip_region = cairo_region_create_rectangle (&fb_rect);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
redraw_clip = cairo_region_copy (fb_clip_region);
redraw_clip = cairo_region_create_rectangle (&view_rect);
}
queued_redraw_clip = cairo_region_copy (redraw_clip);
if (may_use_clipped_redraw &&
G_LIKELY (!(clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS)))
use_clipped_redraw = TRUE;
@@ -805,35 +723,37 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
if (valid_buffer_age (view_cogl, age))
{
graphene_rect_t rect;
cairo_rectangle_int_t damage_region;
cairo_rectangle_int_t *rects;
int n_rects, i;
cairo_region_t *fb_damage;
cairo_region_t *view_damage;
int i;
fill_current_damage_history (view, fb_clip_region);
fb_damage = cairo_region_create ();
for (i = 1; i <= age; i++)
{
cairo_region_t *fb_damage =
view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
cairo_region_union (fb_clip_region, fb_damage);
int damage_index;
damage_index = DAMAGE_HISTORY (view_priv->damage_index - i - 1);
cairo_region_union (fb_damage,
view_priv->damage_history[damage_index]);
}
/* Update the redraw clip state with the extra damage. */
n_rects = cairo_region_num_rectangles (fb_clip_region);
rects = g_newa (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_region_get_rectangle (fb_clip_region, i, &rects[i]);
_clutter_util_rect_from_rectangle (&rects[i], &rect);
scale_and_clamp_rect (&rect, 1.0f / fb_scale, &damage_region);
_clutter_util_rectangle_offset (&damage_region,
view_rect.x,
view_rect.y,
&damage_region);
cairo_region_union_rectangle (stage_cogl->redraw_clip,
&damage_region);
}
/* Update the fb clip region with the extra damage. */
cairo_region_union (fb_clip_region, fb_damage);
view_damage = offset_scale_and_clamp_region (fb_damage,
0, 0,
1.0f / fb_scale);
cairo_region_translate (view_damage, view_rect.x, view_rect.y);
cairo_region_intersect_rectangle (view_damage, &view_rect);
/* Update the redraw clip region with the extra damage. */
cairo_region_union (redraw_clip, view_damage);
cairo_region_destroy (view_damage);
cairo_region_destroy (fb_damage);
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: num rects: %d\n",
age,
@@ -879,8 +799,6 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t scissor_rect;
stage_cogl->using_clipped_redraw = TRUE;
if (cairo_region_num_rectangles (fb_clip_region) == 1)
{
cairo_region_get_extents (fb_clip_region, &clip_rect);
@@ -908,11 +826,9 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_framebuffer_push_region_clip (fb, fb_clip_region);
}
paint_stage (stage_cogl, view, fb_clip_region);
paint_stage (stage_cogl, view, redraw_clip);
cogl_framebuffer_pop_clip (fb);
stage_cogl->using_clipped_redraw = FALSE;
}
else
{
@@ -940,24 +856,13 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view, fb_clip_region);
paint_stage (stage_cogl, view, redraw_clip);
cogl_framebuffer_pop_clip (fb);
}
else
{
cairo_rectangle_int_t clip;
cairo_region_t *view_region;
clip = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = ceilf (view_rect.width * fb_scale),
.height = ceilf (view_rect.height * fb_scale)
};
view_region = cairo_region_create_rectangle (&clip);
paint_stage (stage_cogl, view, view_region);
cairo_region_destroy (view_region);
paint_stage (stage_cogl, view, redraw_clip);
}
}
@@ -1028,10 +933,9 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
do_swap_buffer = TRUE;
}
if (redraw_clip)
cairo_region_destroy (redraw_clip);
if (fb_clip_region)
cairo_region_destroy (fb_clip_region);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
g_clear_pointer (&queued_redraw_clip, cairo_region_destroy);
g_clear_pointer (&fb_clip_region, cairo_region_destroy);
if (do_swap_buffer)
{
@@ -1054,7 +958,8 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
res = swap_framebuffer (stage_window,
view,
swap_region,
swap_with_damage);
swap_with_damage,
queued_redraw_clip);
cairo_region_destroy (swap_region);
@@ -1079,8 +984,10 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
{
ClutterStageView *view = l->data;
swap_event =
clutter_stage_cogl_redraw_view (stage_window, view) || swap_event;
if (!clutter_stage_view_has_redraw_clip (view))
continue;
swap_event |= clutter_stage_cogl_redraw_view (stage_window, view);
}
_clutter_stage_emit_after_paint (stage_cogl->wrapper);
@@ -1096,10 +1003,6 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
stage_cogl->pending_swaps++;
}
/* reset the redraw clipping for the next paint... */
stage_cogl->initialized_redraw_clip = FALSE;
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->frame_count++;
COGL_TRACE_END (ClutterStageCoglRedraw);
@@ -1117,10 +1020,6 @@ clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
iface->schedule_update = clutter_stage_cogl_schedule_update;
iface->get_update_time = clutter_stage_cogl_get_update_time;
iface->clear_update_time = clutter_stage_cogl_clear_update_time;
iface->add_redraw_clip = clutter_stage_cogl_add_redraw_clip;
iface->has_redraw_clips = clutter_stage_cogl_has_redraw_clips;
iface->ignoring_redraw_clips = clutter_stage_cogl_ignoring_redraw_clips;
iface->get_redraw_clip = clutter_stage_cogl_get_redraw_clip;
iface->redraw = clutter_stage_cogl_redraw;
}

View File

@@ -55,14 +55,6 @@ struct _ClutterStageCogl
unsigned int frame_count;
gint last_sync_delay;
cairo_region_t *redraw_clip;
guint initialized_redraw_clip : 1;
/* TRUE if the current paint cycle has a clipped redraw. In that
case bounding_redraw_clip specifies the the bounds. */
guint using_clipped_redraw : 1;
};
struct _ClutterStageCoglClass

View File

@@ -0,0 +1,94 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2020 Endless, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*/
#include "cogl-config.h"
#include "cogl-dma-buf-handle.h"
#include "cogl-object.h"
#include <unistd.h>
struct _CoglDmaBufHandle
{
CoglFramebuffer *framebuffer;
int dmabuf_fd;
gpointer user_data;
GDestroyNotify destroy_func;
};
CoglDmaBufHandle *
cogl_dma_buf_handle_new (CoglFramebuffer *framebuffer,
int dmabuf_fd,
gpointer user_data,
GDestroyNotify destroy_func)
{
CoglDmaBufHandle *dmabuf_handle;
g_assert (framebuffer);
g_assert (dmabuf_fd != -1);
dmabuf_handle = g_new0 (CoglDmaBufHandle, 1);
dmabuf_handle->framebuffer = cogl_object_ref (framebuffer);
dmabuf_handle->dmabuf_fd = dmabuf_fd;
dmabuf_handle->user_data = user_data;
dmabuf_handle->destroy_func = destroy_func;
return dmabuf_handle;
}
void
cogl_dma_buf_handle_free (CoglDmaBufHandle *dmabuf_handle)
{
g_return_if_fail (dmabuf_handle != NULL);
g_clear_pointer (&dmabuf_handle->framebuffer, cogl_object_unref);
if (dmabuf_handle->destroy_func)
g_clear_pointer (&dmabuf_handle->user_data, dmabuf_handle->destroy_func);
if (dmabuf_handle->dmabuf_fd != -1)
close (dmabuf_handle->dmabuf_fd);
g_free (dmabuf_handle);
}
CoglFramebuffer *
cogl_dma_buf_handle_get_framebuffer (CoglDmaBufHandle *dmabuf_handle)
{
return dmabuf_handle->framebuffer;
}
int
cogl_dma_buf_handle_get_fd (CoglDmaBufHandle *dmabuf_handle)
{
return dmabuf_handle->dmabuf_fd;
}

View File

@@ -0,0 +1,83 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2020 Endless, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*/
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL_DMA_BUF_HANDLE_H__
#define __COGL_DMA_BUF_HANDLE_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-framebuffer.h>
/**
* cogl_dma_buf_handle_new: (skip)
*/
CoglDmaBufHandle *
cogl_dma_buf_handle_new (CoglFramebuffer *framebuffer,
int dmabuf_fd,
gpointer data,
GDestroyNotify destroy_func);
/**
* cogl_dma_buf_handle_free: (skip)
*
* Releases @dmabuf_handle; it is a programming error to release
* an already released handle.
*/
void
cogl_dma_buf_handle_free (CoglDmaBufHandle *dmabuf_handle);
/**
* cogl_dma_buf_handle_get_framebuffer: (skip)
*
* Retrieves the #CoglFramebuffer, backed by an exported DMABuf buffer,
* of @dmabuf_handle.
*
* Returns: (transfer none): a #CoglFramebuffer
*/
CoglFramebuffer *
cogl_dma_buf_handle_get_framebuffer (CoglDmaBufHandle *dmabuf_handle);
/**
* cogl_dma_buf_handle_get_fd: (skip)
*
* Retrieves the file descriptor of @dmabuf_handle.
*
* Returns: a valid file descriptor
*/
int
cogl_dma_buf_handle_get_fd (CoglDmaBufHandle *dmabuf_handle);
#endif /* __COGL_DMA_BUF_HANDLE_H__ */

View File

@@ -93,6 +93,9 @@ struct _CoglDriverVtable
void
(* framebuffer_finish) (CoglFramebuffer *framebuffer);
void
(* framebuffer_flush) (CoglFramebuffer *framebuffer);
void
(* framebuffer_discard_buffers) (CoglFramebuffer *framebuffer,
unsigned long buffers);

View File

@@ -1396,6 +1396,17 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer)
ctx->driver_vtable->framebuffer_finish (framebuffer);
}
void
cogl_framebuffer_flush (CoglFramebuffer *framebuffer)
{
CoglContext *ctx = framebuffer->context;
_cogl_framebuffer_flush_journal (framebuffer);
ctx->driver_vtable->framebuffer_flush (framebuffer);
}
void
cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer)
{

View File

@@ -1555,6 +1555,18 @@ cogl_blit_framebuffer (CoglFramebuffer *src,
int height,
GError **error);
/**
* cogl_framebuffer_flush:
* @framebuffer: A #CoglFramebuffer pointer
*
* Flushes @framebuffer to ensure the current batch of commands is
* submitted to the GPU.
*
* Unlike cogl_framebuffer_finish(), this does not block the CPU.
*/
void
cogl_framebuffer_flush (CoglFramebuffer *framebuffer);
G_END_DECLS
#endif /* __COGL_FRAMEBUFFER_H */

View File

@@ -756,3 +756,17 @@ cogl_renderer_foreach_output (CoglRenderer *renderer,
for (l = renderer->outputs; l; l = l->next)
callback (l->data, user_data);
}
CoglDmaBufHandle *
cogl_renderer_create_dma_buf (CoglRenderer *renderer,
int width,
int height,
GError **error)
{
const CoglWinsysVtable *winsys = _cogl_renderer_get_winsys (renderer);
if (winsys->renderer_create_dma_buf)
return winsys->renderer_create_dma_buf (renderer, width, height, error);
return NULL;
}

View File

@@ -398,6 +398,27 @@ cogl_renderer_foreach_output (CoglRenderer *renderer,
CoglOutputCallback callback,
void *user_data);
/**
* cogl_renderer_create_dma_buf: (skip)
* @renderer: A #CoglRenderer
* @width: width of the new
* @height: height of the new
* @error: (nullable): return location for a #GError
*
* Creates a new #CoglFramebuffer with @width x @height, and format
* hardcoded to XRGB, and exports the new framebuffer's DMA buffer
* handle.
*
* Returns: (nullable)(transfer full): a #CoglDmaBufHandle. The
* return result must be released with cogl_dma_buf_handle_free()
* after use.
*/
CoglDmaBufHandle *
cogl_renderer_create_dma_buf (CoglRenderer *renderer,
int width,
int height,
GError **error);
G_END_DECLS
#endif /* __COGL_RENDERER_H__ */

View File

@@ -101,6 +101,14 @@ typedef int32_t CoglAngle;
typedef struct _CoglColor CoglColor;
typedef struct _CoglTextureVertex CoglTextureVertex;
/**
* CoglDmaBufHandle: (skip)
*
* An opaque type that tracks the lifetime of a DMA buffer fd. Release
* with cogl_dma_buf_handle_free().
*/
typedef struct _CoglDmaBufHandle CoglDmaBufHandle;
/* Enum declarations */
#define COGL_A_BIT (1 << 4)

View File

@@ -61,6 +61,7 @@
#include <cogl/cogl1-context.h>
#include <cogl/cogl-bitmap.h>
#include <cogl/cogl-color.h>
#include <cogl/cogl-dma-buf-handle.h>
#include <cogl/cogl-matrix.h>
#include <cogl/cogl-matrix-stack.h>
#include <cogl/cogl-offscreen.h>

View File

@@ -57,37 +57,26 @@ add_stencil_clip_rectangle (CoglFramebuffer *framebuffer,
float y_1,
float x_2,
float y_2,
gboolean first)
gboolean merge)
{
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (framebuffer);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
CoglMatrixEntry *old_projection_entry, *old_modelview_entry;
/* NB: This can be called while flushing the journal so we need
* to be very conservative with what state we change.
*/
old_projection_entry = g_steal_pointer (&ctx->current_projection_entry);
old_modelview_entry = g_steal_pointer (&ctx->current_modelview_entry);
_cogl_context_set_current_projection_entry (ctx,
projection_stack->last_entry);
_cogl_context_set_current_modelview_entry (ctx, modelview_entry);
ctx->current_projection_entry = projection_stack->last_entry;
ctx->current_modelview_entry = modelview_entry;
if (first)
{
GE( ctx, glEnable (GL_STENCIL_TEST) );
GE( ctx, glColorMask (FALSE, FALSE, FALSE, FALSE) );
GE( ctx, glDepthMask (FALSE) );
/* Initially disallow everything */
GE( ctx, glClearStencil (0) );
GE( ctx, glClear (GL_STENCIL_BUFFER_BIT) );
/* Punch out a hole to allow the rectangle */
GE( ctx, glStencilFunc (GL_NEVER, 0x1, 0x1) );
GE( ctx, glStencilOp (GL_REPLACE, GL_REPLACE, GL_REPLACE) );
_cogl_rectangle_immediate (framebuffer,
ctx->stencil_pipeline,
x_1, y_1, x_2, y_2);
}
else
if (merge)
{
/* Add one to every pixel of the stencil buffer in the
rectangle */
@@ -102,15 +91,36 @@ add_stencil_clip_rectangle (CoglFramebuffer *framebuffer,
rectangle are set will be valid */
GE( ctx, glStencilOp (GL_DECR, GL_DECR, GL_DECR) );
_cogl_context_set_current_projection_entry (ctx, &ctx->identity_entry);
_cogl_context_set_current_modelview_entry (ctx, &ctx->identity_entry);
ctx->current_projection_entry = &ctx->identity_entry;
ctx->current_modelview_entry = &ctx->identity_entry;
_cogl_rectangle_immediate (framebuffer,
ctx->stencil_pipeline,
-1.0, -1.0, 1.0, 1.0);
}
else
{
GE( ctx, glEnable (GL_STENCIL_TEST) );
GE( ctx, glStencilMask (0x1) );
/* Initially disallow everything */
GE( ctx, glClearStencil (0) );
GE( ctx, glClear (GL_STENCIL_BUFFER_BIT) );
/* Punch out a hole to allow the rectangle */
GE( ctx, glStencilFunc (GL_ALWAYS, 0x1, 0x1) );
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE) );
_cogl_rectangle_immediate (framebuffer,
ctx->stencil_pipeline,
x_1, y_1, x_2, y_2);
}
ctx->current_projection_entry = old_projection_entry;
ctx->current_modelview_entry = old_modelview_entry;
/* Restore the stencil mode */
GE( ctx, glDepthMask (TRUE) );
GE( ctx, glColorMask (TRUE, TRUE, TRUE, TRUE) );
GE( ctx, glStencilFunc (GL_EQUAL, 0x1, 0x1) );
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP) );
}
@@ -121,6 +131,7 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
gboolean merge)
{
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
CoglMatrixEntry *old_projection_entry, *old_modelview_entry;
CoglMatrix matrix;
int num_rectangles = cairo_region_num_rectangles (region);
int i;
@@ -129,8 +140,11 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
/* NB: This can be called while flushing the journal so we need
* to be very conservative with what state we change.
*/
_cogl_context_set_current_projection_entry (ctx, &ctx->identity_entry);
_cogl_context_set_current_modelview_entry (ctx, &ctx->identity_entry);
old_projection_entry = g_steal_pointer (&ctx->current_projection_entry);
old_modelview_entry = g_steal_pointer (&ctx->current_modelview_entry);
ctx->current_projection_entry = &ctx->identity_entry;
ctx->current_modelview_entry = &ctx->identity_entry;
/* The coordinates in the region are meant to be window coordinates,
* make a matrix that translates those across the viewport, and into
@@ -147,8 +161,6 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
- framebuffer->viewport_y,
0);
GE( ctx, glEnable (GL_STENCIL_TEST) );
GE( ctx, glColorMask (FALSE, FALSE, FALSE, FALSE) );
GE( ctx, glDepthMask (FALSE) );
@@ -159,6 +171,9 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
}
else
{
GE( ctx, glEnable (GL_STENCIL_TEST) );
GE( ctx, glStencilMask (0x1) );
/* Initially disallow everything */
GE( ctx, glClearStencil (0) );
GE( ctx, glClear (GL_STENCIL_BUFFER_BIT) );
@@ -224,6 +239,9 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
-1.0, -1.0, 1.0, 1.0);
}
ctx->current_projection_entry = old_projection_entry;
ctx->current_modelview_entry = old_modelview_entry;
/* Restore the stencil mode */
GE (ctx, glDepthMask (TRUE));
GE (ctx, glColorMask (TRUE, TRUE, TRUE, TRUE));
@@ -250,14 +268,16 @@ add_stencil_clip_silhouette (CoglFramebuffer *framebuffer,
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (framebuffer);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
CoglMatrixEntry *old_projection_entry, *old_modelview_entry;
/* NB: This can be called while flushing the journal so we need
* to be very conservative with what state we change.
*/
old_projection_entry = g_steal_pointer (&ctx->current_projection_entry);
old_modelview_entry = g_steal_pointer (&ctx->current_modelview_entry);
_cogl_context_set_current_projection_entry (ctx,
projection_stack->last_entry);
_cogl_context_set_current_modelview_entry (ctx, modelview_entry);
ctx->current_projection_entry = projection_stack->last_entry;
ctx->current_modelview_entry = modelview_entry;
_cogl_pipeline_flush_gl_state (ctx, ctx->stencil_pipeline,
framebuffer, FALSE, FALSE);
@@ -315,8 +335,8 @@ add_stencil_clip_silhouette (CoglFramebuffer *framebuffer,
/* Decrement all of the bits twice so that only pixels where the
value is 3 will remain */
_cogl_context_set_current_projection_entry (ctx, &ctx->identity_entry);
_cogl_context_set_current_modelview_entry (ctx, &ctx->identity_entry);
ctx->current_projection_entry = &ctx->identity_entry;
ctx->current_modelview_entry = &ctx->identity_entry;
_cogl_rectangle_immediate (framebuffer, ctx->stencil_pipeline,
-1.0, -1.0, 1.0, 1.0);
@@ -324,6 +344,9 @@ add_stencil_clip_silhouette (CoglFramebuffer *framebuffer,
-1.0, -1.0, 1.0, 1.0);
}
ctx->current_projection_entry = old_projection_entry;
ctx->current_modelview_entry = old_modelview_entry;
GE (ctx, glStencilMask (~(GLuint) 0));
GE (ctx, glDepthMask (TRUE));
GE (ctx, glColorMask (TRUE, TRUE, TRUE, TRUE));
@@ -491,7 +514,7 @@ _cogl_clip_stack_gl_flush (CoglClipStack *stack,
rect->y0,
rect->x1,
rect->y1,
!using_stencil_buffer);
using_stencil_buffer);
using_stencil_buffer = TRUE;
}
break;

View File

@@ -61,6 +61,9 @@ _cogl_framebuffer_gl_query_bits (CoglFramebuffer *framebuffer,
void
_cogl_framebuffer_gl_finish (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_gl_flush (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_gl_discard_buffers (CoglFramebuffer *framebuffer,
unsigned long buffers);

View File

@@ -1031,6 +1031,12 @@ _cogl_framebuffer_gl_finish (CoglFramebuffer *framebuffer)
GE (framebuffer->context, glFinish ());
}
void
_cogl_framebuffer_gl_flush (CoglFramebuffer *framebuffer)
{
GE (framebuffer->context, glFlush ());
}
void
_cogl_framebuffer_gl_discard_buffers (CoglFramebuffer *framebuffer,
unsigned long buffers)

View File

@@ -554,6 +554,7 @@ _cogl_driver_gl =
_cogl_framebuffer_gl_clear,
_cogl_framebuffer_gl_query_bits,
_cogl_framebuffer_gl_finish,
_cogl_framebuffer_gl_flush,
_cogl_framebuffer_gl_discard_buffers,
_cogl_framebuffer_gl_draw_attributes,
_cogl_framebuffer_gl_draw_indexed_attributes,

View File

@@ -403,6 +403,7 @@ _cogl_driver_gles =
_cogl_framebuffer_gl_clear,
_cogl_framebuffer_gl_query_bits,
_cogl_framebuffer_gl_finish,
_cogl_framebuffer_gl_flush,
_cogl_framebuffer_gl_discard_buffers,
_cogl_framebuffer_gl_draw_attributes,
_cogl_framebuffer_gl_draw_indexed_attributes,

View File

@@ -78,6 +78,7 @@ _cogl_driver_nop =
_cogl_framebuffer_nop_clear,
_cogl_framebuffer_nop_query_bits,
_cogl_framebuffer_nop_finish,
_cogl_framebuffer_nop_flush,
_cogl_framebuffer_nop_discard_buffers,
_cogl_framebuffer_nop_draw_attributes,
_cogl_framebuffer_nop_draw_indexed_attributes,

View File

@@ -64,6 +64,9 @@ _cogl_framebuffer_nop_query_bits (CoglFramebuffer *framebuffer,
void
_cogl_framebuffer_nop_finish (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_nop_flush (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_nop_discard_buffers (CoglFramebuffer *framebuffer,
unsigned long buffers);

View File

@@ -76,6 +76,11 @@ _cogl_framebuffer_nop_finish (CoglFramebuffer *framebuffer)
{
}
void
_cogl_framebuffer_nop_flush (CoglFramebuffer *framebuffer)
{
}
void
_cogl_framebuffer_nop_discard_buffers (CoglFramebuffer *framebuffer,
unsigned long buffers)

View File

@@ -96,6 +96,7 @@ cogl_nonintrospected_headers = [
'cogl-renderer.h',
'cogl-swap-chain.h',
'cogl-onscreen-template.h',
'cogl-dma-buf-handle.h',
'cogl-display.h',
'cogl-snippet.h',
'cogl-index-buffer.h',
@@ -203,6 +204,7 @@ cogl_sources = [
'cogl-i18n-private.h',
'cogl-debug.h',
'cogl-debug-options.h',
'cogl-dma-buf-handle.c',
'cogl-gpu-info.c',
'cogl-gpu-info-private.h',
'cogl-context-private.h',

View File

@@ -91,6 +91,12 @@ typedef struct _CoglWinsysVtable
void
(*display_destroy) (CoglDisplay *display);
CoglDmaBufHandle *
(*renderer_create_dma_buf) (CoglRenderer *renderer,
int width,
int height,
GError **error);
gboolean
(*context_init) (CoglContext *context, GError **error);

View File

@@ -67,3 +67,6 @@
/* Either <sys/random.h> or <linux/random.h> */
#mesondefine HAVE_SYS_RANDOM
#mesondefine HAVE_LINUX_RANDOM
/* Whether Xwayland has -initfd option */
#mesondefine HAVE_XWAYLAND_INITFD

View File

@@ -137,6 +137,16 @@
</description>
</key>
<key name="check-alive-timeout" type="u">
<default>5000</default>
<summary>Timeout for check-alive ping</summary>
<description>
Number of milliseconds a client has to respond to a ping request in
order to not be detected as frozen. Using 0 will disable the alive check
completely.
</description>
</key>
<child name="keybindings" schema="org.gnome.mutter.keybindings"/>
</schema>

View File

@@ -227,7 +227,7 @@ are used for different purposes:
Examples of where each are used:
- If a window is simultaneously moved and resized to the southeast corner
with SouthEastGravity, but it turns out that the window was sized to
with META_GRAVITY_SOUTH_EAST, but it turns out that the window was sized to
something smaller than the minimum size hint, then the size_hints
constraint should resize the window using the resize_gravity to ensure
that the southeast corner doesn't move.

View File

@@ -1,5 +1,5 @@
project('mutter', 'c',
version: '3.35.91',
version: '3.35.92',
meson_version: '>= 0.50.0',
license: 'GPLv2+'
)
@@ -43,14 +43,17 @@ gudev_req = '>= 232'
# wayland version requirements
wayland_server_req = '>= 1.13.0'
wayland_protocols_req = '>= 1.18'
wayland_protocols_req = '>= 1.19'
# native backend version requirements
libinput_req = '>= 1.7'
gbm_req = '>= 10.3'
# screen cast version requirements
libpipewire_req = '>= 0.2.5'
libpipewire_req = '>= 0.3.0'
# profiler requirements
sysprof_req = '>= 3.35.2'
gnome = import('gnome')
pkg = import('pkgconfig')
@@ -127,6 +130,7 @@ xau_dep = dependency('xau')
ice_dep = dependency('ice')
atk_dep = dependency('atk', version: atk_req)
libcanberra_dep = dependency('libcanberra', version: libcanberra_req)
dbus_dep = dependency('dbus-1')
# For now always require X11 support
have_x11 = true
@@ -241,7 +245,7 @@ endif
have_remote_desktop = get_option('remote_desktop')
if have_remote_desktop
libpipewire_dep = dependency('libpipewire-0.2', version: libpipewire_req)
libpipewire_dep = dependency('libpipewire-0.3', version: libpipewire_req)
endif
have_introspection = get_option('introspection')
@@ -275,7 +279,7 @@ endif
have_profiler = get_option('profiler')
if have_profiler
sysprof_dep = dependency('sysprof-capture-3')
sysprof_dep = dependency('sysprof-capture-3', version: sysprof_req)
endif
required_functions = [
@@ -373,6 +377,7 @@ if cc.has_header_symbol('sys/prctl.h', 'prctl')
cdata.set('HAVE_SYS_PRCTL', 1)
endif
have_xwayland_initfd = false
if have_wayland
xwayland_path = get_option('xwayland_path')
if xwayland_path == ''
@@ -388,6 +393,19 @@ if have_wayland
else
error('Required function getrandom not found')
endif
# For Xwayland -initfd usage
use_initfd = get_option('xwayland_initfd')
if use_initfd.auto()
xwayland_options = run_command(xwayland_path, '-help')
have_xwayland_initfd = xwayland_options.stderr().contains('-initfd')
else
have_xwayland_initfd = use_initfd.enabled()
endif
if (have_xwayland_initfd)
cdata.set('HAVE_XWAYLAND_INITFD', 1)
endif
endif
xwayland_grab_default_access_rules = get_option('xwayland_grab_default_access_rules')
@@ -446,6 +464,7 @@ output = [
' Startup notification..... ' + have_startup_notification.to_string(),
' Introspection............ ' + have_introspection.to_string(),
' Profiler................. ' + have_profiler.to_string(),
' Xwayland initfd.......... ' + have_xwayland_initfd.to_string(),
'',
' Tests:',
'',

View File

@@ -152,3 +152,9 @@ option('xwayland_grab_default_access_rules',
value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr',
description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in Xwayland'
)
option('xwayland_initfd',
type: 'feature',
value: 'auto',
description: 'Whether Xwayland -initfd argument is used'
)

View File

@@ -6,14 +6,14 @@
# Petr Tomeš <ptomes@gmail.com>, 2006.
# Jakub Friedl <jfriedl@suse.cz>, 2006, 2007.
# Petr Kovar <pknbe@volny.cz>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
# Marek Černocký <marek@manet.cz>, 2012, 2013, 2014, 2016, 2017, 2018, 2019.
# Marek Černocký <marek@manet.cz>, 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-09-03 22:19+0200\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-26 14:10+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
@@ -423,19 +423,31 @@ msgstr "Modifikátor ke zjištění pozice ukazatele"
msgid "This key will initiate the “locate pointer” action."
msgstr "Tato klávesa spustí činnost „zjisti polohu ukazatele“."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Časový limit pro pingání check-alive"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Počet milisekund, které má klient na odpověď na na kontrolní pingnutí "
"sloužící k detekci, jestli nazatuhl. Nastavením na 0 se kontrola zcela vypne."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Vybrat okno z překryvné nabídky tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Zrušit překryvné okno tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Přepnout nastavení monitoru"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Postupně mění vestavěná nastavení monitoru"
@@ -509,15 +521,15 @@ msgid ""
"white-listed in key “xwayland-grab-access-rules”."
msgstr ""
"Umožňujs směrovat všechny události klávesnice do oken X11 typu „přebytí "
"přesměrování“ pomocí zachytávání při běhu Xwaylandu. Tato volba je určena pro "
"podporu klientů X11, kteří mapují okna „přebytí přesměrování“ (která "
"přesměrování“ pomocí zachytávání při běhu Xwaylandu. Tato volba je určena "
"pro podporu klientů X11, kteří mapují okna „přebytí přesměrování“ (která "
"nepřijímají zaměření klávesnice) a vynucuje zachytávání klávesnice zasílat "
"všechny události klávesnice do těchto oken. Tato volba je využívána jen "
"zřídka a nemá žádný vliv na běžná okna X11, která mohou přijímat zaměření "
"klávesnice za normálních podmínek. Aby bylo pod Waylandem zachytávání bráno v "
"úvahu, musí klient navíc buď poslat specifickou zprávu X11 ClientMessage do "
"kořenového okna, nebo být mezi aplikacemi na bílé listině v klíči „xwayland-"
"grab-access-rules“."
"klávesnice za normálních podmínek. Aby bylo pod Waylandem zachytávání bráno "
"v úvahu, musí klient navíc buď poslat specifickou zprávu X11 ClientMessage "
"do kořenového okna, nebo být mezi aplikacemi na bílé listině v klíči "
"„xwayland-grab-access-rules“."
#: data/org.gnome.mutter.wayland.gschema.xml.in:84
msgid "Xwayland applications allowed to issue keyboard grabs"
@@ -551,7 +563,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Přepínač režimu (skupina %d)"
@@ -559,11 +571,11 @@ msgstr "Přepínač režimu (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Přepnout monitor"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Zobrazit nápovědu na obrazovce"
@@ -595,13 +607,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Kompozitor"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -611,47 +623,47 @@ msgstr "Jiný kompozitní správce již běží na obrazovce %i displeje „%s
msgid "Bell event"
msgstr "Událost zvonku"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Zakázat připojení ke správci sezení"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Nahradí běžícího správce oken"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Určit ID správy sezení"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Displej X, který se má použít"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Spustit sezení z uloženého souboru"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Provádět volání X synchronně"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Spustit jako kompozitor protokolu Wayland"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Spustit jako podkladový kompozitor"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Spustit kompozitor wayland bez spuštění Xwayland"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Spustit jako plnohodnotný server displeje, nikoliv vnořeně"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Spustit se serverem X11"
@@ -705,21 +717,21 @@ msgstr "Vypsat verzi"
msgid "Mutter plugin to use"
msgstr "Zásuvný modul Mutter, který se má použít"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Plocha %d"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter bylo přeloženo bez podpory podrobného režimu\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Přepínač režimu: režim %d"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -728,21 +740,21 @@ msgstr ""
"Displej „%s“ již správce oken má; zkuste prosím nahradit aktuálního správce "
"oken pomocí přepínače --replace."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Selhala inicializace GDK\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Nelze otevřít displej X Window System „%s“\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Obrazovka %d na displeji „%s“ je neplatná\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Formát %s není podporován"

View File

@@ -20,8 +20,8 @@ msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-10-02 04:01+0000\n"
"PO-Revision-Date: 2019-10-03 19:37+0200\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-27 18:56+0100\n"
"Last-Translator: Alan Mortensen <alanmortensen.am@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
@@ -432,20 +432,33 @@ msgstr "Modifikationstast til at finde markøren"
msgid "This key will initiate the “locate pointer” action."
msgstr "Denne tast starter handlingen “find markør”."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Tidsudløb for kontrolping"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Antal millisekunder en klient har til at svare på en pingforespørgsel for "
"ikke at blive registreret som frosset. Med 0 vil forespørgslen være helt "
"deaktiveret."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Vælg vindue fra tab-pop-op"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Annullér faneblads-pop-op"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Skift skærmkonfiguration"
# Mærkelig ting at rotere. De mener nok at skifte cyclisk mellem nogle stykker, men "built-in"?
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Roterer den indbyggede skærmkonfiguration"
@@ -559,7 +572,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2532
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Tilstandsskift (Gruppe %d)"
@@ -567,11 +580,11 @@ msgstr "Tilstandsskift (Gruppe %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2555
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Skift skærm"
#: src/backends/meta-input-settings.c:2557
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Vis integreret hjælp"
@@ -603,13 +616,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Kompositor"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:509
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -712,7 +725,7 @@ msgstr "Vis version"
msgid "Mutter plugin to use"
msgstr "Mutter-udvidelsesmodul der skal bruges"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Arbejdsområde %d"
@@ -726,7 +739,7 @@ msgstr "Mutter blev kompileret uden understøttelse for uddybende tilstand\n"
msgid "Mode Switch: Mode %d"
msgstr "Tilstandsskift: Tilstand %d"
#: src/x11/meta-x11-display.c:679
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -735,21 +748,21 @@ msgstr ""
"Terminalen “%s” har allerede en vindueshåndtering; prøv tilvalget --replace "
"for at erstatte den aktuelle vindueshåndtering."
#: src/x11/meta-x11-display.c:1040
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Kunne ikke klargøre GDK\n"
#: src/x11/meta-x11-display.c:1064
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Kunne ikke åbne X Window System-terminalen “%s”\n"
#: src/x11/meta-x11-display.c:1147
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Skærm %d på terminal “%s” er ugyldig\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Formatet %s understøttes ikke"

View File

@@ -7,14 +7,14 @@
# Pablo Gonzalo del Campo <pablodc@bigfoot.com>,2002,2003.
# Francisco Javier F. Serrador <serrador@cvs.gnome.org>, 2004, 2005, 2006.
# Jorge González <jorgegonz@svn.gnome.org>, 2007, 2008, 2009, 2010, 2011.
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011-2019.
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011-2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-08-20 12:23+0200\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-24 13:15+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Spanish - Spain <gnome-es-list@gnome.org>\n"
"Language: es_ES\n"
@@ -22,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 3.32.1\n"
"X-Generator: Gtranslator 3.34.0\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -397,18 +397,6 @@ msgid "Enable experimental features"
msgstr "Activar las características experimentales"
#: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “scale-monitor-"
#| "framebuffer” — makes mutter default to layout logical monitors in a "
#| "logical pixel coordinate space, while scaling monitor framebuffers "
#| "instead of window content, to manage HiDPI monitors. Does not require a "
#| "restart. • “rt-scheduler” — makes mutter request a low priority real-time "
#| "scheduling. The executable or user must have CAP_SYS_NICE. Requires a "
#| "restart."
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
@@ -444,19 +432,31 @@ msgstr "Modificador que usar para encontrar el puntero"
msgid "This key will initiate the “locate pointer” action."
msgstr "Esta tecla iniciará la acción de encontrar el puntero."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Tiempo de espera para la comprobación de ping"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Número de milisegundos que tiene un cliente para responder a ping y que no "
"se le detecte como caído. Usar 0 desactivará esta comprobación."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Seleccionar ventana de la pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Cancelar pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Cambiar la configuración del monitor"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Rota la configuración del monitor empotrado"
@@ -570,7 +570,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Cambiar modo (grupo %d)"
@@ -578,11 +578,11 @@ msgstr "Cambiar modo (grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Mostrar la ayuda en pantalla"
@@ -614,13 +614,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Compositor"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -632,47 +632,47 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de campana"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Desactivar conexión al gestor de sesión"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Reemplazar el gestor de ventanas en ejecución"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Especificar el ID se gestión de sesión"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Pantalla X que usar"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Inicializar sesión desde el archivo de salvaguarda"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Hacer que las llamadas a las X sean síncronas"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Ejecutar como compositor Wayland"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Ejecutar como compositor anidado"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Ejecutar el compositor wayland sin iniciar Xwayland"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Ejecutar como servidor completo, en lugar de anidado"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Ejecutar con «backend» de X11"
@@ -726,21 +726,21 @@ msgstr "Imprimir versión"
msgid "Mutter plugin to use"
msgstr "Complemento de mutter que usar"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Área de trabajo %d"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter fue compilado sin soporte para modo prolijo\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Cambiar modo: modo %d"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -749,21 +749,21 @@ msgstr ""
"La pantalla «%s» ya tiene un gestor de ventanas; pruebe a usar la opción «--"
"replace» para reemplazar el gestor de ventanas activo."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Falló al inicializar GDK\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Ocurrió un error al abrir la pantalla de X Window System «%s»\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "La ventana %d en la pantalla «%s» no es válida\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Formato %s no soportado"

100
po/eu.po
View File

@@ -5,13 +5,13 @@
# Hizkuntza Politikarako Sailburuordetza <hizpol@ej-gv.es>, 2004.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2012, 2013, 2014, 2015, 2016, 2017.
# Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019.
# Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019, 2020.
#
msgid ""
msgstr "Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-08-11 10:00+0100\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-24 10:00+0100\n"
"Last-Translator: Asier Sarasua Garmendia <asier.sarasua@gmail.com>\n"
"Language-Team: Basque <librezale@librezale.eus>\n"
"Language: eu\n"
@@ -230,11 +230,11 @@ msgstr "Beheratu leihoa beste leihoen azpira"
#: data/50-mutter-windows.xml:35
msgid "Maximize window vertically"
msgstr "Maximizatu leihoa bertikalki"
msgstr "Maximizatu leihoa bertikalean"
#: data/50-mutter-windows.xml:37
msgid "Maximize window horizontally"
msgstr "Maximizatu leihoa horizontalki"
msgstr "Maximizatu leihoa horizontalean"
#: data/50-mutter-windows.xml:41
msgid "View split on left"
@@ -258,7 +258,7 @@ msgid ""
"and application launching system. The default is intended to be the “Windows "
"key” on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr "Gako honek “overlay (gainjarria) hasieratuko du: hau leihoaren ikuspegi orokorraren eta aplikazioa abiarazteko sistemaren arteko konbinazioa da. Lehenetsi gisa, PC ordenagailuko “Windows tekla da. Tekla konbinazio hau lehenetsia izatea edo kate huts gisa ezartzea da."
msgstr "Gako honek “overlay (gainjarria) hasieratuko du: hau leihoaren ikuspegi orokorraren eta aplikazioa abiarazteko sistemaren arteko konbinazioa da. Lehenetsi gisa, PC ordenagailuko “Windows tekla da. Tekla konbinazio hau lehenetsia izatea edo kate huts gisa ezartzea da."
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
@@ -280,7 +280,7 @@ msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
"area. Dropping windows on the top screen edge maximizes them completely."
msgstr "Gaituta egonez gero, pantailaren ertz bertikaletan leihoak jaregiteak hauek bertikalki maximizatuko dira, eta horizontalki tamainaz aldatuko dira area erabilgarriaren erdia estaltzeko. Pantailaren goiko ertzean leihoak jaregitean, hauek erabat maximizatuko dira."
msgstr "Gaituta egonez gero, pantailaren ertz bertikaletan leihoak jaregiteak hauek bertikalean maximizatuko dira, eta horizontalean tamainaz aldatuko dira area erabilgarriaren erdia estaltzeko. Pantailaren goiko ertzean leihoak jaregitean, hauek erabat maximizatuko dira."
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
@@ -291,7 +291,7 @@ msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr "Laneko areak dinamikoki kudeatzen diren edo laneko areak kopuru estatikoa (“org.gnome.desktop.wm.preferences“-eko “num-workspaces gakoak zehazten du) daukan zehazten du ."
msgstr "Laneko areak dinamikoki kudeatzen diren edo laneko areak kopuru estatikoa (“org.gnome.desktop.wm.preferences“-eko “num-workspaces gakoak zehazten du) daukan zehazten du ."
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
@@ -322,7 +322,7 @@ msgid ""
"If set to true, and the focus mode is either “sloppy” or “mouse” then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr "TRUE (egia) gisa ezartzen bada, eta fokuaren modua “sloppy edo “mouse bada, fokua ez da berehala aldatuko leiho batean sartzean baizik eta soilik erakuslea gelditzean."
msgstr "TRUE (egia) gisa ezartzen bada, eta fokuaren modua “sloppy edo “mouse bada, fokua ez da berehala aldatuko leiho batean sartzean baizik eta soilik erakuslea gelditzean."
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
@@ -379,21 +379,31 @@ msgstr "Erakuslea kokatzeko erabiliko den aldatzailea"
#: data/org.gnome.mutter.gschema.xml.in:135
msgid "This key will initiate the “locate pointer” action."
msgstr "Gako honek “kokatu erakuslea ekintza abiarazten du."
msgstr "Gako honek “kokatu erakuslea ekintza abiarazten du."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Bizirik egotearen ping-aren denbora-muga"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr "Bezero batek ping eskari bati erantzuteko duen milisegundo kopurua, izoztutzat hartu baino lehen. Erabiltzen den balioa 0 bada, bizirik egotearen egiaztatzea erabat desgaituko da."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Hautatu leihoa laster-fitxatik"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Utzi laster-fitxa"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Aldatu monitorearen konfigurazioak"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Biratu barneko monitorearen konfigurazioa"
@@ -482,12 +492,12 @@ msgid ""
"“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Users can break an existing grab by "
"using the specific keyboard shortcut defined by the keybinding key “restore-"
"shortcuts”."
msgstr ""
msgstr "Zerrendatu Xwayland pean X11 teklatu-kapturak bidaltzea onartuta duten edo ez duten X11 leihoen baliabide-izenak edo baliabide-klaseak. X11 leiho baten baliabide-izena edo baliabide-klasea “xprop WM_CLASS” komandoa erabilita eskuratu daiteke. “*” eta “?” komodinak onartzen diren balioetan. Hasieran “!” duten balioak zerrenda beltzean sartuta daude, eta horrek lehentasuna du zerrenda zuriaren aurretik sistema-zerrenda lehenetsiko aplikazioak bertan behera uzteko. Sistema-zerrenda lehenetsiak honako aplikazioak ditu: “@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Erabiltzaileek edozein kaptura hautsi dezakete “restore-shortcuts” lotura-teklan definitutako lasterbideak erabilita."
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Modu aldaketa (%d taldea)"
@@ -495,11 +505,11 @@ msgstr "Modu aldaketa (%d taldea)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Aldatu monitorea"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Erakutsi pantailako laguntzan"
@@ -531,63 +541,63 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Konposatzailea"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr "Dagoeneko beste konposatze-kudeatzailea ari da exekutatzen “%2$s pantailako %1$i. monitorean."
msgstr "Dagoeneko beste konposatze-kudeatzailea ari da exekutatzen “%2$s pantailako %1$i. monitorean."
#: src/core/bell.c:192
msgid "Bell event"
msgstr "Soinuaren gertaera"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Desgaitu saio-kudeatzailearen konexioa"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Ordeztu exekutatzen dagoen leiho-kudeatzailea"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Zehaztu saio-kudeatzailearen IDa"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "X pantaila erabiltzeko"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Hasieratu saioa babes-fitxategitik"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Bihurtu X dei sinkroniko"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Exekutatu wayland konposatzaile gisa"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Exekutatu habiaratutako konposatzaile gisa"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Exekutatu waylan konposatzailea Xwayland abiarazi gabe"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Exekutatu pantaila-zerbitzari oso bezala, habiaratuta baino"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Exekutatu X11 motorra erabilita"
@@ -595,7 +605,7 @@ msgstr "Exekutatu X11 motorra erabilita"
#: src/core/meta-close-dialog-default.c:151
#, c-format
msgid "“%s” is not responding."
msgstr "“%s(e)k ez du erantzuten."
msgstr "“%s(e)k ez du erantzuten."
#: src/core/meta-close-dialog-default.c:153
msgid "Application is not responding."
@@ -636,42 +646,42 @@ msgstr "Bistaratu bertsioa"
msgid "Mutter plugin to use"
msgstr "Mutter-en osagaia erabiltzeko"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "%d. laneko area"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter modu xehatuaren euskarririk gabe konpilatu da\n"
msgstr "Mutter modu xehearen euskarririk gabe konpilatu da\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Modu aldaketa: %d modua"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr "“%s pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-kudeatzailea ordezteko."
msgstr "“%s pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-kudeatzailea ordezteko."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Huts egin du GDK hasieratzeak\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Huts egin du X Window sistemaren “%s pantaila irekitzean\n"
msgstr "Huts egin du X Window sistemaren “%s pantaila irekitzean\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "“%2$s bistaratzeko %1$d pantaila ez da baliozkoa\n"
msgstr "“%2$s bistaratzeko %1$d pantaila ez da baliozkoa\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "%s formatua ez da onartzen"

View File

@@ -14,8 +14,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gl\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-12-11 10:26+0000\n"
"PO-Revision-Date: 2019-12-25 04:46+0100\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-26 21:56+0100\n"
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
"Language-Team: Galician\n"
"Language: gl\n"
@@ -23,7 +23,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.4\n"
"X-Generator: Poedit 2.3\n"
"X-Project-Style: gnome\n"
#: data/50-mutter-navigation.xml:6
@@ -428,19 +428,31 @@ msgstr "Modificador a usar para localizar o punteiro"
msgid "This key will initiate the “locate pointer” action."
msgstr "Esta tecla iniciará a acción «localizar punteiro»."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Tempo de espera para comprobación de ping"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Número de milisegundos que ten un cliente para responder a ping e que non se "
"lle detecte como caído. Usar 0 desactivará esta comprobación."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Seleccionar xanela da lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Cancelar lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Cambiar preferencias do monitor"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Rota a configuración do monitor embebido"
@@ -555,7 +567,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2528
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Modo conmutador (Grupo %d)"
@@ -563,11 +575,11 @@ msgstr "Modo conmutador (Grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2551
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:2553
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Mostrar axuda en pantalla"
@@ -710,7 +722,7 @@ msgstr "Imprimir versión"
msgid "Mutter plugin to use"
msgstr "Engadido de mutter que usar"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Espazo de traballo %d"
@@ -724,7 +736,7 @@ msgstr "Mutter foi compilado sen compatibilidade para o modo detallado\n"
msgid "Mode Switch: Mode %d"
msgstr "Modo conmutador: Modo %d"
#: src/x11/meta-x11-display.c:675
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -733,16 +745,16 @@ msgstr ""
"A pantalla «%s» ten xa un xestor de xanelas, tente usar a opción --replace "
"para substituír o xestor de xanelas."
#: src/x11/meta-x11-display.c:1036
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Procuciuse un fallo ao inicializar GDK\n"
#: src/x11/meta-x11-display.c:1060
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Produciuse un erro ao abrir a visualización do X Window System «%s»\n"
#: src/x11/meta-x11-display.c:1143
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "A pantalla %d na visualización «%s» non é válida\n"

107
po/hu.po
View File

@@ -1,25 +1,25 @@
# Hungarian translation for mutter.
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Free Software Foundation, Inc.
# This file is distributed under the same license as the mutter package.
#
# Andras Timar <timar at gnome dot hu>, 2002, 2003.
# Gabor Sari <saga at externet dot hu>, 2003.
# Laszlo Dvornik <dvornik at gnome dot hu>, 2004.
# Gabor Kelemen <kelemeng at gnome dot hu>, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013.
# Balázs Úr <ur.balazs at fsf dot hu>, 2013, 2014, 2015, 2016, 2017, 2018, 2019.
# Balázs Úr <ur.balazs at fsf dot hu>, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020.
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-08-24 22:54+0200\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-25 07:30+0100\n"
"Last-Translator: Balázs Úr <ur.balazs at fsf dot hu>\n"
"Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 18.12.3\n"
"X-Generator: Lokalize 19.04.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: data/50-mutter-navigation.xml:6
@@ -387,18 +387,6 @@ msgid "Enable experimental features"
msgstr "Kísérleti funkciók engedélyezése"
#: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “scale-monitor-"
#| "framebuffer” — makes mutter default to layout logical monitors in a "
#| "logical pixel coordinate space, while scaling monitor framebuffers "
#| "instead of window content, to manage HiDPI monitors. Does not require a "
#| "restart. • “rt-scheduler” — makes mutter request a low priority real-time "
#| "scheduling. The executable or user must have CAP_SYS_NICE. Requires a "
#| "restart."
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
@@ -435,19 +423,32 @@ msgstr "Használandó módosító a mutató elhelyezéséhez"
msgid "This key will initiate the “locate pointer” action."
msgstr "Ez a kulcs el fogja indítani a „mutató elhelyezése” műveletet."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Elérhetőség-ellenőrzés pingelésének időkorlátja"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Ezredmásodpercek száma, amely alatt az ügyfélnek válaszolnia kell egy ping"
" kérésre, hogy ne lefagyottként legyen azonosítva. A 0 használata teljesen"
" letiltja annak ellenőrzését, hogy életben van-e."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Ablakok kiválasztása tab billentyűre felugró ablakból"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Tab felugró kikapcsolása"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Monitorkonfiguráció átváltása"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Cserélgeti a beépített monitorkonfigurációkat"
@@ -504,19 +505,12 @@ msgid "Re-enable shortcuts"
msgstr "Gyorsbillentyűk újraengedélyezése"
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
#| msgid "Allow grabs with Xwayland"
msgid "Allow X11 grabs to lock keyboard focus with Xwayland"
msgstr ""
"X11 megragadások lehetővé tétele a billentyűzetfókusz zárolásához az Xwayland "
"használatával"
"X11 megragadások lehetővé tétele a billentyűzetfókusz zárolásához az "
"Xwayland használatával"
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
#| msgid ""
#| "Allow keyboard grabs issued by X11 applications running in Xwayland to be "
#| "taken into account. For a X11 grab to be taken into account under "
#| "Wayland, the client must also either send a specific X11 ClientMessage to "
#| "the root window or be among the applications white-listed in key "
#| "“xwayland-grab-access-rules”."
msgid ""
"Allow all keyboard events to be routed to X11 “override redirect” windows "
"with a grab when running in Xwayland. This option is to support X11 clients "
@@ -538,9 +532,8 @@ msgstr ""
"szabályos X11 ablakoknál, amelyek fogadhatnak billentyűzetfókuszt normál "
"körülmények között. Ahhoz, hogy Wayland alatt figyelembe legyenek véve az "
"X11 megragadások, a kliensnek vagy küldenie kell egy meghatározott X11 "
"ClientMessage üzenetet a gyökérablaknak, vagy az "
"„xwayland-grab-access-rules” kulcsban megadott fehérlistában kell "
"szerepelnie."
"ClientMessage üzenetet a gyökérablaknak, vagy az „xwayland-grab-access-"
"rules” kulcsban megadott fehérlistában kell szerepelnie."
#: data/org.gnome.mutter.wayland.gschema.xml.in:84
msgid "Xwayland applications allowed to issue keyboard grabs"
@@ -573,7 +566,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Módkapcsoló (%d. csoport)"
@@ -581,11 +574,11 @@ msgstr "Módkapcsoló (%d. csoport)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Monitorváltás"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Képernyősúgó megjelenítése"
@@ -617,13 +610,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Betűszedő"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -635,48 +628,48 @@ msgstr ""
msgid "Bell event"
msgstr "Csengetés esemény"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "A munkamenet-kezelőhöz való csatlakozás tiltása"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "A futó ablakkezelő helyettesítése"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "A munkamenet-kezelő azonosítójának megadása"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "A használandó X megjelenítő"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "A munkamenet előkészítése a mentési fájlból"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Az X-hívások szinkronná tétele"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Futtatás wayland betűszedőként"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Futtatás beágyazott betűszedőként"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Wayland kompozitáló futtatása az Xwayland elíntása nélkül"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr ""
"Futtatás teljes megjelenítő kiszolgálóként az egymásba ágyazott helyett"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Futtatás X11 háttérprogrammal"
@@ -729,21 +722,21 @@ msgstr "Verzió kiírása"
msgid "Mutter plugin to use"
msgstr "Használandó Mutter bővítmény"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "%d. munkaterület"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "A Mutter ablakkezelőt a részletes mód támogatása nélkül fordították\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Módkapcsoló: %d. mód"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -752,21 +745,21 @@ msgstr ""
"A(z) „%s” kijelző már rendelkezik ablakkezelővel; próbálja a --replace "
"kapcsolóval helyettesíteni a jelenlegi ablakkezelőt."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "A GDK előkészítése meghiúsult\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Nem sikerült megnyitni a(z) „%s” X Window rendszer képernyőt\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "A(z) %d. képernyő a(z) „%s” megjelenítőn érvénytelen\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "A(z) %s formátum nem támogatott"

View File

@@ -6,20 +6,20 @@
# Ahmad Riza H Nst <rizahnst@eriagempita.co.id>, 2006.
# Dirgita <dirgitadevina@yahoo.co.id>, 2011, 2012, 2014.
# Andika Triwidada <andika@gmail.com>, 2011-2015.
# Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2017, 2018, 2019.
# Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2017-2020.
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-08-13 16:20+0700\n"
"POT-Creation-Date: 2020-02-23 17:44+0000\n"
"PO-Revision-Date: 2020-02-25 17:48+0700\n"
"Last-Translator: Kukuh Syafaat <kukuhsyafaat@gnome.org>\n"
"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.3\n"
"X-Generator: Poedit 2.3\n"
"Plural-Forms: nplurals=2; plural= n!=1;\n"
#: data/50-mutter-navigation.xml:6
@@ -422,19 +422,32 @@ msgstr "Pengubah yang digunakan untuk menemukan penunjuk"
msgid "This key will initiate the “locate pointer” action."
msgstr "Kunci ini akan memulai aksi \"penunjuk lokasi\"."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Batas waktu untuk ping pemeriksaan hidup"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Banyaknya milidetik yang harus diselesaikan klien terhadap permintaan ping "
"agar tidak terdeteksi sebagai beku. Menggunakan 0 akan menonaktifkan "
"pemeriksaan hidup sepenuhnya."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Pilih jendela dari popup tab"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Batalkan popup tab"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Tukar konfigurasi monitor bawaan"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Memutar konfigurasi monitor bawaan"
@@ -551,7 +564,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Tukar Mode: (Grup %d)"
@@ -559,11 +572,11 @@ msgstr "Tukar Mode: (Grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Berpindah monitor"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Tampilkan bantuan pada layar"
@@ -595,13 +608,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Kompositor"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -612,47 +625,47 @@ msgstr ""
msgid "Bell event"
msgstr "Bel peristiwa"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Menonaktifkan koneksi ke manajer sesi"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Mengganti manajer jendela yang tengah berjalan"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Tentukan kode pengaturan sesi"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Tampilan X yang digunakna"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Aktifkan sesi dari berkas simpanan"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Buat panggilan X selaras"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Jalankan sebagai kompositor wayland"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Jalankan sebagai kompositor bersarang"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Jalankan kompositor wayland tanpa memmulai Xwayland"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Jalankan dengan backend X11"
@@ -705,21 +718,21 @@ msgstr "Cetak versi"
msgid "Mutter plugin to use"
msgstr "Pengaya Mutter yang dipakai"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Area kerja %d"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Muter dikompilasi tanpa dukungan mode riuh\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Tukar Mode: Mode %d"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -728,21 +741,21 @@ msgstr ""
"Tampilan \"%s\" sudah memiliki manajer jendela; cobalah gunakan pilihan --"
"replace untuk mengganti manajer jendela saat ini."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Gagal menginisialisasi GDK\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Gagal membuka tampilan X Window System \"%s\"\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Layar %d pada tampilan \"%s\" tidak valid\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Format %s tidak didukung"

View File

@@ -9,13 +9,14 @@
# Jiro Matsuzawa <jmatsuzawa@gnome.org>, 2012, 2013.
# sujiniku <sujinikusityuu@gmail.com>, 2016.
# sicklylife <translation@sicklylife.jp>, 2019-2020.
# Masanori Kamayama <>, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2020-02-10 19:31+0000\n"
"PO-Revision-Date: 2020-02-13 23:00+0900\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-03-01 00:25+0900\n"
"Last-Translator: sicklylife <translation@sicklylife.jp>\n"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
"Language: ja\n"
@@ -399,19 +400,29 @@ msgstr ""
msgid "This key will initiate the “locate pointer” action."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:155
msgid "Select window from tab popup"
msgstr "タブのポップアップでウィンドウを選択します"
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:160
msgid "Cancel tab popup"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "タブのポップアップでウィンドウを選択します"
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr ""
@@ -523,7 +534,7 @@ msgstr "オンスクリーンヘルプを表示"
#: src/backends/meta-monitor.c:223
msgid "Built-in display"
msgstr "組み込みのディスプレイ"
msgstr "ビルトインディスプレイ"
#: src/backends/meta-monitor.c:252
msgid "Unknown"
@@ -661,7 +672,7 @@ msgstr "バージョンを表示する"
msgid "Mutter plugin to use"
msgstr "使用する Mutter のプラグイン"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "ワークスペース %d"

View File

@@ -18,8 +18,8 @@ msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-31 12:39+0000\n"
"PO-Revision-Date: 2019-09-03 17:49+0300\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-24 14:09+0200\n"
"Last-Translator: Gwan-gyeong Mun <elongbug@gmail.com>\n"
"Language-Team: GNOME Korea <gnome-kr@googlegroups.com>\n"
"Language: ko\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 2.2.4\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -419,19 +419,31 @@ msgstr "포인터 위치 찾기에 사용할 키"
msgid "This key will initiate the “locate pointer” action."
msgstr "이 키는 “포인터 위치 찾기” 동작을 합니다."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "활성 확인 핑 시간 초과"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"중지된 것으로 감지되지 않도록 클라이언트가 핑 요청에 응답해야 하는 시간 (밀리"
"초). 0을 사용하면 활성 확인이 완전히 비활성화됩니다."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "탭 팝업에서 창 선택"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "탭 팝업 취소"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "모니터 설정 전환"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "내장된 모니터 설정을 돌아가면서 전환합니다"
@@ -540,7 +552,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "모드 전환 (그룹 %d)"
@@ -548,11 +560,11 @@ msgstr "모드 전환 (그룹 %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "모니터 전환"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "화면 도움말 표시"
@@ -584,13 +596,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "컴포지터"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:509
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -602,47 +614,47 @@ msgstr ""
msgid "Bell event"
msgstr "삑소리 이벤트"
#: src/core/main.c:186
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "세션 관리자와 연결 하지 않습니다"
#: src/core/main.c:192
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "실행 중인 창 관리자를 바꿉니다"
#: src/core/main.c:198
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "세션 관리 ID를 지정합니다"
#: src/core/main.c:203
#: src/core/main.c:207
msgid "X Display to use"
msgstr "사용할 X 디스플레이"
#: src/core/main.c:209
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "저장 파일에서 세션을 초기화 합니다"
#: src/core/main.c:215
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "동기 X 호출을 합니다"
#: src/core/main.c:222
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "웨일랜드 컴포지터로 실행합니다"
#: src/core/main.c:228
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "중첩 컴포지터로 실행합니다"
#: src/core/main.c:234
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "웨일랜드 컴포지터를 X웨일랜드 시작없이 실행합니다"
#: src/core/main.c:242
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "전체 디스플레이 서버로 실행, 중첩 컴포지터가 아님"
#: src/core/main.c:248
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "X11 백 엔드로 실행 합니다"
@@ -693,7 +705,7 @@ msgstr "버전을 출력합니다"
msgid "Mutter plugin to use"
msgstr "사용할 머터 플러그인"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "작업 공간 %d"
@@ -707,7 +719,7 @@ msgstr "머터가 자세한 모드 지원 없이 컴파일 되었습니다\n"
msgid "Mode Switch: Mode %d"
msgstr "모드 전환: 모드 %d"
#: src/x11/meta-x11-display.c:679
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -716,21 +728,21 @@ msgstr ""
"디스플레이 “%s”에 이미 창 관리자가 있습니다. 현재 창 관리자를 바꾸려면 --"
"replace 옵션을 써보십시오."
#: src/x11/meta-x11-display.c:1040
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "GDK 초기화에 실패했습니다\n"
#: src/x11/meta-x11-display.c:1064
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "X 윈도 시스템 디스플레이 “%s”을(를) 여는데 실패하였습니다\n"
#: src/x11/meta-x11-display.c:1147
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "디스플레이 “%2$s”의 화면 %1$d은(는) 잘못되었습니다\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "%s 형식은 지원하지 않습니다"

View File

@@ -1,20 +1,20 @@
# Polish translation for mutter.
# Copyright © 2002-2019 the mutter authors.
# Copyright © 2002-2020 the mutter authors.
# This file is distributed under the same license as the mutter package.
# Zbigniew Chyla <chyla@alice.ci.pwr.wroc.pl>, 2002-2003.
# Artur Flinta <aflinta@at.kernel.pl>, 2003-2005.
# Marek Stępień <marcoos@aviary.pl>, 2007.
# Wadim Dziedzic <wdziedzic@aviary.pl>, 2007.
# Tomasz Dominikowski <dominikowski@gmail.com>, 2008-2009.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2019.
# Aviary.pl <community-poland@mozilla.org>, 2007-2019.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2020.
# Aviary.pl <community-poland@mozilla.org>, 2007-2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-08-22 18:00+0200\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-29 13:15+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <community-poland@mozilla.org>\n"
"Language: pl\n"
@@ -432,19 +432,32 @@ msgstr "Modyfikator używany do znalezienia kursora"
msgid "This key will initiate the “locate pointer” action."
msgstr "Ten klawisz inicjuje działanie „znajdź kursor”."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Czas oczekiwania na odpowiedź żądania sprawdzenia aktywności"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Liczba milisekund, w ciągu których klient musi odpowiedzieć na żądanie, aby "
"nie został wykryty jako zawieszony. Wartość 0 całkowicie wyłączy sprawdzanie "
"aktywności."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Wybór okna z wyskakującego okna dla tabulacji"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Anulowanie wyskakującego okna dla tabulacji"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Przełączenie konfiguracji monitorów"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Obrócenie wbudowanego monitora"
@@ -560,7 +573,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Przełącznik trybu (%d. grupa)"
@@ -568,11 +581,11 @@ msgstr "Przełącznik trybu (%d. grupa)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Przełączenie monitora"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Ekran pomocy"
@@ -604,13 +617,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Menedżer składania"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -621,47 +634,47 @@ msgstr ""
msgid "Bell event"
msgstr "Zdarzenie sygnału dźwiękowego"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Rozłącza połączenie z menedżerem sesji"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Zastępuje uruchomionego menedżera okien"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Podaje identyfikator zarządzania sesją"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Używany ekran X"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Inicjuje sesję z zapisanego pliku"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Synchroniczne wywołania X"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Uruchamia jako menedżer składania Wayland"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Uruchamia jako osadzony menedżer składania"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Uruchamia menedżer składania Wayland bez uruchamiania Xwayland"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Uruchamia jako pełny serwer wyświetlania zamiast osadzonego"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Uruchamia za pomocą mechanizmu X11"
@@ -713,22 +726,22 @@ msgstr "Wyświetla wersję"
msgid "Mutter plugin to use"
msgstr "Używana wtyczka menedżera Mutter"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "%d. obszar roboczy"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
"Menedżer Mutter został skompilowany bez obsługi trybu z obszerną informacją\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Przełącznik trybu: %d. tryb"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -737,21 +750,21 @@ msgstr ""
"Na ekranie „%s” działa już menedżer okien. Aby zastąpić działającego "
"menedżera okien, należy użyć opcji „--replace”."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Zainicjowanie biblioteki GDK się nie powiodło\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Otwarcie połączenia z ekranem „%s” systemu X Window się nie powiodło\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Podekran %d ekranu „%s” jest nieprawidłowy\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Format %s jest nieobsługiwany"

View File

@@ -15,14 +15,14 @@
# Rodrigo Padula de Oliveira <contato@rodrigopadula.com>, 2011.
# Artur de Aquino Morais <artur.morais93@outlook.com>, 2016.
# Enrico Nicoletto <liverig@gmail.com>, 2012-2016.
# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2019.
# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-06 00:49+0000\n"
"PO-Revision-Date: 2019-09-05 02:32-0300\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-24 06:39-0300\n"
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
"Language: pt_BR\n"
@@ -406,18 +406,6 @@ msgid "Enable experimental features"
msgstr "Habilitar recursos experimentais"
#: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “scale-monitor-"
#| "framebuffer” — makes mutter default to layout logical monitors in a "
#| "logical pixel coordinate space, while scaling monitor framebuffers "
#| "instead of window content, to manage HiDPI monitors. Does not require a "
#| "restart. • “rt-scheduler” — makes mutter request a low priority real-time "
#| "scheduling. The executable or user must have CAP_SYS_NICE. Requires a "
#| "restart."
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
@@ -453,19 +441,32 @@ msgstr "Modificador para usar ao localizar o ponteiro"
msgid "This key will initiate the “locate pointer” action."
msgstr "Essa chave vai iniciar a ação de “localizar ponteiro”."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Tempo limite para o ping de verificação ativa"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Número de milissegundos limite dentro do qual um cliente precisa responder a "
"uma solicitação de ping para não ser detectado como congelado. Usar 0 "
"desativará completamente a verificação ativa."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Selecione a janela a partir da aba instantânea"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Cancelar aba instantânea"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Trocar configurações de monitor"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Gira a configuração de monitor embutido"
@@ -579,7 +580,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Alternador de modo (Grupo %d)"
@@ -587,11 +588,11 @@ msgstr "Alternador de modo (Grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Trocar monitor"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Mostrar ajuda na tela"
@@ -623,13 +624,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Compositor"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -641,47 +642,47 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de som"
#: src/core/main.c:185
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Desabilita a conexão com o gerenciador de sessões"
#: src/core/main.c:191
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Substitui o gerenciador de janelas em execução"
#: src/core/main.c:197
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Especifica o ID do gerenciador de sessões"
#: src/core/main.c:202
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Display X a ser usado"
#: src/core/main.c:208
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Inicializa a sessão a partir do arquivo salvo"
#: src/core/main.c:214
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Faz X chamadas síncronas"
#: src/core/main.c:221
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Executa como um compositor wayland"
#: src/core/main.c:227
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Executa como um compositor aninhado"
#: src/core/main.c:233
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Executa o compositor wayland sem iniciar o Xwayland"
#: src/core/main.c:241
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Executa como um servidor de tela cheia, ao invés de aninhado"
#: src/core/main.c:247
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Executa com backend X11"
@@ -735,21 +736,21 @@ msgstr "Versão impressa"
msgid "Mutter plugin to use"
msgstr "Plug-in do Mutter para usar"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Espaço de trabalho %d"
#: src/core/util.c:121
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "O Mutter foi compilado sem suporte para modo detalhado\n"
#: src/wayland/meta-wayland-tablet-pad.c:567
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Alternador de modo: Modo %d"
#: src/x11/meta-x11-display.c:671
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -758,21 +759,21 @@ msgstr ""
"A exibição “%s” já possui um gerenciador de janelas; tente usar a opção --"
"replace para substituir o gerenciador de janelas atual."
#: src/x11/meta-x11-display.c:1032
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Falha ao inicializar GDK\n"
#: src/x11/meta-x11-display.c:1056
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Falha ao abrir a exibição “%s” do sistema de janelas X\n"
#: src/x11/meta-x11-display.c:1140
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "A tela %d na exibição “%s” é inválida\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Sem suporte ao formato %s"

View File

@@ -4,14 +4,14 @@
#
# Andraž Tori <andraz.tori1@guest.arnes.si>, 2000.
# Matjaž Horvat <m@owca.info>, 2006.
# Matej Urbančič <mateju@svn.gnome.org>, 20072019.
# Matej Urbančič <mateju@svn.gnome.org>, 20072020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-09-26 09:57+0000\n"
"PO-Revision-Date: 2019-09-26 21:20+0200\n"
"POT-Creation-Date: 2020-02-29 19:52+0000\n"
"PO-Revision-Date: 2020-02-29 21:23+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
@@ -21,7 +21,7 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 2.2.4\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -421,19 +421,32 @@ msgstr "Spremenilnik, ki naj se uporabi za določanje mesta kazalnika"
msgid "This key will initiate the “locate pointer” action."
msgstr "Ključ začne dejanje »zaznavanja kazalnika«."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Časovni zamik za preverjanje delovanja z ukazom ping"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"Čas v milisekundah, po katerih se mora odjemalec odzvati na zahtevo ping, "
"preden sistem sporoči napako odziva. Vrednost 0 povsem omogoči preverjanje "
"stanja povezave."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Izbor okna iz pojavnega zavihka"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Prekliči pojavni zavihek"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Nastavitve nadzornika preklopa"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Zavrti vgrajene nastavitve zaslona"
@@ -544,7 +557,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2532
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Preklop načina (skupina %d)"
@@ -552,34 +565,34 @@ msgstr "Preklop načina (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2555
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Nadzornik preklopa"
#: src/backends/meta-input-settings.c:2557
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Pokaži zaslonsko pomoč"
#: src/backends/meta-monitor.c:223
#: src/backends/meta-monitor.c:226
msgid "Built-in display"
msgstr "Vgrajen zaslon"
#: src/backends/meta-monitor.c:252
#: src/backends/meta-monitor.c:255
msgid "Unknown"
msgstr "Neznano"
#: src/backends/meta-monitor.c:254
#: src/backends/meta-monitor.c:257
msgid "Unknown Display"
msgstr "Neznan zaslon"
#: src/backends/meta-monitor.c:262
#: src/backends/meta-monitor.c:265
#, c-format
msgctxt ""
"This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'"
msgid "%s %s"
msgstr "%s %s"
#: src/backends/meta-monitor.c:270
#: src/backends/meta-monitor.c:273
#, c-format
msgctxt ""
"This is a monitor vendor name followed by product/model name where size in "
@@ -588,13 +601,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Sestavljalnik"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:509
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -605,47 +618,47 @@ msgstr ""
msgid "Bell event"
msgstr "Dogodek zvonjenja"
#: src/core/main.c:186
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: src/core/main.c:192
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: src/core/main.c:198
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: src/core/main.c:203
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: src/core/main.c:209
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: src/core/main.c:215
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: src/core/main.c:222
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: src/core/main.c:228
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: src/core/main.c:234
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Zaženi sestavljalnik wayland brez zagona okolja Xwayland"
#: src/core/main.c:242
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "Zaženi kot polni strežnik zaslona in ne vstavljeno"
#: src/core/main.c:248
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "Zaženi z zaledjem X11"
@@ -698,7 +711,7 @@ msgid "Mutter plugin to use"
msgstr "Vstavek Mutter za uporabo"
# G:1 K:0 O:0
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Delovna površina %d"
@@ -713,7 +726,7 @@ msgstr ""
msgid "Mode Switch: Mode %d"
msgstr "Način preklopa: način %d"
#: src/x11/meta-x11-display.c:679
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -722,21 +735,21 @@ msgstr ""
"Zaslon »%s« že ima določen upravljalnik oken; poskušajte uporabiti možnost --"
"replace za zamenjavo trenutnega upravljalnika zaslona."
#: src/x11/meta-x11-display.c:1040
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "Začenjanje okolja GDK je spodletelo\n"
#: src/x11/meta-x11-display.c:1064
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Odpiranje zaslona »%s« okenskega sistema X je spodletelo\n"
#: src/x11/meta-x11-display.c:1147
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Zaslon %d na prikazu »%s« ni veljaven\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "Zapis %s ni podprt."

View File

@@ -8,14 +8,14 @@
# Muhammed EKEN <gnome@m-eken.com>, 2011.
# Furkan Ahmet Kara <furkanahmetkara.fk@gmail.com>, 2017.
# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015, 2016, 2017.
# Emin Tufan Çetin <etcetin@gmail.com>, 2017-2019.
# Emin Tufan Çetin <etcetin@gmail.com>, 2017-2020.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-09-06 06:32+0000\n"
"PO-Revision-Date: 2019-09-07 23:07+0300\n"
"POT-Creation-Date: 2020-02-23 17:41+0000\n"
"PO-Revision-Date: 2020-02-24 17:57+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
"Language: tr\n"
@@ -432,19 +432,31 @@ msgstr "İşaretçiyi konumlamada kullanılacak değiştirici"
msgid "This key will initiate the “locate pointer” action."
msgstr "Bu anahtar “işaretçiyi konumla” eylemini başlatacak."
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:142
msgid "Timeout for check-alive ping"
msgstr "Canlılık denetim pingi için zaman aşımı"
#: data/org.gnome.mutter.gschema.xml.in:143
msgid ""
"Number of milliseconds a client has to respond to a ping request in order to "
"not be detected as frozen. Using 0 will disable the alive check completely."
msgstr ""
"İstemcinin donuk olarak saptanmaması için ping istemini yanıtlaması gereken "
"milisaniye sayısı. 0 kullanmak canlılık denetimini tümüyle devre dışı bırakır."
#: data/org.gnome.mutter.gschema.xml.in:165
msgid "Select window from tab popup"
msgstr "Pencereyi, sekme açılır penceresinden seç"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:170
msgid "Cancel tab popup"
msgstr "Sekmeyi yeni pencerede açmayı iptal et"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:175
msgid "Switch monitor configurations"
msgstr "Monitör yapılandırmaları arasında geçiş yap"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:180
msgid "Rotates the built-in monitor configuration"
msgstr "Yerleşik monitör yapılandırmaları arasında geçiş yapar"
@@ -557,7 +569,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2567
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Kip anahtarı (Küme %d)"
@@ -565,11 +577,11 @@ msgstr "Kip anahtarı (Küme %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2590
msgid "Switch monitor"
msgstr "Monitör değiştir"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2592
msgid "Show on-screen help"
msgstr "Ekranda yardımı göster"
@@ -601,13 +613,13 @@ msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#: src/backends/meta-profiler.c:79
msgid "Compositor"
msgstr "Dizgici"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:509
#: src/compositor/compositor.c:533
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -619,47 +631,47 @@ msgstr ""
msgid "Bell event"
msgstr "Etkinlik zili"
#: src/core/main.c:186
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "Ortam yöneticisine olan bağlantıyı kapat"
#: src/core/main.c:192
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "Çalışan pencere yöneticisinin yerini al"
#: src/core/main.c:198
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "Ortam yönetim IDsini belirt"
#: src/core/main.c:203
#: src/core/main.c:207
msgid "X Display to use"
msgstr "Kullanılacak X Ekranı"
#: src/core/main.c:209
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "Ortamı kayıtlı dosyadan başlat"
#: src/core/main.c:215
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "X çağrılarını eşzamanlı yap"
#: src/core/main.c:222
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr "Wayland dizgici olarak çalıştır"
#: src/core/main.c:228
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "Yuvalanmış dizgici olarak çalıştır"
#: src/core/main.c:234
#: src/core/main.c:238
msgid "Run wayland compositor without starting Xwayland"
msgstr "Xwaylandi çalıştırmadan Wayland dizgici çalıştır"
#: src/core/main.c:242
#: src/core/main.c:246
msgid "Run as a full display server, rather than nested"
msgstr "İç içe değil tam ekran sunucusu olarak çalıştır"
#: src/core/main.c:248
#: src/core/main.c:252
msgid "Run with X11 backend"
msgstr "X11 arkayüzüyle çalıştır"
@@ -712,7 +724,7 @@ msgstr "Sürümü yazdır"
msgid "Mutter plugin to use"
msgstr "Kullanılacak Mutter eklentisi"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1911
#, c-format
msgid "Workspace %d"
msgstr "Çalışma Alanı %d"
@@ -726,7 +738,7 @@ msgstr "Mutter, ayrıntılı kip desteği olmadan derlenmiş\n"
msgid "Mode Switch: Mode %d"
msgstr "Kip Anahtarı: Kip %d"
#: src/x11/meta-x11-display.c:679
#: src/x11/meta-x11-display.c:676
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -736,21 +748,21 @@ msgstr ""
"yöneticisinin yerine bir başkasını koymak için --replace seçeneğini "
"kullanmayı deneyin."
#: src/x11/meta-x11-display.c:1040
#: src/x11/meta-x11-display.c:1089
msgid "Failed to initialize GDK\n"
msgstr "GDK ilklendirilemedi\n"
#: src/x11/meta-x11-display.c:1064
#: src/x11/meta-x11-display.c:1113
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "X Pencere Sistemi “%s” ekranıılamadı\n"
#: src/x11/meta-x11-display.c:1147
#: src/x11/meta-x11-display.c:1196
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "“%2$s” monitöründeki %1$d ekranı geçersiz\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#: src/x11/meta-x11-selection-input-stream.c:460
#, c-format
msgid "Format %s not supported"
msgstr "%s biçimi desteklenmiyor"

View File

@@ -1032,6 +1032,21 @@ meta_backend_get_remote_access_controller (MetaBackend *backend)
#endif
}
/**
* meta_backend_is_rendering_hardware_accelerated:
* @backend: A #MetaBackend
*
* Returns: %TRUE if the rendering is hardware accelerated, otherwise
* %FALSE.
*/
gboolean
meta_backend_is_rendering_hardware_accelerated (MetaBackend *backend)
{
MetaRenderer *renderer = meta_backend_get_renderer (backend);
return meta_renderer_is_hardware_accelerated (renderer);
}
/**
* meta_backend_grab_device: (skip)
*/

View File

@@ -31,6 +31,30 @@ meta_crtc_get_gpu (MetaCrtc *crtc)
return crtc->gpu;
}
void
meta_crtc_set_config (MetaCrtc *crtc,
graphene_rect_t *layout,
MetaCrtcMode *mode,
MetaMonitorTransform transform)
{
MetaCrtcConfig *config;
meta_crtc_unset_config (crtc);
config = g_new0 (MetaCrtcConfig, 1);
config->layout = *layout;
config->mode = mode;
config->transform = transform;
crtc->config = config;
}
void
meta_crtc_unset_config (MetaCrtc *crtc)
{
g_clear_pointer (&crtc->config, g_free);
}
static void
meta_crtc_finalize (GObject *object)
{
@@ -39,6 +63,8 @@ meta_crtc_finalize (GObject *object)
if (crtc->driver_notify)
crtc->driver_notify (crtc);
g_clear_pointer (&crtc->config, g_free);
G_OBJECT_CLASS (meta_crtc_parent_class)->finalize (object);
}

View File

@@ -49,6 +49,13 @@ typedef enum _MetaCrtcModeFlag
META_CRTC_MODE_FLAG_MASK = 0x3fff
} MetaCrtcModeFlag;
typedef struct _MetaCrtcConfig
{
graphene_rect_t layout;
MetaMonitorTransform transform;
MetaCrtcMode *mode;
} MetaCrtcConfig;
struct _MetaCrtc
{
GObject parent;
@@ -56,12 +63,9 @@ struct _MetaCrtc
MetaGpu *gpu;
glong crtc_id;
MetaRectangle rect;
MetaCrtcMode *current_mode;
MetaMonitorTransform transform;
unsigned int all_transforms;
MetaLogicalMonitor *logical_monitor;
MetaCrtcConfig *config;
/* Used when changing configuration */
gboolean is_dirty;
@@ -98,4 +102,13 @@ META_EXPORT_TEST G_DECLARE_FINAL_TYPE (MetaCrtcMode, meta_crtc_mode, META, CRTC_
MetaGpu * meta_crtc_get_gpu (MetaCrtc *crtc);
META_EXPORT_TEST
void meta_crtc_set_config (MetaCrtc *crtc,
graphene_rect_t *layout,
MetaCrtcMode *mode,
MetaMonitorTransform transform);
META_EXPORT_TEST
void meta_crtc_unset_config (MetaCrtc *crtc);
#endif /* META_CRTC_H */

View File

@@ -43,6 +43,7 @@ typedef struct _MetaCursorSpritePrivate
CoglTexture2D *texture;
float texture_scale;
MetaMonitorTransform texture_transform;
int hot_x, hot_y;
} MetaCursorSpritePrivate;
@@ -110,6 +111,16 @@ meta_cursor_sprite_set_texture_scale (MetaCursorSprite *sprite,
priv->texture_scale = scale;
}
void
meta_cursor_sprite_set_texture_transform (MetaCursorSprite *sprite,
MetaMonitorTransform transform)
{
MetaCursorSpritePrivate *priv =
meta_cursor_sprite_get_instance_private (sprite);
priv->texture_transform = transform;
}
CoglTexture *
meta_cursor_sprite_get_cogl_texture (MetaCursorSprite *sprite)
{
@@ -140,6 +151,15 @@ meta_cursor_sprite_get_texture_scale (MetaCursorSprite *sprite)
return priv->texture_scale;
}
MetaMonitorTransform
meta_cursor_sprite_get_texture_transform (MetaCursorSprite *sprite)
{
MetaCursorSpritePrivate *priv =
meta_cursor_sprite_get_instance_private (sprite);
return priv->texture_transform;
}
void
meta_cursor_sprite_prepare_at (MetaCursorSprite *sprite,
int x,
@@ -164,6 +184,7 @@ meta_cursor_sprite_init (MetaCursorSprite *sprite)
meta_cursor_sprite_get_instance_private (sprite);
priv->texture_scale = 1.0f;
priv->texture_transform = META_MONITOR_TRANSFORM_NORMAL;
}
static void

View File

@@ -22,6 +22,7 @@
#ifndef META_CURSOR_H
#define META_CURSOR_H
#include "backends/meta-backend-types.h"
#include "meta/common.h"
#include "meta/boxes.h"
@@ -57,6 +58,9 @@ void meta_cursor_sprite_set_texture (MetaCursorSprite *sprite,
void meta_cursor_sprite_set_texture_scale (MetaCursorSprite *sprite,
float scale);
void meta_cursor_sprite_set_texture_transform (MetaCursorSprite *sprite,
MetaMonitorTransform transform);
CoglTexture *meta_cursor_sprite_get_cogl_texture (MetaCursorSprite *sprite);
void meta_cursor_sprite_get_hotspot (MetaCursorSprite *sprite,
@@ -65,6 +69,8 @@ void meta_cursor_sprite_get_hotspot (MetaCursorSprite *sprite,
float meta_cursor_sprite_get_texture_scale (MetaCursorSprite *sprite);
MetaMonitorTransform meta_cursor_sprite_get_texture_transform (MetaCursorSprite *sprite);
gboolean meta_cursor_sprite_is_animated (MetaCursorSprite *sprite);
void meta_cursor_sprite_tick_frame (MetaCursorSprite *sprite);

View File

@@ -122,7 +122,7 @@ derive_monitor_transform (MetaMonitor *monitor)
MetaMonitorTransform transform;
main_output = meta_monitor_get_main_output (monitor);
transform = meta_output_get_assigned_crtc (main_output)->transform;
transform = meta_output_get_assigned_crtc (main_output)->config->transform;
return meta_monitor_crtc_to_logical_transform (monitor, transform);
}
@@ -177,16 +177,14 @@ meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
for (l_output = outputs; l_output; l_output = l_output->next)
{
MetaOutput *output = l_output->data;
MetaCrtc *crtc;
is_presentation = is_presentation && output->is_presentation;
crtc = meta_output_get_assigned_crtc (output);
if (crtc)
crtc->logical_monitor = logical_monitor;
}
}
logical_monitor->is_presentation = is_presentation;
meta_monitor_set_logical_monitor (monitor, logical_monitor);
}
gboolean
@@ -242,6 +240,7 @@ foreach_crtc (MetaMonitor *monitor,
ForeachCrtcData *data = user_data;
data->func (data->logical_monitor,
monitor,
monitor_crtc_mode->output,
meta_output_get_assigned_crtc (monitor_crtc_mode->output),
data->user_data);

View File

@@ -63,6 +63,7 @@ G_DECLARE_FINAL_TYPE (MetaLogicalMonitor, meta_logical_monitor,
GObject)
typedef void (* MetaLogicalMonitorCrtcFunc) (MetaLogicalMonitor *logical_monitor,
MetaMonitor *monitor,
MetaOutput *output,
MetaCrtc *crtc,
gpointer user_data);

View File

@@ -172,6 +172,11 @@ assign_monitor_crtc (MetaMonitor *monitor,
MetaMonitorTransform transform;
MetaMonitorTransform crtc_transform;
int crtc_x, crtc_y;
float x_offset, y_offset;
float scale;
float width, height;
MetaCrtcMode *crtc_mode;
graphene_rect_t crtc_layout;
MetaCrtcInfo *crtc_info;
MetaOutputInfo *output_info;
MetaMonitorConfig *first_monitor_config;
@@ -202,29 +207,37 @@ assign_monitor_crtc (MetaMonitor *monitor,
meta_monitor_calculate_crtc_pos (monitor, mode, output, crtc_transform,
&crtc_x, &crtc_y);
x_offset = data->logical_monitor_config->layout.x;
y_offset = data->logical_monitor_config->layout.y;
scale = data->logical_monitor_config->scale;
crtc_mode = monitor_crtc_mode->crtc_mode;
if (meta_monitor_transform_is_rotated (crtc_transform))
{
width = crtc_mode->height / scale;
height = crtc_mode->width / scale;
}
else
{
width = crtc_mode->width / scale;
height = crtc_mode->height / scale;
}
crtc_layout = GRAPHENE_RECT_INIT (x_offset + (crtc_x / scale),
y_offset + (crtc_y / scale),
width,
height);
crtc_info = g_slice_new0 (MetaCrtcInfo);
*crtc_info = (MetaCrtcInfo) {
.crtc = crtc,
.mode = monitor_crtc_mode->crtc_mode,
.x = crtc_x,
.y = crtc_y,
.mode = crtc_mode,
.layout = crtc_layout,
.transform = crtc_transform,
.outputs = g_ptr_array_new ()
};
g_ptr_array_add (crtc_info->outputs, output);
/*
* Currently, MetaCrtcInfo are deliberately offset incorrectly to carry over
* logical monitor location inside the MetaCrtc struct, when in fact this
* depends on the framebuffer configuration. This will eventually be negated
* when setting the actual KMS mode.
*
* TODO: Remove this hack when we don't need to rely on MetaCrtc to pass
* logical monitor state.
*/
crtc_info->x += data->logical_monitor_config->layout.x;
crtc_info->y += data->logical_monitor_config->layout.y;
/*
* Only one output can be marked as primary (due to Xrandr limitation),
* so only mark the main output of the first monitor in the logical monitor

View File

@@ -512,38 +512,17 @@ apply_crtc_assignments (MetaMonitorManager *manager,
if (crtc_info->mode == NULL)
{
crtc->rect.x = 0;
crtc->rect.y = 0;
crtc->rect.width = 0;
crtc->rect.height = 0;
crtc->current_mode = NULL;
meta_crtc_unset_config (crtc);
}
else
{
MetaCrtcMode *mode;
MetaOutput *output;
unsigned int j;
int width, height;
mode = crtc_info->mode;
if (meta_monitor_transform_is_rotated (crtc_info->transform))
{
width = mode->height;
height = mode->width;
}
else
{
width = mode->width;
height = mode->height;
}
crtc->rect.x = crtc_info->x;
crtc->rect.y = crtc_info->y;
crtc->rect.width = width;
crtc->rect.height = height;
crtc->current_mode = mode;
crtc->transform = crtc_info->transform;
meta_crtc_set_config (crtc,
&crtc_info->layout,
crtc_info->mode,
crtc_info->transform);
for (j = 0; j < crtc_info->outputs->len; j++)
{
@@ -569,19 +548,13 @@ apply_crtc_assignments (MetaMonitorManager *manager,
{
MetaCrtc *crtc = l->data;
crtc->logical_monitor = NULL;
if (crtc->is_dirty)
{
crtc->is_dirty = FALSE;
continue;
}
crtc->rect.x = 0;
crtc->rect.y = 0;
crtc->rect.width = 0;
crtc->rect.height = 0;
crtc->current_mode = NULL;
meta_crtc_unset_config (crtc);
}
/* Disable outputs not mentioned in the list */

View File

@@ -24,6 +24,7 @@
#define META_MONITOR_MANAGER_PRIVATE_H
#include <cogl/cogl.h>
#include <graphene.h>
#include <libgnome-desktop/gnome-pnp-ids.h>
#include "backends/meta-backend-private.h"
@@ -72,8 +73,7 @@ struct _MetaCrtcInfo
{
MetaCrtc *crtc;
MetaCrtcMode *mode;
int x;
int y;
graphene_rect_t layout;
MetaMonitorTransform transform;
GPtrArray *outputs;
};

View File

@@ -1014,28 +1014,46 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
{
MetaCrtc *crtc = l->data;
GVariantBuilder transforms;
int current_mode_index;
MetaCrtcConfig *crtc_config;
g_variant_builder_init (&transforms, G_VARIANT_TYPE ("au"));
for (j = 0; j <= META_MONITOR_TRANSFORM_FLIPPED_270; j++)
if (crtc->all_transforms & (1 << j))
g_variant_builder_add (&transforms, "u", j);
if (crtc->current_mode)
current_mode_index = g_list_index (combined_modes, crtc->current_mode);
crtc_config = crtc->config;
if (crtc_config)
{
int current_mode_index;
current_mode_index = g_list_index (combined_modes, crtc_config->mode);
g_variant_builder_add (&crtc_builder, "(uxiiiiiuaua{sv})",
i, /* ID */
(int64_t) crtc->crtc_id,
(int) roundf (crtc_config->layout.origin.x),
(int) roundf (crtc_config->layout.origin.y),
(int) roundf (crtc_config->layout.size.width),
(int) roundf (crtc_config->layout.size.height),
current_mode_index,
(uint32_t) crtc_config->transform,
&transforms,
NULL /* properties */);
}
else
current_mode_index = -1;
g_variant_builder_add (&crtc_builder, "(uxiiiiiuaua{sv})",
i, /* ID */
(gint64)crtc->crtc_id,
(int)crtc->rect.x,
(int)crtc->rect.y,
(int)crtc->rect.width,
(int)crtc->rect.height,
current_mode_index,
(guint32)crtc->transform,
&transforms,
NULL /* properties */);
{
g_variant_builder_add (&crtc_builder, "(uxiiiiiuaua{sv})",
i, /* ID */
(int64_t) crtc->crtc_id,
0,
0,
0,
0,
-1,
(uint32_t) META_MONITOR_TRANSFORM_NORMAL,
&transforms,
NULL /* properties */);
}
}
for (l = combined_outputs, i = 0; l; l = l->next, i++)

View File

@@ -39,3 +39,44 @@ meta_monitor_transform_invert (MetaMonitorTransform transform)
g_assert_not_reached ();
return 0;
}
MetaMonitorTransform
meta_monitor_transform_transform (MetaMonitorTransform transform,
MetaMonitorTransform other)
{
MetaMonitorTransform new_transform;
new_transform = (transform + other) % META_MONITOR_TRANSFORM_FLIPPED;
if (meta_monitor_transform_is_flipped (transform) !=
meta_monitor_transform_is_flipped (other))
new_transform += META_MONITOR_TRANSFORM_FLIPPED;
return new_transform;
}
/**
* meta_monitor_transform_relative_transform:
* @transform: The transform to start from
* @other: The transform to go to
*
* Return value: a transform to get from @transform to @other
*/
MetaMonitorTransform
meta_monitor_transform_relative_transform (MetaMonitorTransform transform,
MetaMonitorTransform other)
{
MetaMonitorTransform relative_transform;
relative_transform = ((other % META_MONITOR_TRANSFORM_FLIPPED -
transform % META_MONITOR_TRANSFORM_FLIPPED) %
META_MONITOR_TRANSFORM_FLIPPED);
if (meta_monitor_transform_is_flipped (transform) !=
meta_monitor_transform_is_flipped (other))
{
relative_transform = (meta_monitor_transform_invert (relative_transform) +
META_MONITOR_TRANSFORM_FLIPPED);
}
return relative_transform;
}

View File

@@ -22,6 +22,7 @@
#include <glib-object.h>
#include "backends/meta-backend-types.h"
#include "core/util-private.h"
enum _MetaMonitorTransform
{
@@ -48,9 +49,16 @@ meta_monitor_transform_is_rotated (MetaMonitorTransform transform)
static inline gboolean
meta_monitor_transform_is_flipped (MetaMonitorTransform transform)
{
return (transform >= META_MONITOR_TRANSFORM_FLIPPED);
return (abs(transform) >= META_MONITOR_TRANSFORM_FLIPPED);
}
MetaMonitorTransform meta_monitor_transform_invert (MetaMonitorTransform transform);
META_EXPORT_TEST
MetaMonitorTransform meta_monitor_transform_transform (MetaMonitorTransform transform,
MetaMonitorTransform other);
MetaMonitorTransform meta_monitor_transform_relative_transform (MetaMonitorTransform transform,
MetaMonitorTransform other);
#endif /* META_MONITOR_TRANSFORM_H */

View File

@@ -29,6 +29,7 @@
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-settings-private.h"
#include "backends/meta-output.h"
#include "core/boxes-private.h"
#define SCALE_FACTORS_PER_INTEGER 4
#define SCALE_FACTORS_STEPS (1.0 / (float) SCALE_FACTORS_PER_INTEGER)
@@ -65,6 +66,8 @@ typedef struct _MetaMonitorPrivate
MetaMonitorSpec *spec;
MetaLogicalMonitor *logical_monitor;
/*
* The primary or first output for this monitor, 0 if we can't figure out.
* It can be matched to a winsys_id of a MetaOutput.
@@ -455,14 +458,8 @@ meta_monitor_logical_to_crtc_transform (MetaMonitor *monitor,
MetaMonitorTransform transform)
{
MetaOutput *output = meta_monitor_get_main_output (monitor);
MetaMonitorTransform new_transform;
new_transform = (transform + output->panel_orientation_transform) %
META_MONITOR_TRANSFORM_FLIPPED;
if (meta_monitor_transform_is_flipped (transform))
new_transform += META_MONITOR_TRANSFORM_FLIPPED;
return new_transform;
return meta_output_logical_to_crtc_transform (output, transform);
}
MetaMonitorTransform
@@ -470,15 +467,8 @@ meta_monitor_crtc_to_logical_transform (MetaMonitor *monitor,
MetaMonitorTransform transform)
{
MetaOutput *output = meta_monitor_get_main_output (monitor);
MetaMonitorTransform new_transform;
new_transform = (transform + META_MONITOR_TRANSFORM_FLIPPED -
output->panel_orientation_transform) %
META_MONITOR_TRANSFORM_FLIPPED;
if (meta_monitor_transform_is_flipped (transform))
new_transform += META_MONITOR_TRANSFORM_FLIPPED;
return new_transform;
return meta_output_crtc_to_logical_transform (output, transform);
}
static void
@@ -642,7 +632,7 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
monitor_priv->preferred_mode = mode;
crtc = meta_output_get_assigned_crtc (output);
if (crtc && crtc_mode == crtc->current_mode)
if (crtc && crtc->config && crtc_mode == crtc->config->mode)
monitor_priv->current_mode = mode;
}
}
@@ -689,10 +679,17 @@ meta_monitor_normal_derive_layout (MetaMonitor *monitor,
{
MetaOutput *output;
MetaCrtc *crtc;
MetaCrtcConfig *crtc_config;
output = meta_monitor_get_main_output (monitor);
crtc = meta_output_get_assigned_crtc (output);
*layout = crtc->rect;
crtc_config = crtc->config;
g_return_if_fail (crtc_config);
meta_rectangle_from_graphene_rect (&crtc_config->layout,
META_ROUNDING_STRATEGY_ROUND,
layout);
}
static gboolean
@@ -886,7 +883,8 @@ is_monitor_mode_assigned (MetaMonitor *monitor,
crtc = meta_output_get_assigned_crtc (output);
if (monitor_crtc_mode->crtc_mode &&
(!crtc || crtc->current_mode != monitor_crtc_mode->crtc_mode))
(!crtc || !crtc->config ||
crtc->config->mode != monitor_crtc_mode->crtc_mode))
return FALSE;
else if (!monitor_crtc_mode->crtc_mode && crtc)
return FALSE;
@@ -1330,32 +1328,39 @@ meta_monitor_tiled_derive_layout (MetaMonitor *monitor,
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
GList *l;
int min_x, min_y, max_x, max_y;
float min_x, min_y, max_x, max_y;
min_x = INT_MAX;
min_y = INT_MAX;
max_x = 0;
max_y = 0;
min_x = FLT_MAX;
min_y = FLT_MAX;
max_x = 0.0;
max_y = 0.0;
for (l = monitor_priv->outputs; l; l = l->next)
{
MetaOutput *output = l->data;
MetaCrtc *crtc;
MetaCrtcConfig *crtc_config;
graphene_rect_t *crtc_layout;
crtc = meta_output_get_assigned_crtc (output);
if (!crtc)
continue;
min_x = MIN (crtc->rect.x, min_x);
min_y = MIN (crtc->rect.y, min_y);
max_x = MAX (crtc->rect.x + crtc->rect.width, max_x);
max_y = MAX (crtc->rect.y + crtc->rect.height, max_y);
crtc_config = crtc->config;
g_return_if_fail (crtc_config);
crtc_layout = &crtc_config->layout;
min_x = MIN (crtc_layout->origin.x, min_x);
min_y = MIN (crtc_layout->origin.y, min_y);
max_x = MAX (crtc_layout->origin.x + crtc_layout->size.width, max_x);
max_y = MAX (crtc_layout->origin.y + crtc_layout->size.height, max_y);
}
*layout = (MetaRectangle) {
.x = min_x,
.y = min_y,
.width = max_x - min_x,
.height = max_y - min_y
.x = roundf (min_x),
.y = roundf (min_y),
.width = roundf (max_x - min_x),
.height = roundf (max_y - min_y)
};
}
@@ -1438,16 +1443,9 @@ meta_monitor_get_spec (MetaMonitor *monitor)
MetaLogicalMonitor *
meta_monitor_get_logical_monitor (MetaMonitor *monitor)
{
MetaOutput *output;
MetaCrtc *crtc;
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
output = meta_monitor_get_main_output (monitor);
crtc = meta_output_get_assigned_crtc (output);
if (crtc)
return crtc->logical_monitor;
else
return NULL;
return priv->logical_monitor;
}
MetaMonitorMode *
@@ -1514,7 +1512,7 @@ is_current_mode_known (MetaMonitor *monitor)
output = meta_monitor_get_main_output (monitor);
crtc = meta_output_get_assigned_crtc (output);
return meta_monitor_is_active (monitor) == (crtc && crtc->current_mode);
return meta_monitor_is_active (monitor) == (crtc && crtc->config);
}
void
@@ -1885,3 +1883,12 @@ meta_monitor_get_display_name (MetaMonitor *monitor)
return monitor_priv->display_name;
}
void
meta_monitor_set_logical_monitor (MetaMonitor *monitor,
MetaLogicalMonitor *logical_monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
priv->logical_monitor = logical_monitor;
}

View File

@@ -283,4 +283,7 @@ void meta_monitor_spec_free (MetaMonitorSpec *monitor_id);
const char * meta_monitor_get_display_name (MetaMonitor *monitor);
void meta_monitor_set_logical_monitor (MetaMonitor *monitor,
MetaLogicalMonitor *logical_monitor);
#endif /* META_MONITOR_H */

View File

@@ -62,6 +62,29 @@ meta_output_get_assigned_crtc (MetaOutput *output)
return priv->crtc;
}
MetaMonitorTransform
meta_output_logical_to_crtc_transform (MetaOutput *output,
MetaMonitorTransform transform)
{
MetaMonitorTransform panel_orientation_transform;
panel_orientation_transform = output->panel_orientation_transform;
return meta_monitor_transform_transform (transform,
panel_orientation_transform);
}
MetaMonitorTransform
meta_output_crtc_to_logical_transform (MetaOutput *output,
MetaMonitorTransform transform)
{
MetaMonitorTransform inverted_panel_orientation_transform;
inverted_panel_orientation_transform =
meta_monitor_transform_invert (output->panel_orientation_transform);
return meta_monitor_transform_transform (transform,
inverted_panel_orientation_transform);
}
static void
meta_output_dispose (GObject *object)
{

View File

@@ -132,4 +132,10 @@ void meta_output_unassign_crtc (MetaOutput *output);
META_EXPORT_TEST
MetaCrtc * meta_output_get_assigned_crtc (MetaOutput *output);
MetaMonitorTransform meta_output_logical_to_crtc_transform (MetaOutput *output,
MetaMonitorTransform transform);
MetaMonitorTransform meta_output_crtc_to_logical_transform (MetaOutput *output,
MetaMonitorTransform transform);
#endif /* META_OUTPUT_H */

View File

@@ -28,4 +28,7 @@ void meta_remote_access_controller_notify_new_handle (MetaRemoteAccessController
void meta_remote_access_handle_notify_stopped (MetaRemoteAccessHandle *handle);
void meta_remote_access_handle_set_disable_animations (MetaRemoteAccessHandle *handle,
gboolean disable_animations);
#endif /* META_REMOTE_ACCESS_CONTROLLER_PRIVATE_H */

View File

@@ -43,6 +43,8 @@ static int controller_signals[N_CONTROLLER_SIGNALS];
typedef struct _MetaRemoteAccessHandlePrivate
{
gboolean has_stopped;
gboolean disable_animations;
} MetaRemoteAccessHandlePrivate;
G_DEFINE_TYPE_WITH_PRIVATE (MetaRemoteAccessHandle,
@@ -76,6 +78,32 @@ meta_remote_access_handle_stop (MetaRemoteAccessHandle *handle)
META_REMOTE_ACCESS_HANDLE_GET_CLASS (handle)->stop (handle);
}
/**
* meta_remote_access_get_disable_animations:
* @handle: A #MetaRemoteAccessHandle
*
* Returns: %TRUE if the remote access requested that animations should be
* disabled.
*/
gboolean
meta_remote_access_handle_get_disable_animations (MetaRemoteAccessHandle *handle)
{
MetaRemoteAccessHandlePrivate *priv =
meta_remote_access_handle_get_instance_private (handle);
return priv->disable_animations;
}
void
meta_remote_access_handle_set_disable_animations (MetaRemoteAccessHandle *handle,
gboolean disable_animations)
{
MetaRemoteAccessHandlePrivate *priv =
meta_remote_access_handle_get_instance_private (handle);
priv->disable_animations = disable_animations;
}
void
meta_remote_access_handle_notify_stopped (MetaRemoteAccessHandle *handle)
{

View File

@@ -39,7 +39,6 @@ enum
{
PROP_0,
PROP_MONITOR_INFO,
PROP_TRANSFORM,
PROP_LAST
@@ -52,18 +51,11 @@ struct _MetaRendererView
ClutterStageViewCogl parent;
MetaMonitorTransform transform;
MetaLogicalMonitor *logical_monitor;
};
G_DEFINE_TYPE (MetaRendererView, meta_renderer_view,
CLUTTER_TYPE_STAGE_VIEW_COGL)
MetaLogicalMonitor *
meta_renderer_view_get_logical_monitor (MetaRendererView *view)
{
return view->logical_monitor;
}
MetaMonitorTransform
meta_renderer_view_get_transform (MetaRendererView *view)
{
@@ -146,9 +138,6 @@ meta_renderer_view_get_property (GObject *object,
switch (prop_id)
{
case PROP_MONITOR_INFO:
g_value_set_pointer (value, view->logical_monitor);
break;
case PROP_TRANSFORM:
g_value_set_uint (value, view->transform);
break;
@@ -168,9 +157,6 @@ meta_renderer_view_set_property (GObject *object,
switch (prop_id)
{
case PROP_MONITOR_INFO:
view->logical_monitor = g_value_get_pointer (value);
break;
case PROP_TRANSFORM:
meta_renderer_view_set_transform (view, g_value_get_uint (value));
break;
@@ -199,13 +185,6 @@ meta_renderer_view_class_init (MetaRendererViewClass *klass)
object_class->get_property = meta_renderer_view_get_property;
object_class->set_property = meta_renderer_view_set_property;
obj_props[PROP_MONITOR_INFO] =
g_param_spec_pointer ("logical-monitor",
"MetaLogicalMonitor",
"The logical monitor of the view",
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_TRANSFORM] =
g_param_spec_uint ("transform",
"Transform",

View File

@@ -26,8 +26,6 @@ G_DECLARE_FINAL_TYPE (MetaRendererView, meta_renderer_view,
META, RENDERER_VIEW,
ClutterStageViewCogl)
MetaLogicalMonitor *meta_renderer_view_get_logical_monitor (MetaRendererView *view);
MetaMonitorTransform meta_renderer_view_get_transform (MetaRendererView *view);
#endif /* META_RENDERER_VIEW_H */

View File

@@ -47,14 +47,35 @@
#include <glib-object.h>
#include "backends/meta-backend-private.h"
#include "backends/meta-logical-monitor.h"
enum
{
PROP_0,
PROP_BACKEND,
N_PROPS
};
static GParamSpec *obj_props[N_PROPS];
typedef struct _MetaRendererPrivate
{
MetaBackend *backend;
GList *views;
} MetaRendererPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (MetaRenderer, meta_renderer, G_TYPE_OBJECT)
MetaBackend *
meta_renderer_get_backend (MetaRenderer *renderer)
{
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
return priv->backend;
}
/**
* meta_renderer_create_cogl_renderer:
* @renderer: a #MetaRenderer object
@@ -73,10 +94,14 @@ meta_renderer_create_cogl_renderer (MetaRenderer *renderer)
static MetaRendererView *
meta_renderer_create_view (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor)
MetaLogicalMonitor *logical_monitor,
MetaOutput *output,
MetaCrtc *crtc)
{
return META_RENDERER_GET_CLASS (renderer)->create_view (renderer,
logical_monitor);
logical_monitor,
output,
crtc);
}
/**
@@ -94,6 +119,21 @@ meta_renderer_rebuild_views (MetaRenderer *renderer)
return META_RENDERER_GET_CLASS (renderer)->rebuild_views (renderer);
}
static void
create_crtc_view (MetaLogicalMonitor *logical_monitor,
MetaMonitor *monitor,
MetaOutput *output,
MetaCrtc *crtc,
gpointer user_data)
{
MetaRenderer *renderer = user_data;
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
MetaRendererView *view;
view = meta_renderer_create_view (renderer, logical_monitor, output, crtc);
priv->views = g_list_append (priv->views, view);
}
static void
meta_renderer_real_rebuild_views (MetaRenderer *renderer)
{
@@ -112,10 +152,10 @@ meta_renderer_real_rebuild_views (MetaRenderer *renderer)
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
MetaRendererView *view;
view = meta_renderer_create_view (renderer, logical_monitor);
priv->views = g_list_append (priv->views, view);
meta_logical_monitor_foreach_crtc (logical_monitor,
create_crtc_view,
renderer);
}
}
@@ -148,22 +188,71 @@ meta_renderer_get_views (MetaRenderer *renderer)
return priv->views;
}
MetaRendererView *
meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor)
gboolean
meta_renderer_is_hardware_accelerated (MetaRenderer *renderer)
{
GList *l;
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
MetaBackend *backend = priv->backend;
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
CoglContext *cogl_context =
clutter_backend_get_cogl_context (clutter_backend);
CoglGpuInfo *info = &cogl_context->gpu;
for (l = meta_renderer_get_views (renderer); l; l = l->next)
switch (info->architecture)
{
MetaRendererView *view = l->data;
if (meta_renderer_view_get_logical_monitor (view) ==
logical_monitor)
return view;
case COGL_GPU_INFO_ARCHITECTURE_UNKNOWN:
case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE:
case COGL_GPU_INFO_ARCHITECTURE_SGX:
case COGL_GPU_INFO_ARCHITECTURE_MALI:
return TRUE;
case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
return FALSE;
}
return NULL;
g_assert_not_reached ();
return FALSE;
}
static void
meta_renderer_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
MetaRenderer *renderer = META_RENDERER (object);
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
switch (prop_id)
{
case PROP_BACKEND:
g_value_set_object (value, priv->backend);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
meta_renderer_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
MetaRenderer *renderer = META_RENDERER (object);
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
switch (prop_id)
{
case PROP_BACKEND:
priv->backend = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
@@ -188,7 +277,19 @@ meta_renderer_class_init (MetaRendererClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = meta_renderer_get_property;
object_class->set_property = meta_renderer_set_property;
object_class->finalize = meta_renderer_finalize;
klass->rebuild_views = meta_renderer_real_rebuild_views;
obj_props[PROP_BACKEND] =
g_param_spec_object ("backend",
"backend",
"MetaBackend",
META_TYPE_BACKEND,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, obj_props);
}

View File

@@ -42,10 +42,14 @@ struct _MetaRendererClass
CoglRenderer * (* create_cogl_renderer) (MetaRenderer *renderer);
MetaRendererView * (* create_view) (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor);
MetaLogicalMonitor *logical_monitor,
MetaOutput *output,
MetaCrtc *crtc);
void (* rebuild_views) (MetaRenderer *renderer);
};
MetaBackend * meta_renderer_get_backend (MetaRenderer *renderer);
CoglRenderer * meta_renderer_create_cogl_renderer (MetaRenderer *renderer);
void meta_renderer_rebuild_views (MetaRenderer *renderer);
@@ -56,7 +60,6 @@ void meta_renderer_set_legacy_view (MetaRenderer *renderer,
META_EXPORT_TEST
GList * meta_renderer_get_views (MetaRenderer *renderer);
MetaRendererView * meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor);
gboolean meta_renderer_is_hardware_accelerated (MetaRenderer *renderer);
#endif /* META_RENDERER_H */

View File

@@ -42,9 +42,9 @@ struct _MetaScreenCastMonitorStreamSrc
MetaScreenCastStreamSrc parent;
gboolean cursor_bitmap_invalid;
gboolean hw_cursor_inhibited;
MetaStageWatch *paint_watch;
MetaStageWatch *after_paint_watch;
GList *watches;
gulong cursor_moved_handler_id;
gulong cursor_changed_handler_id;
@@ -226,9 +226,13 @@ inhibit_hw_cursor (MetaScreenCastMonitorStreamSrc *monitor_src)
MetaCursorRenderer *cursor_renderer;
MetaHwCursorInhibitor *inhibitor;
g_return_if_fail (!monitor_src->hw_cursor_inhibited);
cursor_renderer = get_cursor_renderer (monitor_src);
inhibitor = META_HW_CURSOR_INHIBITOR (monitor_src);
meta_cursor_renderer_add_hw_cursor_inhibitor (cursor_renderer, inhibitor);
monitor_src->hw_cursor_inhibited = TRUE;
}
static void
@@ -237,9 +241,53 @@ uninhibit_hw_cursor (MetaScreenCastMonitorStreamSrc *monitor_src)
MetaCursorRenderer *cursor_renderer;
MetaHwCursorInhibitor *inhibitor;
g_return_if_fail (monitor_src->hw_cursor_inhibited);
cursor_renderer = get_cursor_renderer (monitor_src);
inhibitor = META_HW_CURSOR_INHIBITOR (monitor_src);
meta_cursor_renderer_remove_hw_cursor_inhibitor (cursor_renderer, inhibitor);
monitor_src->hw_cursor_inhibited = FALSE;
}
static void
add_view_painted_watches (MetaScreenCastMonitorStreamSrc *monitor_src,
MetaStageWatchPhase watch_phase)
{
MetaBackend *backend = get_backend (monitor_src);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
ClutterStage *stage;
MetaStage *meta_stage;
MetaMonitor *monitor;
MetaLogicalMonitor *logical_monitor;
MetaRectangle logical_monitor_layout;
GList *l;
stage = get_stage (monitor_src);
meta_stage = META_STAGE (stage);
monitor = get_monitor (monitor_src);
logical_monitor = meta_monitor_get_logical_monitor (monitor);
logical_monitor_layout = meta_logical_monitor_get_layout (logical_monitor);
for (l = meta_renderer_get_views (renderer); l; l = l->next)
{
MetaRendererView *view = l->data;
MetaRectangle view_layout;
clutter_stage_view_get_layout (CLUTTER_STAGE_VIEW (view), &view_layout);
if (meta_rectangle_overlap (&logical_monitor_layout, &view_layout))
{
MetaStageWatch *watch;
watch = meta_stage_watch_view (meta_stage,
CLUTTER_STAGE_VIEW (view),
watch_phase,
stage_painted,
monitor_src);
monitor_src->watches = g_list_prepend (monitor_src->watches, watch);
}
}
}
static void
@@ -248,28 +296,12 @@ meta_screen_cast_monitor_stream_src_enable (MetaScreenCastStreamSrc *src)
MetaScreenCastMonitorStreamSrc *monitor_src =
META_SCREEN_CAST_MONITOR_STREAM_SRC (src);
MetaBackend *backend = get_backend (monitor_src);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
MetaRendererView *view;
MetaMonitor *monitor;
MetaLogicalMonitor *logical_monitor;
MetaStage *meta_stage;
ClutterStageView *stage_view;
ClutterStage *stage;
MetaScreenCastStream *stream;
stream = meta_screen_cast_stream_src_get_stream (src);
stage = get_stage (monitor_src);
meta_stage = META_STAGE (stage);
monitor = get_monitor (monitor_src);
logical_monitor = meta_monitor_get_logical_monitor (monitor);
view = meta_renderer_get_view_from_logical_monitor (renderer,
logical_monitor);
if (view)
stage_view = CLUTTER_STAGE_VIEW (view);
else
stage_view = NULL;
switch (meta_screen_cast_stream_get_cursor_mode (stream))
{
@@ -284,21 +316,13 @@ meta_screen_cast_monitor_stream_src_enable (MetaScreenCastStreamSrc *src)
monitor_src);
G_GNUC_FALLTHROUGH;
case META_SCREEN_CAST_CURSOR_MODE_HIDDEN:
monitor_src->paint_watch =
meta_stage_watch_view (meta_stage,
stage_view,
META_STAGE_WATCH_AFTER_ACTOR_PAINT,
stage_painted,
monitor_src);
add_view_painted_watches (monitor_src,
META_STAGE_WATCH_AFTER_ACTOR_PAINT);
break;
case META_SCREEN_CAST_CURSOR_MODE_EMBEDDED:
inhibit_hw_cursor (monitor_src);
monitor_src->after_paint_watch =
meta_stage_watch_view (meta_stage,
stage_view,
META_STAGE_WATCH_AFTER_PAINT,
stage_painted,
monitor_src);
add_view_painted_watches (monitor_src,
META_STAGE_WATCH_AFTER_PAINT);
break;
}
@@ -314,22 +338,21 @@ meta_screen_cast_monitor_stream_src_disable (MetaScreenCastStreamSrc *src)
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
ClutterStage *stage;
MetaStage *meta_stage;
GList *l;
stage = get_stage (monitor_src);
meta_stage = META_STAGE (stage);
if (monitor_src->paint_watch)
for (l = monitor_src->watches; l; l = l->next)
{
meta_stage_remove_watch (meta_stage, monitor_src->paint_watch);
monitor_src->paint_watch = NULL;
}
MetaStageWatch *watch = l->data;
if (monitor_src->after_paint_watch)
{
meta_stage_remove_watch (meta_stage, monitor_src->after_paint_watch);
monitor_src->after_paint_watch = NULL;
uninhibit_hw_cursor (monitor_src);
meta_stage_remove_watch (meta_stage, watch);
}
g_clear_pointer (&monitor_src->watches, g_list_free);
if (monitor_src->hw_cursor_inhibited)
uninhibit_hw_cursor (monitor_src);
g_clear_signal_handler (&monitor_src->cursor_moved_handler_id,
cursor_tracker);
@@ -358,6 +381,66 @@ meta_screen_cast_monitor_stream_src_record_frame (MetaScreenCastStreamSrc *src,
return TRUE;
}
static gboolean
meta_screen_cast_monitor_stream_src_blit_to_framebuffer (MetaScreenCastStreamSrc *src,
CoglFramebuffer *framebuffer)
{
MetaScreenCastMonitorStreamSrc *monitor_src =
META_SCREEN_CAST_MONITOR_STREAM_SRC (src);
MetaBackend *backend = get_backend (monitor_src);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaMonitor *monitor;
MetaLogicalMonitor *logical_monitor;
MetaRectangle logical_monitor_layout;
GList *l;
float view_scale;
monitor = get_monitor (monitor_src);
logical_monitor = meta_monitor_get_logical_monitor (monitor);
logical_monitor_layout = meta_logical_monitor_get_layout (logical_monitor);
if (meta_is_stage_views_scaled ())
view_scale = meta_logical_monitor_get_scale (logical_monitor);
else
view_scale = 1.0;
for (l = meta_renderer_get_views (renderer); l; l = l->next)
{
ClutterStageView *view = CLUTTER_STAGE_VIEW (l->data);
g_autoptr (GError) error = NULL;
CoglFramebuffer *view_framebuffer;
MetaRectangle view_layout;
int x, y;
clutter_stage_view_get_layout (view, &view_layout);
if (!meta_rectangle_overlap (&logical_monitor_layout, &view_layout))
continue;
view_framebuffer = clutter_stage_view_get_framebuffer (view);
x = (int) roundf ((view_layout.x - logical_monitor_layout.x) * view_scale);
y = (int) roundf ((view_layout.y - logical_monitor_layout.y) * view_scale);
if (!cogl_blit_framebuffer (view_framebuffer,
framebuffer,
0, 0,
x, y,
cogl_framebuffer_get_width (view_framebuffer),
cogl_framebuffer_get_height (view_framebuffer),
&error))
{
g_warning ("Error blitting view into DMABuf framebuffer: %s",
error->message);
return FALSE;
}
}
cogl_framebuffer_finish (framebuffer);
return TRUE;
}
static void
meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *src,
struct spa_meta_cursor *spa_meta_cursor)
@@ -367,13 +450,11 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
MetaBackend *backend = get_backend (monitor_src);
MetaCursorRenderer *cursor_renderer =
meta_backend_get_cursor_renderer (backend);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaCursorSprite *cursor_sprite;
MetaMonitor *monitor;
MetaLogicalMonitor *logical_monitor;
MetaRectangle logical_monitor_layout;
graphene_rect_t logical_monitor_rect;
MetaRendererView *view;
float view_scale;
graphene_point_t cursor_position;
int x, y;
@@ -393,10 +474,8 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
logical_monitor_rect =
meta_rectangle_to_graphene_rect (&logical_monitor_layout);
view = meta_renderer_get_view_from_logical_monitor (renderer,
logical_monitor);
if (view)
view_scale = clutter_stage_view_get_scale (CLUTTER_STAGE_VIEW (view));
if (meta_is_stage_views_scaled ())
view_scale = meta_logical_monitor_get_scale (logical_monitor);
else
view_scale = 1.0;
@@ -483,6 +562,8 @@ meta_screen_cast_monitor_stream_src_class_init (MetaScreenCastMonitorStreamSrcCl
src_class->enable = meta_screen_cast_monitor_stream_src_enable;
src_class->disable = meta_screen_cast_monitor_stream_src_disable;
src_class->record_frame = meta_screen_cast_monitor_stream_src_record_frame;
src_class->blit_to_framebuffer =
meta_screen_cast_monitor_stream_src_blit_to_framebuffer;
src_class->set_cursor_metadata =
meta_screen_cast_monitor_stream_src_set_cursor_metadata;
}

View File

@@ -48,6 +48,8 @@ struct _MetaScreenCastSession
GList *streams;
MetaScreenCastSessionHandle *handle;
gboolean disable_animations;
};
static void
@@ -89,6 +91,10 @@ init_remote_access_handle (MetaScreenCastSession *session)
remote_access_controller = meta_backend_get_remote_access_controller (backend);
remote_access_handle = META_REMOTE_ACCESS_HANDLE (session->handle);
meta_remote_access_handle_set_disable_animations (remote_access_handle,
session->disable_animations);
meta_remote_access_controller_notify_new_handle (remote_access_controller,
remote_access_handle);
}
@@ -167,6 +173,13 @@ meta_screen_cast_session_get_screen_cast (MetaScreenCastSession *session)
return session->screen_cast;
}
void
meta_screen_cast_session_set_disable_animations (MetaScreenCastSession *session,
gboolean disable_animations)
{
session->disable_animations = disable_animations;
}
char *
meta_screen_cast_session_get_object_path (MetaScreenCastSession *session)
{

View File

@@ -64,4 +64,7 @@ MetaScreenCastStream * meta_screen_cast_session_get_stream (MetaScreenCastSessio
MetaScreenCast * meta_screen_cast_session_get_screen_cast (MetaScreenCastSession *session);
void meta_screen_cast_session_set_disable_animations (MetaScreenCastSession *session,
gboolean disable_animations);
#endif /* META_SCREEN_CAST_SESSION_H */

View File

@@ -25,10 +25,12 @@
#include "backends/meta-screen-cast-stream-src.h"
#include <errno.h>
#include <fcntl.h>
#include <pipewire/pipewire.h>
#include <spa/param/props.h>
#include <spa/param/format-utils.h>
#include <spa/param/video/format-utils.h>
#include <spa/utils/result.h>
#include <stdint.h>
#include <sys/mman.h>
@@ -62,15 +64,6 @@ enum
static guint signals[N_SIGNALS];
typedef struct _MetaSpaType
{
struct spa_type_media_type media_type;
struct spa_type_media_subtype media_subtype;
struct spa_type_format_video format_video;
struct spa_type_video_format video_format;
uint32_t meta_cursor;
} MetaSpaType;
typedef struct _MetaPipeWireSource
{
GSource base;
@@ -82,22 +75,24 @@ typedef struct _MetaScreenCastStreamSrcPrivate
{
MetaScreenCastStream *stream;
struct pw_context *pipewire_context;
struct pw_core *pipewire_core;
struct pw_remote *pipewire_remote;
struct pw_type *pipewire_type;
MetaPipeWireSource *pipewire_source;
struct spa_hook pipewire_remote_listener;
struct spa_hook pipewire_core_listener;
gboolean is_enabled;
struct pw_stream *pipewire_stream;
struct spa_hook pipewire_stream_listener;
uint32_t node_id;
MetaSpaType spa_type;
struct spa_video_info_raw video_format;
int video_stride;
uint64_t last_frame_timestamp_us;
GHashTable *dmabuf_handles;
int stream_width;
int stream_height;
} MetaScreenCastStreamSrcPrivate;
@@ -112,8 +107,6 @@ G_DEFINE_TYPE_WITH_CODE (MetaScreenCastStreamSrc,
meta_screen_cast_stream_src_init_initable_iface)
G_ADD_PRIVATE (MetaScreenCastStreamSrc))
#define PROP_RANGE(min, max) 2, (min), (max)
static void
meta_screen_cast_stream_src_get_specs (MetaScreenCastStreamSrc *src,
int *width,
@@ -149,6 +142,16 @@ meta_screen_cast_stream_src_record_frame (MetaScreenCastStreamSrc *src,
return klass->record_frame (src, data);
}
static gboolean
meta_screen_cast_stream_src_blit_to_framebuffer (MetaScreenCastStreamSrc *src,
CoglFramebuffer *framebuffer)
{
MetaScreenCastStreamSrcClass *klass =
META_SCREEN_CAST_STREAM_SRC_GET_CLASS (src);
return klass->blit_to_framebuffer (src, framebuffer);
}
static void
meta_screen_cast_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *src,
struct spa_meta_cursor *spa_meta_cursor)
@@ -286,9 +289,6 @@ meta_screen_cast_stream_src_set_empty_cursor_sprite_metadata (MetaScreenCastStre
int x,
int y)
{
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
MetaSpaType *spa_type = &priv->spa_type;
struct spa_meta_bitmap *spa_meta_bitmap;
spa_meta_cursor->id = 1;
@@ -300,7 +300,7 @@ meta_screen_cast_stream_src_set_empty_cursor_sprite_metadata (MetaScreenCastStre
spa_meta_bitmap = SPA_MEMBER (spa_meta_cursor,
spa_meta_cursor->bitmap_offset,
struct spa_meta_bitmap);
spa_meta_bitmap->format = spa_type->video_format.RGBA;
spa_meta_bitmap->format = SPA_VIDEO_FORMAT_RGBA;
spa_meta_bitmap->offset = sizeof (struct spa_meta_bitmap);
spa_meta_cursor->hotspot.x = 0;
@@ -317,9 +317,6 @@ meta_screen_cast_stream_src_set_cursor_sprite_metadata (MetaScreenCastStreamSrc
int y,
float scale)
{
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
MetaSpaType *spa_type = &priv->spa_type;
CoglTexture *cursor_texture;
struct spa_meta_bitmap *spa_meta_bitmap;
int hotspot_x, hotspot_y;
@@ -346,7 +343,7 @@ meta_screen_cast_stream_src_set_cursor_sprite_metadata (MetaScreenCastStreamSrc
spa_meta_bitmap = SPA_MEMBER (spa_meta_cursor,
spa_meta_cursor->bitmap_offset,
struct spa_meta_bitmap);
spa_meta_bitmap->format = spa_type->video_format.RGBA;
spa_meta_bitmap->format = SPA_VIDEO_FORMAT_RGBA;
spa_meta_bitmap->offset = sizeof (struct spa_meta_bitmap);
meta_cursor_sprite_get_hotspot (cursor_sprite, &hotspot_x, &hotspot_y);
@@ -382,20 +379,17 @@ static void
add_cursor_metadata (MetaScreenCastStreamSrc *src,
struct spa_buffer *spa_buffer)
{
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
MetaSpaType *spa_type = &priv->spa_type;
struct spa_meta_cursor *spa_meta_cursor;
spa_meta_cursor = spa_buffer_find_meta (spa_buffer, spa_type->meta_cursor);
spa_meta_cursor = spa_buffer_find_meta_data (spa_buffer, SPA_META_Cursor,
sizeof (*spa_meta_cursor));
if (spa_meta_cursor)
meta_screen_cast_stream_src_set_cursor_metadata (src, spa_meta_cursor);
}
static void
maybe_record_cursor (MetaScreenCastStreamSrc *src,
struct spa_buffer *spa_buffer,
uint8_t *data)
struct spa_buffer *spa_buffer)
{
MetaScreenCastStream *stream = meta_screen_cast_stream_src_get_stream (src);
@@ -412,6 +406,33 @@ maybe_record_cursor (MetaScreenCastStreamSrc *src,
g_assert_not_reached ();
}
static gboolean
do_record_frame (MetaScreenCastStreamSrc *src,
struct spa_buffer *spa_buffer,
uint8_t *data)
{
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
if (spa_buffer->datas[0].data ||
spa_buffer->datas[0].type == SPA_DATA_MemFd)
{
return meta_screen_cast_stream_src_record_frame (src, data);
}
else if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf)
{
CoglDmaBufHandle *dmabuf_handle =
g_hash_table_lookup (priv->dmabuf_handles,
GINT_TO_POINTER (spa_buffer->datas[0].fd));
CoglFramebuffer *dmabuf_fbo =
cogl_dma_buf_handle_get_framebuffer (dmabuf_handle);
return meta_screen_cast_stream_src_blit_to_framebuffer (src, dmabuf_fbo);
}
return FALSE;
}
void
meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src)
{
@@ -420,8 +441,7 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src)
MetaRectangle crop_rect;
struct pw_buffer *buffer;
struct spa_buffer *spa_buffer;
uint8_t *map = NULL;
uint8_t *data;
uint8_t *data = NULL;
uint64_t now_us;
now_us = g_get_monotonic_time ();
@@ -442,55 +462,40 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src)
}
spa_buffer = buffer->buffer;
data = spa_buffer->datas[0].data;
if (spa_buffer->datas[0].data)
if (spa_buffer->datas[0].type != SPA_DATA_DmaBuf && !data)
{
data = spa_buffer->datas[0].data;
}
else if (spa_buffer->datas[0].type == priv->pipewire_type->data.MemFd)
{
map = mmap (NULL, spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset,
PROT_READ | PROT_WRITE, MAP_SHARED,
spa_buffer->datas[0].fd, 0);
if (map == MAP_FAILED)
{
g_warning ("Failed to mmap pipewire stream buffer: %s\n",
strerror (errno));
return;
}
data = SPA_MEMBER (map, spa_buffer->datas[0].mapoffset, uint8_t);
}
else
{
g_warning ("Unhandled spa buffer type: %d", spa_buffer->datas[0].type);
g_critical ("Invalid buffer data");
return;
}
if (meta_screen_cast_stream_src_record_frame (src, data))
if (do_record_frame (src, spa_buffer, data))
{
struct spa_meta_video_crop *spa_meta_video_crop;
struct spa_meta_region *spa_meta_video_crop;
spa_buffer->datas[0].chunk->size = spa_buffer->datas[0].maxsize;
spa_buffer->datas[0].chunk->stride = priv->video_stride;
/* Update VideoCrop if needed */
spa_meta_video_crop =
spa_buffer_find_meta (spa_buffer, priv->pipewire_type->meta.VideoCrop);
spa_buffer_find_meta_data (spa_buffer, SPA_META_VideoCrop,
sizeof (*spa_meta_video_crop));
if (spa_meta_video_crop)
{
if (meta_screen_cast_stream_src_get_videocrop (src, &crop_rect))
{
spa_meta_video_crop->x = crop_rect.x;
spa_meta_video_crop->y = crop_rect.y;
spa_meta_video_crop->width = crop_rect.width;
spa_meta_video_crop->height = crop_rect.height;
spa_meta_video_crop->region.position.x = crop_rect.x;
spa_meta_video_crop->region.position.y = crop_rect.y;
spa_meta_video_crop->region.size.width = crop_rect.width;
spa_meta_video_crop->region.size.height = crop_rect.height;
}
else
{
spa_meta_video_crop->x = 0;
spa_meta_video_crop->y = 0;
spa_meta_video_crop->width = priv->stream_width;
spa_meta_video_crop->height = priv->stream_height;
spa_meta_video_crop->region.position.x = 0;
spa_meta_video_crop->region.position.y = 0;
spa_meta_video_crop->region.size.width = priv->stream_width;
spa_meta_video_crop->region.size.height = priv->stream_height;
}
}
}
@@ -499,13 +504,10 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src)
spa_buffer->datas[0].chunk->size = 0;
}
maybe_record_cursor (src, spa_buffer, data);
maybe_record_cursor (src, spa_buffer);
priv->last_frame_timestamp_us = now_us;
if (map)
munmap (map, spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset);
pw_stream_queue_buffer (priv->pipewire_stream, buffer);
}
@@ -555,7 +557,6 @@ on_stream_state_changed (void *data,
MetaScreenCastStreamSrc *src = data;
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
uint32_t node_id;
switch (state)
{
@@ -563,14 +564,12 @@ on_stream_state_changed (void *data,
g_warning ("pipewire stream error: %s", error_message);
meta_screen_cast_stream_src_notify_closed (src);
break;
case PW_STREAM_STATE_CONFIGURE:
node_id = pw_stream_get_node_id (priv->pipewire_stream);
g_signal_emit (src, signals[READY], 0, (unsigned int) node_id);
break;
case PW_STREAM_STATE_UNCONNECTED:
case PW_STREAM_STATE_CONNECTING:
case PW_STREAM_STATE_READY:
case PW_STREAM_STATE_PAUSED:
if (priv->node_id == SPA_ID_INVALID && priv->pipewire_stream)
{
priv->node_id = pw_stream_get_node_id (priv->pipewire_stream);
g_signal_emit (src, signals[READY], 0, (unsigned int) priv->node_id);
}
if (meta_screen_cast_stream_src_is_enabled (src))
meta_screen_cast_stream_src_disable (src);
break;
@@ -578,68 +577,175 @@ on_stream_state_changed (void *data,
if (!meta_screen_cast_stream_src_is_enabled (src))
meta_screen_cast_stream_src_enable (src);
break;
case PW_STREAM_STATE_UNCONNECTED:
case PW_STREAM_STATE_CONNECTING:
break;
}
}
static void
on_stream_format_changed (void *data,
const struct spa_pod *format)
on_stream_param_changed (void *data,
uint32_t id,
const struct spa_pod *format)
{
MetaScreenCastStreamSrc *src = data;
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
struct pw_type *pipewire_type = priv->pipewire_type;
uint8_t params_buffer[1024];
int32_t width, height, stride, size;
struct spa_pod_builder pod_builder;
const struct spa_pod *params[3];
const int bpp = 4;
if (!format)
{
pw_stream_finish_format (priv->pipewire_stream, 0, NULL, 0);
return;
}
if (!format || id != SPA_PARAM_Format)
return;
spa_format_video_raw_parse (format,
&priv->video_format,
&priv->spa_type.format_video);
&priv->video_format);
width = priv->video_format.size.width;
height = priv->video_format.size.height;
stride = SPA_ROUND_UP_N (width * bpp, 4);
size = height * stride;
priv->video_stride = stride;
pod_builder = SPA_POD_BUILDER_INIT (params_buffer, sizeof (params_buffer));
params[0] = spa_pod_builder_object (
params[0] = spa_pod_builder_add_object (
&pod_builder,
pipewire_type->param.idBuffers, pipewire_type->param_buffers.Buffers,
":", pipewire_type->param_buffers.size, "i", size,
":", pipewire_type->param_buffers.stride, "i", stride,
":", pipewire_type->param_buffers.buffers, "iru", 16, PROP_RANGE (2, 16),
":", pipewire_type->param_buffers.align, "i", 16);
SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int (16, 2, 16),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int (1),
SPA_PARAM_BUFFERS_size, SPA_POD_Int (size),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int (stride),
SPA_PARAM_BUFFERS_align, SPA_POD_Int (16));
params[1] = spa_pod_builder_object (
params[1] = spa_pod_builder_add_object (
&pod_builder,
pipewire_type->param.idMeta, pipewire_type->param_meta.Meta,
":", pipewire_type->param_meta.type, "I", pipewire_type->meta.VideoCrop,
":", pipewire_type->param_meta.size, "i", sizeof (struct spa_meta_video_crop));
SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
SPA_PARAM_META_type, SPA_POD_Id (SPA_META_VideoCrop),
SPA_PARAM_META_size, SPA_POD_Int (sizeof (struct spa_meta_region)));
params[2] = spa_pod_builder_object (
params[2] = spa_pod_builder_add_object (
&pod_builder,
pipewire_type->param.idMeta, pipewire_type->param_meta.Meta,
":", pipewire_type->param_meta.type, "I", priv->spa_type.meta_cursor,
":", pipewire_type->param_meta.size, "i", CURSOR_META_SIZE (64, 64));
SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
SPA_PARAM_META_type, SPA_POD_Id (SPA_META_Cursor),
SPA_PARAM_META_size, SPA_POD_Int (CURSOR_META_SIZE (64, 64)));
pw_stream_finish_format (priv->pipewire_stream, 0,
params, G_N_ELEMENTS (params));
pw_stream_update_params (priv->pipewire_stream, params, G_N_ELEMENTS (params));
}
static void
on_stream_add_buffer (void *data,
struct pw_buffer *buffer)
{
MetaScreenCastStreamSrc *src = data;
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
CoglContext *context =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
CoglRenderer *renderer = cogl_context_get_renderer (context);
g_autoptr (GError) error = NULL;
CoglDmaBufHandle *dmabuf_handle;
struct spa_buffer *spa_buffer = buffer->buffer;
struct spa_data *spa_data = spa_buffer->datas;
const int bpp = 4;
int stride;
stride = SPA_ROUND_UP_N (priv->video_format.size.width * bpp, 4);
spa_data[0].mapoffset = 0;
spa_data[0].maxsize = stride * priv->video_format.size.height;
dmabuf_handle = cogl_renderer_create_dma_buf (renderer,
priv->stream_width,
priv->stream_height,
&error);
if (error)
g_debug ("Error exporting DMA buffer handle: %s", error->message);
if (dmabuf_handle)
{
spa_data[0].type = SPA_DATA_DmaBuf;
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
spa_data[0].fd = cogl_dma_buf_handle_get_fd (dmabuf_handle);
spa_data[0].data = NULL;
g_hash_table_insert (priv->dmabuf_handles,
GINT_TO_POINTER (spa_data[0].fd),
dmabuf_handle);
}
else
{
unsigned int seals;
/* Fallback to a memfd buffer */
spa_data[0].type = SPA_DATA_MemFd;
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
spa_data[0].fd = memfd_create ("mutter-screen-cast-memfd",
MFD_CLOEXEC | MFD_ALLOW_SEALING);
if (spa_data[0].fd == -1)
{
g_critical ("Can't create memfd: %m");
return;
}
spa_data[0].mapoffset = 0;
spa_data[0].maxsize = stride * priv->video_format.size.height;
if (ftruncate (spa_data[0].fd, spa_data[0].maxsize) < 0)
{
g_critical ("Can't truncate to %d: %m", spa_data[0].maxsize);
return;
}
seals = F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL;
if (fcntl (spa_data[0].fd, F_ADD_SEALS, seals) == -1)
g_warning ("Failed to add seals: %m");
spa_data[0].data = mmap (NULL,
spa_data[0].maxsize,
PROT_READ | PROT_WRITE,
MAP_SHARED,
spa_data[0].fd,
spa_data[0].mapoffset);
if (spa_data[0].data == MAP_FAILED)
{
g_critical ("Failed to mmap memory: %m");
return;
}
}
}
static void
on_stream_remove_buffer (void *data,
struct pw_buffer *buffer)
{
MetaScreenCastStreamSrc *src = data;
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
struct spa_buffer *spa_buffer = buffer->buffer;
struct spa_data *spa_data = spa_buffer->datas;
if (spa_data[0].type == SPA_DATA_DmaBuf)
{
if (!g_hash_table_remove (priv->dmabuf_handles, GINT_TO_POINTER (spa_data[0].fd)))
g_critical ("Failed to remove non-exported DMA buffer");
}
else if (spa_data[0].type == SPA_DATA_MemFd)
{
munmap (spa_data[0].data, spa_data[0].maxsize);
close (spa_data[0].fd);
}
}
static const struct pw_stream_events stream_events = {
PW_VERSION_STREAM_EVENTS,
.state_changed = on_stream_state_changed,
.format_changed = on_stream_format_changed,
.param_changed = on_stream_param_changed,
.add_buffer = on_stream_add_buffer,
.remove_buffer = on_stream_remove_buffer,
};
static struct pw_stream *
@@ -652,8 +758,6 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
uint8_t buffer[1024];
struct spa_pod_builder pod_builder =
SPA_POD_BUILDER_INIT (buffer, sizeof (buffer));
MetaSpaType *spa_type = &priv->spa_type;
struct pw_type *pipewire_type = priv->pipewire_type;
float frame_rate;
MetaFraction frame_rate_fraction;
struct spa_fraction max_framerate;
@@ -661,7 +765,9 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
const struct spa_pod *params[1];
int result;
pipewire_stream = pw_stream_new (priv->pipewire_remote,
priv->node_id = SPA_ID_INVALID;
pipewire_stream = pw_stream_new (priv->pipewire_core,
"meta-screen-cast-src",
NULL);
if (!pipewire_stream)
@@ -682,17 +788,17 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
max_framerate = SPA_FRACTION (frame_rate_fraction.num,
frame_rate_fraction.denom);
params[0] = spa_pod_builder_object (
params[0] = spa_pod_builder_add_object (
&pod_builder,
pipewire_type->param.idEnumFormat, pipewire_type->spa_format,
"I", spa_type->media_type.video,
"I", spa_type->media_subtype.raw,
":", spa_type->format_video.format, "I", spa_type->video_format.BGRx,
":", spa_type->format_video.size, "R", &SPA_RECTANGLE (priv->stream_width,
priv->stream_height),
":", spa_type->format_video.framerate, "F", &SPA_FRACTION (0, 1),
":", spa_type->format_video.max_framerate, "Fru", &max_framerate,
PROP_RANGE (&min_framerate,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
SPA_FORMAT_mediaType, SPA_POD_Id (SPA_MEDIA_TYPE_video),
SPA_FORMAT_mediaSubtype, SPA_POD_Id (SPA_MEDIA_SUBTYPE_raw),
SPA_FORMAT_VIDEO_format, SPA_POD_Id (SPA_VIDEO_FORMAT_BGRx),
SPA_FORMAT_VIDEO_size, SPA_POD_Rectangle (&SPA_RECTANGLE (priv->stream_width,
priv->stream_height)),
SPA_FORMAT_VIDEO_framerate, SPA_POD_Fraction (&SPA_FRACTION (0, 1)),
SPA_FORMAT_VIDEO_maxFramerate, SPA_POD_CHOICE_RANGE_Fraction (&max_framerate,
&min_framerate,
&max_framerate));
pw_stream_add_listener (pipewire_stream,
@@ -702,9 +808,9 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
result = pw_stream_connect (pipewire_stream,
PW_DIRECTION_OUTPUT,
NULL,
SPA_ID_INVALID,
(PW_STREAM_FLAG_DRIVER |
PW_STREAM_FLAG_MAP_BUFFERS),
PW_STREAM_FLAG_ALLOC_BUFFERS),
params, G_N_ELEMENTS (params));
if (result != 0)
{
@@ -717,40 +823,18 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
}
static void
on_state_changed (void *data,
enum pw_remote_state old,
enum pw_remote_state state,
const char *error_message)
on_core_error (void *data,
uint32_t id,
int seq,
int res,
const char *message)
{
MetaScreenCastStreamSrc *src = data;
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
struct pw_stream *pipewire_stream;
GError *error = NULL;
switch (state)
{
case PW_REMOTE_STATE_ERROR:
g_warning ("pipewire remote error: %s\n", error_message);
meta_screen_cast_stream_src_notify_closed (src);
break;
case PW_REMOTE_STATE_CONNECTED:
pipewire_stream = create_pipewire_stream (src, &error);
if (!pipewire_stream)
{
g_warning ("Could not create pipewire stream: %s", error->message);
g_error_free (error);
meta_screen_cast_stream_src_notify_closed (src);
}
else
{
priv->pipewire_stream = pipewire_stream;
}
break;
case PW_REMOTE_STATE_UNCONNECTED:
case PW_REMOTE_STATE_CONNECTING:
break;
}
g_warning ("pipewire remote error: id:%u %s", id, message);
if (id == PW_ID_CORE && res == -EPIPE)
meta_screen_cast_stream_src_notify_closed (src);
}
static gboolean
@@ -793,17 +877,6 @@ static GSourceFuncs pipewire_source_funcs =
pipewire_loop_source_finalize
};
static void
init_spa_type (MetaSpaType *type,
struct spa_type_map *map)
{
spa_type_media_type_map (map, &type->media_type);
spa_type_media_subtype_map (map, &type->media_subtype);
spa_type_format_video_map (map, &type->format_video);
spa_type_video_format_map (map, &type->video_format);
type->meta_cursor = spa_type_map_get_id(map, SPA_TYPE_META__Cursor);
}
static MetaPipeWireSource *
create_pipewire_source (void)
{
@@ -829,9 +902,9 @@ create_pipewire_source (void)
return pipewire_source;
}
static const struct pw_remote_events remote_events = {
PW_VERSION_REMOTE_EVENTS,
.state_changed = on_state_changed,
static const struct pw_core_events core_events = {
PW_VERSION_CORE_EVENTS,
.error = on_core_error,
};
static gboolean
@@ -851,37 +924,31 @@ meta_screen_cast_stream_src_initable_init (GInitable *initable,
return FALSE;
}
priv->pipewire_core = pw_core_new (priv->pipewire_source->pipewire_loop,
NULL);
priv->pipewire_context = pw_context_new (priv->pipewire_source->pipewire_loop,
NULL, 0);
if (!priv->pipewire_context)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Failed to create pipewire context");
return FALSE;
}
priv->pipewire_core = pw_context_connect (priv->pipewire_context, NULL, 0);
if (!priv->pipewire_core)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Failed to create pipewire core");
"Couldn't connect pipewire context");
return FALSE;
}
priv->pipewire_remote = pw_remote_new (priv->pipewire_core, NULL, 0);
if (!priv->pipewire_remote)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Couldn't creat pipewire remote");
return FALSE;
}
pw_core_add_listener (priv->pipewire_core,
&priv->pipewire_core_listener,
&core_events,
src);
pw_remote_add_listener (priv->pipewire_remote,
&priv->pipewire_remote_listener,
&remote_events,
src);
priv->pipewire_type = pw_core_get_type (priv->pipewire_core);
init_spa_type (&priv->spa_type, priv->pipewire_type->map);
if (pw_remote_connect (priv->pipewire_remote) != 0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Couldn't connect pipewire remote");
return FALSE;
}
priv->pipewire_stream = create_pipewire_stream (src, error);
if (!priv->pipewire_stream)
return FALSE;
return TRUE;
}
@@ -911,9 +978,10 @@ meta_screen_cast_stream_src_finalize (GObject *object)
if (meta_screen_cast_stream_src_is_enabled (src))
meta_screen_cast_stream_src_disable (src);
g_clear_pointer (&priv->dmabuf_handles, g_hash_table_destroy);
g_clear_pointer (&priv->pipewire_stream, pw_stream_destroy);
g_clear_pointer (&priv->pipewire_remote, pw_remote_destroy);
g_clear_pointer (&priv->pipewire_core, pw_core_destroy);
g_clear_pointer (&priv->pipewire_core, pw_core_disconnect);
g_clear_pointer (&priv->pipewire_context, pw_context_destroy);
g_source_destroy (&priv->pipewire_source->base);
G_OBJECT_CLASS (meta_screen_cast_stream_src_parent_class)->finalize (object);
@@ -962,6 +1030,12 @@ meta_screen_cast_stream_src_get_property (GObject *object,
static void
meta_screen_cast_stream_src_init (MetaScreenCastStreamSrc *src)
{
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
priv->dmabuf_handles =
g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) cogl_dma_buf_handle_free);
}
static void

View File

@@ -55,6 +55,8 @@ struct _MetaScreenCastStreamSrcClass
void (* disable) (MetaScreenCastStreamSrc *src);
gboolean (* record_frame) (MetaScreenCastStreamSrc *src,
uint8_t *data);
gboolean (* blit_to_framebuffer) (MetaScreenCastStreamSrc *src,
CoglFramebuffer *framebuffer);
gboolean (* get_videocrop) (MetaScreenCastStreamSrc *src,
MetaRectangle *crop_rect);
void (* set_cursor_metadata) (MetaScreenCastStreamSrc *src,

View File

@@ -401,6 +401,25 @@ meta_screen_cast_window_stream_src_record_frame (MetaScreenCastStreamSrc *src,
return TRUE;
}
static gboolean
meta_screen_cast_window_stream_src_blit_to_framebuffer (MetaScreenCastStreamSrc *src,
CoglFramebuffer *framebuffer)
{
MetaScreenCastWindowStreamSrc *window_src =
META_SCREEN_CAST_WINDOW_STREAM_SRC (src);
MetaRectangle stream_rect;
stream_rect.x = 0;
stream_rect.y = 0;
stream_rect.width = get_stream_width (window_src);
stream_rect.height = get_stream_height (window_src);
return
meta_screen_cast_window_blit_to_framebuffer (window_src->screen_cast_window,
&stream_rect,
framebuffer);
}
static void
meta_screen_cast_window_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *src,
struct spa_meta_cursor *spa_meta_cursor)
@@ -485,6 +504,8 @@ meta_screen_cast_window_stream_src_class_init (MetaScreenCastWindowStreamSrcClas
src_class->enable = meta_screen_cast_window_stream_src_enable;
src_class->disable = meta_screen_cast_window_stream_src_disable;
src_class->record_frame = meta_screen_cast_window_stream_src_record_frame;
src_class->blit_to_framebuffer =
meta_screen_cast_window_stream_src_blit_to_framebuffer;
src_class->get_videocrop = meta_screen_cast_window_stream_src_get_videocrop;
src_class->set_cursor_metadata = meta_screen_cast_window_stream_src_set_cursor_metadata;
}

View File

@@ -78,6 +78,17 @@ meta_screen_cast_window_capture_into (MetaScreenCastWindow *screen_cast_window,
data);
}
gboolean
meta_screen_cast_window_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
MetaRectangle *bounds,
CoglFramebuffer *framebuffer)
{
MetaScreenCastWindowInterface *iface =
META_SCREEN_CAST_WINDOW_GET_IFACE (screen_cast_window);
return iface->blit_to_framebuffer (screen_cast_window, bounds, framebuffer);
}
gboolean
meta_screen_cast_window_has_damage (MetaScreenCastWindow *screen_cast_window)
{

Some files were not shown because too many files have changed in this diff Show More