We were using the connector_id for the winsys_id, but different
devices could have connectors with the same id. Since we use
winsys_id to uniquely identify outputs, use both the connector
id and the device id to avoid having outputs with the same id.
Mostly as expected, this port is also trivial. A small cleanup
accompanies this patch, making gen_texcoords_and_draw_cogl_rectangle()
receive the framebuffer that it should draw into.
Because ClutterText has a somewhat convoluted drawing routine,
replacing cogl_rectangle() here isn't as straightfoward as the
effects were.
A new CoglPipeline is now part of the ClutterText struct, and
is used to set the color of the background or the selection.
Another change is paint_selection() now receives a framebuffer
to draw into. The check for NULL framebuffer does not make
sense here, since there is always a draw framebuffer set
when in the drawing function. Because of that, the check is
now gone.
All those effects have the same basic pattern of setting a
color of a pipeline, then drawing a rect with cogl_rectangle().
Thus, replacing those was as easy as retrieving the draw
framebuffer and calling cogl_framebuffer_draw_rectangle() on it.
The default implementation of ClutterActor.pick() uses
cogl_rectangle() to draw the rectangle with the color
for picking.
Replace that by cogl_framebuffer_draw_rectangle(). A
static color pipeline had to be created in order to
hold the pick color.
Instead of using cogl_read_pixels(), which is deprecated and
uses the implicit framebuffer, pass the current CoglFramebuffer
and use cogl_framebuffer_read_pixels().
Another case of a simple and direct API translation. Instead of
using the deprecated cogl_clear() function, replace it by the
non-deprecated cogl_framebuffer_clear().
Following up last commit, this commit adds a CoglFramebuffer
argument to meta_shadow_paint(), and stops using the draw
framebuffer internally.
The only consumer of this API, MetaWindowActor, still passes
the draw framebuffer though.
MetaShadow.paint() uses Cogl implicit APIs (cogl_rectangle* ones, in
this case) to paint shadows with the shadow pipeline.
Replace those calls by cogl_framebuffer_draw_textured_rectangle()
calls, that achieve the exact same result but with the non-deprecated
API.
Python is not guaranteed to be installed in /usr/bin. This is especially
true for *BSD systems which don't consider Python as an integral part of
their systems.
We already ran a Wayland client to test various Wayland paths. What was
missing to also run a X11 client was to hook in the X11 async waiter
wires, so do that and run both types of clients.
https://bugzilla.gnome.org/show_bug.cgi?id=790207
The test stage runs the whole meson test suite inside Xvfb inside a dbus
session. Running inside Xvfb is required as the cogl, clutter and mutter
tests require to run on top of X11; the dbus session is required to make
mutter succeed in owning names on the bus.
This also updates the Dockerfile to include packages needed for running
tests.
https://gitlab.gnome.org/GNOME/mutter/issues/193
As with the Wayland display name, to avoid clashes with already an
running Xwayland or Xorg instance, override the X11 display name to
something less likely to cause a clash.
https://gitlab.gnome.org/GNOME/mutter/issues/193
The events-touch test tested that clutter could properly process evdev
touch events. It used uinput to post evdev touch events, thus only ran
when runnig the test as root. Running as non-root it'd just silently
pass. As Clutter doesn't process evdev touch events anymore,
libinput does, so the test is fairly pointless, so remove it.
Pausing the master clock didn't actually pause it if there was already a
scheduled frame in progress. This is problematic if one actually expects
to see no new frame scheduling to happen after pausing, for example it
caused actor 'pre-paint' to be signalled on actors, but nothing was ever
painted.
Avoid this by destroying the master clock source when pausing, and then
recreating it when resuming.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/309
For Wayland outputs, we do not expose the actual transformation because
mutter does not support wl_surface.set_buffer_transform yet, instead we
swap the logical width and height when the output is rotated.
However, a client wishing to use the physical size would get confused,
so if the output is rotated, rotate the physical dimensions as well for
consistency.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/369
Moving windows using `move-to-side-X` and `move-corner-XX` keybindings
should keep windows within the confines of current screen.
`move-to-monitor-XXX` keybindings can be used to move windows to other
monitors.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/320
When profiling gnome-shell it was found that one of the main triggers
of `clutter_actor_queue_relayout` during animations was
`clutter_actor_set_margin_internal` continuously setting the same
zero margins. That's obviously pointless but also expensive since it
incurs full stage relayouts and reallocation. So just avoid redundant
margin changes.
Helps to further improve:
https://gitlab.gnome.org/GNOME/mutter/issues/233,
https://gitlab.gnome.org/GNOME/gnome-shell/issues/349
Commit 8d3e05305 ("window: Force update monitor on hot plugs") added the
flag `META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE` passed to
`update_monitor()` from `update_for_monitors_changed()`.
However, `update_for_monitors_changed()` may choose to call another code
path to `move_between_rects()` and `meta_window_move_resize_internal()`
eventually.
As `meta_window_move_resize_internal()` does not use the "force" flag,
we may still end up in case where the window->monitor is left unchanged.
To avoid that problem, add a new `MetaMoveResizeFlags` that
`update_for_monitors_changed()` can use to force the monitor update from
`meta_window_move_resize_internal()`.
Fixes: 8d3e05305 ("window: Force update monitor on hot plugs")
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/189
Don't schedule redraws when being headless; there is nothing to draw so
don't attempt to draw. This also makes a flaky test become non-flaky, as
it previously spuriously got warnings due to windows being "painted"
when headless but lacking frame timings, as nothing was actually
painted.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
The empty MetaStage was in meta-stage-private.h for no reason, so lets
move it to the C file. This makes it pointless to have a private
instance struct, so just move the fields to the private struct
_MetaStage.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
Almost a decade old, lets just assume it's there. This makes the button
on cally-atktext-example work again when building with meson, and
probably other things too.
Instead of using gtk_css_provider_get_default(), add a
static GtkCssProvider and fetch it instead. Creating
GtkCssProviders consume a bit more memory, so keeping
a single one alive is slightly more memory saving.