1
0
Fork 0
Commit graph

26535 commits

Author SHA1 Message Date
Jian-Hong Pan
bd6bab113b monitor-manager: Set switch config when create monitors config
It is linear config manager created when ensuring configuration.
However, the switch config is not set as LINEAR, but left as UNKNOWN.
This leads switch mode OSD always shows "Join Displays" icon, rather
than the next icon which is "External Only" after connect an external
display and press Super+P once at first time since mutter starts.

This patch moves switch config setting into
meta_monitor_config_manager_create_linear() (and the sibling functions)
to well prepare the monitors config and avoid missing settings.

This is a regression introduced by 149e4d6934.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1362
2020-08-13 20:11:15 +00:00
Christian Rauch
125f0b0351 wayland: prevent resizing of fixed-size window
Clients can set minimum and maximum to identical values to indicate a
fixed-size window. A compositor can ignore these requests and thus a client
has to ensure these limits.
To support clients that do not ensure these size limits by themselves and
to skip unnecessary function calls, we will prevent resizing requests by
the client if a fixed-size has been requested.

https://gitlab.gnome.org/GNOME/mutter/-/issues/1331
2020-08-13 19:54:32 +01:00
Jonas Ådahl
3d54f973ce clutter/main: Remove unused "fuzzy picking" option
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
678e1fcd47 clutter/stage: Remove clutter_stage_new()
It's never expected that anything creates its own stage directly, so
remove the constructor function.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
e848414f89 clutter: Remove main loop helper
It's expected to always use meta_*() or your own main loop.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
961a1376cd clutter: Remove 'eglnative' backend layer
It's completely empty, so remove it.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
72a389ef12 clutter/egl: Remove unused clutter_egl_get_egl_display()
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
3566fa7bb0 clutter/main: Remove checking windowing system
Last user in gnome-shell removed with
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1358.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
c2a155f767 clutter: Remove support not specifying backend
This was from the old clutter-as-application-library days, where it had
to try find a suitable backend. Now we already have a backend selected
(MetaBackend), and the clutter backend is already predecided depending
on that, so we don't need the code that auto detects an appropriate one
anymore.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
0d95f4d854 tests/clutter: Always use stage from backend
This removes all occurrences of creating a custom stage from the tests,
making them always use the one from MetaBackend. This will allow for
further cleanups.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
21e2f41a26 tests/clutter/conform: Make sure to destroy created actors
We're moving towards not supporting stand-alone application style
clutter stages, meaning the stage tests use will be reused instead of
recreated. To make this feasable, tests must clean up after themself.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:56 +02:00
Jonas Ådahl
06d5973851 main: Split up meta_run() into meta_start() and meta_run_main_loop()
meta_run() is still left intact and does the same as before; the new
functions are only intended to be used by tests, as they may need to set
things up after starting up. Doing so linearly in the test case is much
easier than adding callbacks, so meta_run() is split up to make this
possible.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 17:51:30 +02:00
Jonas Ådahl
ebfa94f360 clutter/eglnative: Remove unused source field
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
5279e9a922 clutter/eglnative: Remove unused timer
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
3958a019bb clutter: Move font settings reading to ClutterSettings
There is no reason to use Xsettings for the X11 backend, as it comes
from the GSetting store anyway, so move the font setting reading to
ClutterSettings and read directly from GSettings.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
7e97268592 clutter/x11: Remove helper for checking XComposite presence
It's not used by anything.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
d857edf09c clutter: Remove support for transparent windows
We're only ever a compositor, so we're never asking to be transparent.
Thus remove support for requesting to paint to GLX or EGL displays with
an alpha channel.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
787bc3d993 tests/clutter: Make $DISPLAY non-optional
All our tests rely on the nested backend, which runs on top of X11, so
there is no point in having code that tries to handle not finding a
valid $DISPLAY.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
28cb025190 clutter: Remove DELETE event, signal and vfunc
The delete event was used for signalling the close button was clicked on
clutter windows. Being a compositor we should never see these, unless
we're running nested. Remove the plumbing of the DELETE event and just
directly call meta_quit() when we see it, if we're running nested.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Jonas Ådahl
c7429e8aad clutter/main: Use "is display server" state to decide a11y routing
We checked if we were using the usig the X11 backend to decide when to
deal with a11y event posting - in order to make the clutter code less
windowing system dependent, make this check a check whether we're a
display server or not, in contrast to a window/compositing manager
client. This is made into a vfunc ot ClutterBackendClass, implemented by
MetaClutterBackendNative and MetaClutterBackendX11.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
2020-08-13 14:45:10 +02:00
Daniel Mustieles
e0562f192f Updated Spanish translation 2020-08-13 10:35:11 +02:00
Jonas Ådahl
9581e9e31b tests/stage-view: Test timeline updates clock when parent moves
Test that if a timeline got its frame clock from a parent of the
associated actor, if that actor moves across the stage so that the stage
views changes and thus the would be picked frame clock too, this is
noticed by the timeline so that it also changes to the correct frame
clock.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:05 +00:00
Jonas Ådahl
090c72b3c3 tests/stage-view: Test timelines notice stage views changing
Timelines where the frame clock was picked from a parent of the
associated actor didn't get notified about any stage views changes, as
it only listened on the associated actor. If that actor didn't actually
get its stage views changed (because it went from empty to empty), we'd
end up with a stale frame clock, leading to crashes.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:05 +00:00
Jonas Ådahl
06c4841e22 clutter/timeline: Listen to 'stage-view-changed' on picked actor
When we pick the frame clock given the associated actor, that frame
clock in fact comes from a picked actor. In order to not end up with
stale frame clocks, which may happen on e.g. hotplugs, monitor layout
changes, or non-optimal frame clocks, which may happen when the parent
used for picking the clock moves to another view, lets listen to
'stage-views-changed' on the actor used for picking the clock too.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1327
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:05 +00:00
Jonas Ådahl
c6fc3a8953 stage/x11: Only resize X11 CM stage in response to ConfigureNotify
Flip flop resize, which is the result of respecting ConfigureNotify
makes test annoyingly racy, as one cannot do

    clutter_actor_set_size (stage, 1024, 768);
    wait_for_paint (stage);
    g_assert_assert (clutter_actor_get_width (stage) == 1024);

The reason for this is any lingering ConfigureNotify event that might
arrive in an inconvenient time in response to some earlier resize.

In order to not risk breaking any current behavior in the X11 CM case
(running as a compositing window manager), only avoid changing the stage
size in response to ConfigureNotify when running nested.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:05 +00:00
Jonas Ådahl
07e964e9fc clutter/actor: Return the actor used when picking clock
The actor used might be relevant, so that e.g. if it moves or for some
other reason changes stage views, the user can listen for that.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:05 +00:00
Jonas Ådahl
9bcb03ab48 clutter/actor: Make frame clock picking semi private API
Let's not expose that outside of mutter quite yet; it's not used in
gnome-shell, and to avoid future breakage if it starts to be used, lets
move it to clutter-mutter.h so only mutter and clutter itself can use
it.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:04 +00:00
Jonas Ådahl
fb0f03640a stage-view: Add clutter_stage_view_destroy()
This aims to make sure a view and its resources are destroyed when it
should. Using references might keep certain components (e.g frame clock)
alive for too long.

We currently don't take any long lived references to the stage view
anywhere, so this doesn't matter in practice, but this may change, and
will be used by a to be added test case.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:04 +00:00
Jonas Ådahl
a13c307fa4 frame-clock: Fix indentation
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
2020-08-13 06:34:04 +00:00
Fran Dieguez
adf513c7fc Update Galician translation 2020-08-12 22:46:49 +00:00
Florian Müllner
623d562933 Bump version to 3.37.90
Update NEWS.
2020-08-11 15:20:10 +02:00
Alexandre Franke
c8f30be91d Update French translation 2020-08-11 06:11:27 +00:00
Yuri Chornoivan
7c2c3e7880 Update Ukrainian translation 2020-08-08 15:01:05 +00:00
Florian Müllner
2611ee14b5 ci: Add gnome-shell runtime dependencies
In order to run gnome-shell as part of the CI pipeline, we need
an additional runtime dependency plus python3 modules to mock
required system services and run gnome-shell-perf-tool.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1401
2020-08-07 16:49:59 +02:00
Jonas Ådahl
a54a01d1e2 wayland/dma-buf: Advertise support for 64 half point RGBA formats
Just as wl_shm, hook up the Wayland DMA-BUF protocol to the 64 bit half
point pixel formats too. This makes it possible for Wayland EGL clients
to use 64 bit pixel EGL configurations.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
d3f629bfa8 wayland/shm: Advertise support for 64 half point RGBA formats
Now that cogl understands them, hook wl_shm up so they can be used.

This also bumps the wayland-server version dependency to 1.17.90, which
corresponds to the master branch of wayland. The new formats will be
available in 1.18.0.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
8e673d5798 wayland/dma-buf: Advertise support for XRGB2101010 too
https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
115de303b0 wayland/shm: Add ARGB2101010 formats and friends
In order to get higher color pixel precision when the alpha channel is
less important. Only advertise these formats if it is supported by the
used cogl renderer.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
2d6040e2a3 wayland/shm: Advertise support for RGB565
Doesn't hurt to support it, could save memory bandwidth would any client
use it without degrading visual quality.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
5a8e4da2a8 wayland/shm: Send error if client uses unsupported format
Instead of rendering incorrectly (we fell back on some arbitrary
format), just send an error.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
d6b5f89a1c cogl: Add API to check whether a format is supported by the driver
Will let us advertise what we actually support at runtime.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:49 +00:00
Jonas Ådahl
6777a547ca cogl: Add 64 bit half-point pixel RGBA formats
In order to support the DRM formats DRM_FORMAT_ABGR16161616F and
friends, as well as the wl_shm formats WL_SHM_FORMAT_ABGR16161616F and
friends, cogl needs to have knowledge about said formats too.

We don't have a software implementation of the half point data types
however, so the pack/unpack methods remain unimplemented. We don't need
them for now, so it's not crucial that we add them.

For the GLES2 driver, currently only two formats are supported, and
since we don't currently have pack/unpack implementations, the other
formats will for now remain unsupported, until we have a half float
implementation.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:48 +00:00
Jonas Ådahl
b191f89305 cogl/gles2: Add support for actual 10 bpc formats
Only for little-endian, depends on an extension, and needs unpack/pack
for many of the formats.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:48 +00:00
Jonas Ådahl
2fc8841416 cogl: Add private feature flags for 10 bpc and 16 bpc formats
10 bpc are enabled for OpenGL and GLES 2 with the right extension. 16
bpc (half float) are enabled for OpenGL 3 and higher, and GLES 2 with
the right extension.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:48 +00:00
Jonas Ådahl
598f536c51 cogl/bitmap-packing: Use hexadecimals for bit masks
It's easier to reason about what bits are 1 or 0 with e.g. 0x1f vs 0x3f
compared to 31 and 63.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
2020-08-07 09:02:48 +00:00
Jonas Ådahl
fc778e2bd3 cursor-tracker/x11: Also update sprite when updating position
Without doing this, we'd use the same sprite that was last set by
mutter, most likely a leftptr cursor, and fail to update when e.g.
moving the pointer above a text entry and the displayed cursor updated
to a cursor position marker.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
2020-08-05 16:22:16 +02:00
Jonas Ådahl
2d010c9b84 cursor-renderer: Disconnect the overlay cursor from the displayed cursor
The displayed cursor is the one displayed on the screen, e.g. via the
hardware cursor plane, by Xorg, or using the stage overlay.

When screen recording under X11, we don't get a stream of pointer and
cursor updates, as they might be grabbed by some other client. Because
of this, the cursor tracker or cursor renderer are not kept up to date
with positional and cursor state.

To be able to use the stage overlays when recording, we need to be able
to update the overlay without updating the displayed cursor, as we
shouldn't update the X server with cursor state we just retrieved from
it.

Thus, to achieve this, create a separate overlay cursor pointer. When
being a display server, they are always the same, but when using X11,
during screen recording, the overlay one will be polled at a fixed
interval to get a somewhat up to date state.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
2020-08-05 11:11:38 +02:00
Jonas Ådahl
a10f35c613 cursor-renderer: Keep ref to displayed cursor sprite
If it'd end up beig the XCursor sprite, it'll be unref:ed by the cursor
tracker when receiving a XFixesCursorNotify:XFixesDisplayCursorNotify
X11 event.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
2020-08-05 11:11:38 +02:00
Jonas Ådahl
5f5ef704fc cursor-tracker/x11: Don't leak xfixes cursor sprite
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
2020-08-05 11:11:38 +02:00
Jonas Ådahl
3d19b8f49c cursor-tracker: Move out more X11:isms to the X11 backend
This includes the xfixes cursor management.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
2020-08-05 11:11:38 +02:00