1
0
Fork 0
Commit graph

5928 commits

Author SHA1 Message Date
Jonas Ådahl
640178a94f wayland/cursor-role: Handle premature wl_buffer destruction
If a client would attach a buffer to a surface, commit, destroy the
buffer and then later set the surface as a cursor, there will be no
wl_buffer available to be used by the cursor role. Instead of
dereferencing the non-existing wl_buffer resource, handle this situation
by logging a warning and treating a prematurely destroyd wl_buffer as if
no buffer had been attached.

https://bugzilla.gnome.org/show_bug.cgi?id=770992
2016-09-09 10:02:41 +08:00
Jonas Ådahl
2e7f11305c MetaWindowActor: Sync thawed state when surface actor is set
Not having a surface actor would cause the window actor state to be
considered frozen, thus causing various state (such as geometry, shape
etc) synchronization to be delayed until thawed. If the window actor
was "thawed" due to having a surface set, not all state would be
properly synchronized, causing the thawed window actor to be displayed
incorrectly.

This patch fixes this by putting state synchronization after thawing in
a common function, calling it both from frozen count decreasing and
surface setting.

This fixes for example misplaced menus in Steam.

https://bugzilla.gnome.org/show_bug.cgi?id=770991
2016-09-09 10:00:24 +08:00
Olivier Fourdan
4f58a46217 wayland: add min/max size from xdg-shell v6
Implement min/max size request from xdg-shell-v6 and plug it into the
existing code so that windows with fixed size cannot be tiled/maximized
in Wayland just like in X11.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770226
2016-09-06 08:54:08 +02:00
Jonas Ådahl
d696fd3021 wayland: Don't handle input events after capability was removed
The seat capability updating is synchronous, but input events are
asynchronous (first queued then emitted). This means we may end up in a
situation where we from libinput first may receive a key event,
immediately followed by a device-removed event. Clutter will first
queue the key event, then remove the device, immediately triggering the
seat capability removal.

Later, when the clutter stage processes the queued events, the
previously queued key event will be processed, eventually making it
into MetaWaylandSeat. Before this patch, MetaWaylandSeat would still
forward the key event to MetaWaylandKeyboard, even though it had
'released' it. Doing this would cause referencing potentially freed
memory, such as the xkb state that was unreferenced when the seat
removed the capability.

In order to avoid processing these lingering events, for now, just drop
them on the floor if the capability has been removed.

Eventually, the event queuing etc needs to be redesigned to work better
when used in a Wayland compositor, but for now at least don't access
freed memory.

https://bugzilla.gnome.org/show_bug.cgi?id=770727
2016-09-02 21:11:08 +08:00
Jonas Ådahl
6c8f6afdc4 window: Fix focus of unmappable modal transient's parent
When a modal transient is unmanaging, most likely the parent of the
modal transient should be focused.

In Wayland, a MetaWindow is created when a shell surface role (like
xdg_toplevel) is created, but a window cannot be shown until a buffer
is attached. If a client would create two modal transients and make
them both have the same parent, but only one get a buffer attached
(i.e. shown), when unmanaging the modal transient that was showing,
when finding a new focus candidate, the stacking code will ignore the
not-to-be-shown buffer-less modal transient when finding a good
candidate for focusing. In the case described here, this means it will
find the parent of the unmanaging modal transient.

This newly chosen candidate will then be passed to meta_window_focus();
meta_window_focus() will then try to find any modal transient to focus
instead, will find the one without any buffer, then fail to focus it
because it cannot be mapped, thus making meta_window_focus() not focus
anything. Since meta_window_focus() didn't change any focus state, the
assert in meta_window_unmanage() checking that the unmanaging window
isn't focused anymore will be hit, causing mutter to abort.

For now, fix this by checking whether the modal transient can actually
be focused in meta_window_focus(). For X11 client windows, a window
will be defined to be focusable always, but for Wayland client windows,
a window will be determined focusable only if it has a buffer attached.

In the future, we should probably do a more thorough refactorization of
focus handling to get rid of any X11 - Wayland differences.

https://bugzilla.gnome.org/show_bug.cgi?id=757568
2016-09-01 21:09:10 +08:00
Jonas Ådahl
7a096b8686 wayland/cursor-role: Add back priv variable
Rebase of previous patch that removed the priv variable shouldn't have,
since it was now used by other things. Add it back so it compiles again.
2016-09-01 21:04:13 +08:00
Jonas Ådahl
c7976e0dbc wayland/cursor-role: Increase buffer use count on construction
We may be assigned multiple times, if the surface is assigned to be a
cursor surface multiple times. Each time e.g. wl_pointer.set_cursor is
called, we'll be assigned.

While the role object exists, we'll handle buffer use count even when
we are not actively assigned, thus we should only handle the initial
assignment use count bump when constructing, so that we don't increase
it when reassigned, where the wl_resource may already have been
released.

https://bugzilla.gnome.org/show_bug.cgi?id=770402
2016-09-01 19:39:53 +08:00
Rui Matos
f692c527e7 surface-role-cursor: Send frame callbacks for backend handled cursors
For backend handled cursors, if nothing else changes on the clutter
stage, we end up not sending out frame callbacks since clutter doesn't
draw a new frame.

To fix this, we'll keep cursor surfaces' frame callbacks separate from
other surfaces' and trigger them from the new
MetaCursorRenderer::cursor-painted signal which handles both software
and hardware cursors.

https://bugzilla.gnome.org/show_bug.cgi?id=749913
2016-08-31 20:10:43 +02:00
Rui Matos
2c1d3e5b70 cursor-renderer: Add a cursor painted signal
This signal allows interested parties to be notified of a new cursor
frame being painted regardless of whether it's being painted by the
backend directly or if it's a software rendered cursor frame handled
by clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=749913
2016-08-31 20:10:14 +02:00
Jonas Ådahl
262e184fe7 Default to using stage views
Instead of hiding stage views enablement behind MUTTER_STAGE_VIEWS=1,
default to enable it, while making it possible to disable using
MUTTER_STAGE_VIEWS=0 instead.

https://bugzilla.gnome.org/show_bug.cgi?id=770366
2016-08-30 22:56:56 +08:00
Florian Müllner
89f6fdce5d events: Only pass key events to Wayland if focus is on the stage
Even without a compositor grab, key events may still be expected to
be processed by the compositor and not applications, for instance
when using ctrl-alt-tab to keynav in the top bar. On X11, focus is
moved to the stage window in that case, so that events are processed
before they are dispatched by the window manager. On wayland, we need
to handle this case ourselves, so make sure to not pass key events to
wayland in that case, and move the key focus back to the stage when
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=758167
2016-08-30 00:20:31 +02:00
Rui Matos
c8f24721c5 monitor-manager-kms: Use the output naming logic used by the X server
Switch to the output naming logic used by the X server's modesetting
driver which, in particular, uses drmModeConnector's connector_type_id
instead of connector_id.

The kernel generates new connector_id's every time there are changes
which means we can't identify the same monitor on the same connector
after an hardware hotplug. Switching to connector_type_id fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=770338
2016-08-29 15:53:00 +02:00
Rui Matos
7ba803934c monitor-manager-kms: Use the same connector type names as the X server
Switch to the connector type names used by the X server's modesetting
driver which, in particular, fixes DVI-A being labeled DVID.

https://bugzilla.gnome.org/show_bug.cgi?id=770338
2016-08-29 15:52:59 +02:00
Olivier Fourdan
1f570d542e wayland: Survive an unsupported buffer size
If cogl fails to create a texture from the client's given buffer,
mutter would raise a fatal error and terminate.

As a result, a broken client might kill gnome-shell/mutter and take the
entire Wayland session with it.

Instead of raising a fatal error in this case, log the cogl error
message and send the client an OOM error, so mutter/gnome-shell can
survive an unsupported buffer size.

https://bugzilla.gnome.org/show_bug.cgi?id=770387
2016-08-26 11:16:07 +02:00
Jonas Ådahl
658d97d00e window: Don't unmanage transient_for when attached
For some reason, when a modal dialog was made an attaching
transient-for, if the window wasn't "constructing", it would be
unmanaged and rely on some side effect to be recreated. This side
effect is not triggered for Wayland clients, thus if one happen to set
a surface as "modal" via gtk_surface.set_modal before
xdg_toplevel.set_parent, it'd be unmanaged and never show up.

Instead, simply just set the tranciency anyway for Wayland clients.
This makes GTK+ clients that set_modal() before set_transient_for()
work.

https://bugzilla.gnome.org/show_bug.cgi?id=770324
2016-08-26 09:59:55 +08:00
Jonas Ådahl
8942e98e1d Revert "window: Make meta_window_has_pointer() per protocol implemented"
Windows from Xwayland still needs to use the Wayland path, but is
represented an MetaWindowX11, thus the abstraction introduced in
"window: Make meta_window_has_pointer() per protocol implemented"
is wrong. Lets turn back time, and reconsider how this can be
abstracted more correctly in the future.

This reverts commit 9fb891d216.
2016-08-26 06:51:19 +08:00
Jonas Ådahl
b6e13c459a wayland/subsurface: Call commit of surface-actor-role on commit
Rely on the actor surface role's commit function for queuing frame
callbacks. This also makes the surface actor state synchronization work
again, which was broken by 'wayland: Sync surface actor state in actor
role commit handler'.

https://bugzilla.gnome.org/show_bug.cgi?id=770131
2016-08-25 12:19:40 +08:00
Jonas Ådahl
43151edece wayland/actor-surface-role: Check for toplevel window
Don't check whether the surface of the role has a window, but whether
the corresponding toplevel surface has a window. This is necessary to
make subsurfaces not always early out.

https://bugzilla.gnome.org/show_bug.cgi?id=770131
2016-08-25 12:19:40 +08:00
Jonas Ådahl
b3f27de710 wayland/subsurface: Return NULL as toplevel if parent has no role
There is nothing stopping a subsurface from commiting its state before
its parents role has been assigned. Thus, we need to handle
meta_wayland_surface_get_toplevel() returning NULL for subsurfaces even
on commit.
2016-08-25 12:19:40 +08:00
Jonas Ådahl
4cf14c41ef wayland: Use correct GObject parent in subsurface role object
The parent of MetaWaylandSurfaceRoleSubsurface is
MetaWaylandSurfaceRoleActorSurface thus use that as the GObject parent.

https://bugzilla.gnome.org/show_bug.cgi?id=770131
2016-08-25 12:19:40 +08:00
Jonas Ådahl
dc03b3aa47 xdg-shell: Don't early out of role commit before calling parent impl
Make sure to always call the parent role commit vfunc, so that they can
handle updating their state properly.

This means other places need to handle the situation where
surface->window is NULL on commit. This may for example happen when the
parent of a modal dialog is unmapped or NULL is attached to a
wl_shell_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
ef3e036b45 wayland/xdg-shell: Port to unstable v6
Port the xdg_shell implementation to use the unstable v6 protocol. This
includes:

 - making xdg_surface a generic base interface for xdg_shell surface
   roles
 - create a xdg_toplevel role replacing the old xdg_surface
 - change the xdg_opup role to be based on xdg_surface
 - make xdg_popup not grab by default
 - add support for xdg_positioner

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
24c3844246 wayland/xdg-shell: Make keyboard focus follow grabbing popup
This is the explicitly intended keyboard focus symantics of xdg-shell
unstable v6. The semantics are undefined in unstable v5.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
f21df37190 wayland: Let shell surface role sync generic window state
Instead of having each final role do the same call, lets just make the
common role object deal with synchronizing window buffer size.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
a5efa30f6c wayland: Call assigned() surface role vfunc when re-assigned
This will later be used by xdg-shell to ensure no buffer is attached on
assignment.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
817911d9d3 wayland: Keep track of configured position
Besides the configured dimension, also keep track of the configured
position. This will later be used by popup position feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
a8d86b4876 wayland: Make gtk_shell handle our private window states
Instead of using the "allocated" state ranges of xdg_shell, lets just
use our own gtk_shell by adding a state enum and a configure event.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
cfb3d10e1b MetaWaylandSurface: Add 'configure' signal
Emit a 'configure' signal before configuring the role. This will enable
extensions to send its own configure events before the role is
configured.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
3a75e55cd8 wayland: Move gtk_surface fields out of MetaWaylandSurface
Let the gtk_shell extension unit handle its own state.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
335cd8e74c MetaWaylandSurface: Move 'destroying' field
It is not related to the gtk_surface extension, so move it to other
generic fields.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
c73d3d9d83 wayland: Move out gtk_shell from meta-wayland-surface.c
https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
8833991201 core: Add support for custom window placement rules
Add support for assigning a window a custom window placement rule used
for calculating the initial window position as well as defining how a
window is constrained.

The custom rule is a declarative rule which defines a set of parameters
which the placing algorithm and constrain algorithm uses for
calculating the position of a window. It is meant to be used to
implement positioning of menus and other popup windows created via
Wayland.

A custom placement rule replaces any other placement or constraint
rule.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
9fb891d216 window: Make meta_window_has_pointer() per protocol implemented
https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
3b3f40a1aa MetaWaylandSurface: Allow passing parameters when assigning role
Allow passing parameters (only GObject parameters supported for now) so
that role assignment can affect the paremeters set during construction.

If a role was already assigned when assigning, the passed parameters
are set using g_object_set_valist().

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
2114f2eb9f MetaWaylandSurfaceRole: Set the surface instance on construction
Set the MetaWaylandSurface instance pointer on construction so that all
surface role relevant parameters are initialized when constructed.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Jonas Ådahl
3ee16a2abb src/Makefile.am: Pass protocol file to wayland-scanner as an argument
Instead of piping the protocol file content to wayland-scanner, pass
the file name as an argument. This enables a new enough wayland-scanner
to print more meaningful error messages.

https://bugzilla.gnome.org/show_bug.cgi?id=769936
2016-08-25 12:19:40 +08:00
Carlos Garnacho
9fb4783957 backends/native: Expose all transform modes in CRTCs
We can only honor this properly in the MUTTER_STAGE_VIEWS=1 case. When using
the legacy view, software implemented transforms are only exposed if there is
only one output, as we can only transform the entire stage there.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:06 +02:00
Carlos Garnacho
9e641f623f backends/native: Set offscreen on the transformed MetaRendererViews
The texture is only created if the view is transformed at the software level,
otherwise the texture is NULL, and rendering happens on the onscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:06 +02:00
Carlos Garnacho
8065ff5a37 backends/native: Refactor onscreen creation into separate function
And use the right size, regarless of view transform.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:05 +02:00
Carlos Garnacho
6ce918661c backends/native: Use framebuffer size on swap_buffers implementation
Instead of ClutterStageView layout, which may be affected by transformations.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:05 +02:00
Carlos Garnacho
a72bd1bd29 backends/native: Set transform on MetaRendererViews
Only do this if mutter uses the multiple stage views feature. This
is uneffective at the moment because no back texture is set yet.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:05 +02:00
Carlos Garnacho
89854f9244 backends: Add MetaStageView::transform property
This property updates the ClutterStageView pipeline, so the texture is applied
with the corresponding transform.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:38:05 +02:00
Carlos Garnacho
54dc10f890 clutter: Add infrastructure to render ClutterStageViews to offscreen
The offscreen is given through the ::back-buffer property, the ClutterStageView
will set up the the CoglPipeline used to render it back to the "onscreen"
framebuffer.

The pipeline can be altered through the setup_pipeline() vfunc, so ClutterStageView
implementations can alter the default behavior of blitting from offscreen to
onscreen with no transformations.

All getters of "the framebuffer" that were expecting to get an onscreen have
been updated to call the right clutter_stage_view_get_onscreen() function.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:36:45 +02:00
Carlos Garnacho
7baa1d8a8d backends/native: Refactor g_object_set() call
Makes sense to update ::layout inside meta_renderer_native_set_legacy_view_size().

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:11:37 +02:00
Carlos Garnacho
4b4eb3a039 backends/native: Remove unneeded call
The call to _cogl_framebuffer_winsys_update_size() results in no-op here,
as the framebuffer has already the right size when rebuilding the views.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:11:37 +02:00
Carlos Garnacho
92c03e8625 backends/native: Split hw supported CRTC rotation modes
Those will need a separate treatment from the modes that we eventually
support through "software", so split those into a separate enum so we
can can do the right thing when applying the configuration.

Also, add a helper function that returns the transform that the software
fallbacks should perform, which should be "normal" if the rotation is
already handled via hw.

The function applying the configuration has been modified to always set
a HW rotation mode (even if normal), when we come to support SW rotation
modes, we'll be relying on a normal transformation, so it will be
necessary to have mixed HW/SW managed transforms.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-24 02:09:32 +02:00
Carlos Garnacho
a53ca0d8cf backends: Mark MetaRendererView:info as G_PARAM_STATIC_STRINGS
https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 18:14:16 +02:00
Jonas Ådahl
6f8e6864b2 wayland: Add support for the xdg-foreign protocol
This commits adds support for exporting xdg_surface handles via
xdg_exporter and importing them via xdg_importer.

This bumps the required wayland-protocols version to 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=769786
2016-08-22 21:03:41 +08:00
Jonas Ådahl
aea706230d MetaWaylandSurface: Add 'unmapped' signal
Meant to be used by users of MetaWaylandSurface's that need to know
when the surface was unmapped. So far only emitted by shell surfaces
(surfaces with MetaWindow's).

https://bugzilla.gnome.org/show_bug.cgi?id=769786
2016-08-22 21:03:41 +08:00
Bastien Nocera
c977ba197e backends: Update two-finger scrolling before edge scrolling
As whether edge scrolling is enabled depends on whether two-finger
scrolling is disabled, make sure to update two-finger scrolling first.

Note that this only fixes the problem on startup. Changing the
settings in GSettings directly might cause an inconsistent state, but
the main UI for this setting, gnome-control-center, makes sure to
update two-finger scrolling before edge scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=769276
2016-08-20 16:00:35 +02:00
Simon McVittie
eb7f33265a META_PLUGIN_DECLARE: don't emit an old-style definition
An empty argument list means "unspecified arguments", and not
"no arguments" like it does in C++. If an implementer of Mutter
plugins uses gcc -Wold-style-definition, as configured by
AX_COMPILER_FLAGS_CFLAGS, they will get warnings about this.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Florian Müllner <fmuellner@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769971
2016-08-16 13:01:17 +01:00
Jonas Ådahl
9f6f778589 MetaMonitorManagerKms: Set output scale when assigning crtc
The scale will have been set to 1 no matter what when initializing the
MetaOutput since it at the time didn't have an CRTC assigned to it.
Now, when we assign the CRTC to the output, we need to update the scale.

https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
Jonas Ådahl
1f657d2c81 monitor-manager: Always set the monitor info scale
https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
Jonas Ådahl
6940169f46 MetaMonitorManagerKms: Split up read_current() into logical chunks
Instead of reading all the different state in one huge function, split
it up into logical chunks, making it easier to read.

https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
Carlos Garnacho
1ca57e0923 backends: Prepare for virtual devices
Those have no backing libinput_device, and configuration does not
apply to those.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:36:42 +02:00
Carlos Garnacho
5c9a2c54c4 xwayland: Avoid late errno checks
We do some things when binding to a socket fails (closing the fd,
logging, unlinking files, ...) those might affect errno in some
or other way, so it might no longer be EADDRINUSE even if we later
try to make those non fatal.

It seems better to check errno soon after the failure, and don't
rely on it in any way at a later point. All error paths in
bind_to_abstract_socket() also have early logging, which also might
help figure out better the point of failure when the socket fails
to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=769578
2016-08-06 17:14:52 +02:00
Carlos Garnacho
dd549604e2 xwayland: Fix typo
Check the unix_fd, which is the one just created, the abstract_fd
is already checked above.
2016-08-06 16:42:25 +02:00
Jonas Ådahl
6894563667 MetaRendererView: Fix GObject parent
Set ClutterStageViewCogl as parent of MetaRendererView, since that is
the actual parent.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:20:55 +08:00
Jonas Ådahl
9b4e8695f3 MetaRendererX11: Allocate offscreen framebuffers up front
Allocate the offscreen stage view framebuffers up front; otherwise they
may get allocated after the viewport calculated by the stage is set,
which would cause the viewport to be incorrect until recalculated.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:20:55 +08:00
Jonas Ådahl
cc4a65fe94 x11/nested: Only paint monitor stage views when enabled
Only paint the per monitor stage views when enabled, otherwise bad
things happen.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:19:24 +08:00
Jonas Ådahl
53061c7005 MetaInputSettings: Initialize the accel-profile setting
Shouldn't just update them when they change; they also need to be
set when initializing.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-08-03 10:49:22 +08:00
Jonas Ådahl
53e3d0df64 MetaInputSettings: Don't initialize the same setting twice
Two settings were set twice on the same device. Now instead group the
generic update functions together, removing the redundant calls.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-08-03 10:49:22 +08:00
Alberts Muktupāvels
38d61f30dc monitor-config: add missing chain-up for finalize 2016-07-28 19:57:42 +03:00
Jonas Ådahl
23c4ac6c7f settings: Support mouse and trackball accel profile
Support changing the mouse and trackball acceleration profile. This
makes it possible to for example disable pointer acceleration by
choosing the 'flat' profile.

This adds an optional dependency on gudev. Gudev is used by the X11
backend to detect whether a device is a mouse or not. Without gudev
support, the accel profile settings has have effect for mouse devices.

Trackball still uses the "strstr" approach, since udev doesn't support
tagging devices as trackball devices yet.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-07-28 20:13:08 +08:00
Bastien Nocera
cfe5d7429a backends/x11: Add enum for scroll methods
This way the "libinput Scroll Method Enabled" property manipulation
is made clearer.
2016-07-27 19:42:14 +02:00
Bastien Nocera
36cd7177fd backends: Re-add support for edge scrolling with some touchpads
Add support for setting edge-scrolling separately from two-finger
scrolling. We now have 2 separate boolean settings for those, with the
Mouse panel in gnome-control-center allowing to set only one of those at
a time, but nothing precludes both being set in the configuration.

We need to handle:
- two-finger-scrolling-enabled and edge-scrolling-enabled settings both
  being set.
- those 2 settings being change out-of-order
- two-finger-scrolling being set on a device that doesn't support it
- edge-scrolling-enabled on a device that doesn't support it

And the combinations of one touchpad supporting just one of edge
scrolling and two-finger scrolling and another vice-versa.

https://bugzilla.gnome.org/show_bug.cgi?id=768245
2016-07-27 17:17:25 +02:00
Jonas Ådahl
820a6ab406 Gracefully exit with failure if backend creation failed
Instead of continuing eventually crashing with a segmentation fault due
to a missing renderer, make MetaBackend an GInitable, and gracefully
handle the failure to fully create the backend with an EXIT_FAILURE.

https://bugzilla.gnome.org/show_bug.cgi?id=769036
2016-07-23 21:21:31 +08:00
Jonas Ådahl
cd225c4e19 Always use the default screen
GDK doesn't support multiple screens, so effectively we don't either.
Lets stop pretending we do.

This fixes a few -Wdeprecated warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
Jonas Ådahl
98cd8136ca MetaWindowWayland: Don't set X11 window attributes that'll get ignored
We only use a handful of the attributes set, so lets stop pretending
that things are initialized for a reason. Eventually we should stop
using XWindowAttributes in the generic MetaWindow creation path.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
Florian Müllner
ead09bf6cc wayland: Shut up a compiler warning
If the compiler cannot figure out that the condition for setting
the dev variable is the same as the condition for accessing it,
it will complain about potential uninitialized use.
2016-07-22 23:21:30 +02:00
Florian Müllner
fe09a3c4e2 backends: Add missing guards to libwacom calls 2016-07-22 23:20:47 +02:00
Carlos Garnacho
c6beb1cfc5 wayland: Emit wp_tablet_pad_group.buttons after focus changes
The buttons grabbed by the compositor might have changed in between,
so just broadcast the button array again.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
b34fe72bb7 wayland: Check serial on wp_tablet_pad.set_feedback
We must lookup the mode switch serial for the group where the button
belongs to. Also, avoid the changes if the client requests setting
the feedback for buttons owned by the compositor.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
18f301cec9 wayland: Export function to tell whether a button belongs to a pad group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
406677e2a0 wayland: Check serial on wp_tablet_pad_strip.set_feedback 2016-07-22 13:31:09 +02:00
Carlos Garnacho
4f25057413 wayland: Check serial on wp_tablet_pad_ring.set_feedback 2016-07-22 13:31:09 +02:00
Carlos Garnacho
2f492c133c wayland: Fix label lookup on >1 strips/rings
We assumed that each group could only have 1 strip and/or ring, because
accounting is performed per group, so we could not assume the real
index for anything above 1. Get rid of this restriction, now that
MetaWaylandTabletPad does its own accounting of rings/strips, alongside
groups.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
138a47b8f9 wayland: Move strips/rings management back to MetaWaylandTabletPad
This is best for 2 reasons:
- It's feels cleaner doing first creation of rings/strips and then
  the group assignment. The other option is making groups iterate
  other all rings/strips and selectively skip those not meant for
  it, which sounds somewhat redundant.
- Some minimal accounting of rings/strips without group restrictions
  is needed for meta_wayland_tablet_pad_get_label().

The rings/strips memory is now owned by MetaWaylandTabletPad instead
of groups, which is sort of meaningless since all are meant to go
at the same time.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
62e4954c96 wayland: Add method to relate a pad strip to its group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
062b696df2 wayland: Add method to relate a pad ring to its group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
5effde59f6 backends: Implement the "show osd" pad action
Just call back into meta_display_request_show_osd().
2016-07-22 13:31:09 +02:00
Carlos Garnacho
76595af8af core: Add special case for the pad OSD in event handling
When it's active, we want wayland to stop handling (most notably key)
events.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
21c8911254 core: Add meta_display_request_pad_osd() function
There may be external/compositor-specific reasons to trigger the
pad OSD. Expose this call so the pad OSD can be triggered looking
up the right settings, monitor, etc...
2016-07-22 13:31:09 +02:00
Carlos Garnacho
35554555e0 core: Add MetaDisplay:show-pad-osd signal
This is intended to be caught in the gnome-shell code, in order to
show the OSD with the pad action mapping.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
e2ad8700a9 backends: Export function to query the mapped MetaMonitorInfo of a tablet
Or NULL if the tablet is mapped to the full desktop size.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
323c608b0c backends: Export call to retrieve the base GSettings for a tablet 2016-07-22 13:31:09 +02:00
Carlos Garnacho
0efe076a0a backends: Implement "switch monitor" pad button action
This action remaps the tablet to each of the connected monitors,
or to the span of all monitors.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
6f7f98540f core: Add public MetaDisplay functions to get action labels for pad buttons
This API will be used from the gnome-shell pad OSD implementation, in order
to show the actions that currently apply to every button/ring/strip in the
tablet.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
56632d2ef7 backends: Add function to retrieve the label for a pad button action
As those are specified by settings.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
6296d30e1a wayland: Add getters for the current feedback strings in MetaWaylandTabletPad
Each of the buttons/rings/strips may have one such feedback string, this API
makes is meant to make lookups consistent.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
ed16b40c98 meta: Add MetaPadActionType enum
This will be used on lookups to the current action assigned to
any element in a tablet pad.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
7bba20e536 wayland: Hook MetaWaylandTabletPad to pad button actions management
These are handled by the MetaInputSettings, so hook the events emitted
to it.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
8e6244238d backends: Add API to trigger actions related to pad buttons
It does nothing at the moment, but can be hooked into MetaWaylandTabletPad
now. For X11, we need to trigger these for the pad events we receive from
the passive pad button grabs.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
ba9ec00694 wayland: Add update() phase to MetaWaylandTabletPad
This will be needed to update internal state of pad groups.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
08cda496f8 wayland: Apply pressure settings before sending wp_tablet_tool.pressure 2016-07-22 13:31:09 +02:00
Carlos Garnacho
f9552bb9c0 backends: Add function to apply pressure sensitivity to tablet tools
A bezier curve is created out of the 2 control points in settings, so
the pressure is made to follow the stablished curve between 0 and 1.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
7e267e9b01 wayland: Implement stylus button actions
Those just send different BTN_ keycodes.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
fbb4c0b831 backends: Add function to retrieve the action mapped to an stylus button
This function will be useful for the wayland implementation, because buttons
are mapped at the time of sending those through the wire.
As x11/wayland implementations differ here, this function will be useful for
the wayland implementation, as the action is handled lat
2016-07-22 13:31:09 +02:00
Carlos Garnacho
d7faab76e0 backends: Perform libwacom checks before applying settings
Some settings make no sense on external tablets, and others make
no sense in display/system-integrated tablets. Perform those checks
so we don't end up with possibly broken configuration.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
b7892ba1c5 backends: Disable keep-aspect and output mapping on relative devices
Those settings make no sense there, so should be made ineffective.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
ab2d2af176 backends: Implement set_tablet_mapping() in native backend
We can now just set the mapping through clutter_input_device_set_mapping()
2016-07-22 13:31:09 +02:00
Carlos Garnacho
73958aeb59 backends: Add private getter for the MetaInputSettings
We will need to fetch information from it at certain places.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
77b33a86b8 backends: Fetch libwacom information for tablets in MetaInputSettings
Given that information defines largely how such devices are to be
configured, it makes sense to have that information at hand. A getter
has been also added for the places where it could be useful, although
it will require HAVE_LIBWACOM checks in callers too.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
f3b94d9a78 wayland: Implement wp_tablet.path
Now that we have clutter_input_device_get_device_node(), it is trivial
to implement.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
f6e471fca4 backends: Add function to lookup the mapping for a given tablet
At least for wayland, this needs implementing within mutter. So add
a function to look this setting up.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
1dd121002f backends: Store mappable devices' info in the hashtable
Instead of as closure data. We will need to store (and query) more
per-device info, so access to this struct is necessary.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
526fdca3fb backends: Map tablets/pads, and wire to configuration vfuncs
With this, the left-handed setting works. The other configuration
vfuncs remain empty stubs, but will be correctly applied when those
are handled.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
220ac7c8f2 backends: Add empty stubs for tablet configuration
Those will be called when configuring tablets.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
5ea39e0e77 wayland: Implement wp_tablet_tool.hardware_id_wacom
We can now fetch this info from the ClutterInputDeviceTool, so
use it to implement this event.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
c1d157e136 wayland: Add focus management to pads
All pads will share the same focus than the keyboard, so this means that:
- The focus changes in-sync for keyboard and all pad devices, and
- Newly plugged pads will be immediately focused on that same surface
2016-07-22 13:31:09 +02:00
Carlos Garnacho
2cd21f1b20 wayland: Add MetaWaylandTabletSeat API to correlate pads/tablets
All pads have one tablet, but a tablet may have multiple pads. Add
API to look things up from a MetaWaylandTablet(Pad).
2016-07-22 13:31:09 +02:00
Carlos Garnacho
5ccde659c1 wayland: Add pointer from MetaWaylandTabletSeat to MetaWaylandSeat
It will be useful to backreference to the MetaWaylandSeat from tablet
code.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
fd62a1f6ce wayland: Wire up pad device event management
The tablet manager will now lookup the correct MetaWaylandTabletSeat,
and forward the events through it.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
b8808ca24d wayland: Implement pad management in MetaWaylandTabletSeat
Now pads are looked up and notified upon, both on startup and
when plugging a tablet.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
41ff0aaf60 wayland: Implement wp_tablet_pad
This object represents the collection of buttons, strips and rings
in a tablet pad. All the objects created (pad, strips and rings)
share a common focus surface and have the same lifetime.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
c5d0791710 wayland: Implement wp_tablet_pad_group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
828277f5e0 wayland: Implement wp_tablet_pad_strip
This represents pad sliders.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
e56d6b06cf wayland: Implement wp_tablet_pad_ring
This object represents pad "wheels"
2016-07-22 13:31:09 +02:00
Carlos Garnacho
8b769a3412 wayland: Set an specific role on surfaces passed in wp_tablet_tool.set_cursor
This is now separated from the generic cursor one. This means that wl_surfaces
can't be shared across wl_pointer and wp_tablet_tool. This is a change in
tablet protocol v2.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
8d3ac8c3e9 wayland: Add MetaWaylandSurfaceRoleTabletCursor
This is a simple subclass of MetaWaylandSurfaceRoleCursor, mostly
so we can distinguish by GType, the methods in the parent class
still apply and are useful.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
074b0d6b2a wayland: Make MetaWaylandSurfaceRoleCursor derivable 2016-07-22 13:31:09 +02:00
Carlos Garnacho
8e8cdf1873 wayland: Make additional data in MetaWaylandSurfaceRoleCursor private
This will help subclassing it.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
72ee6b8b65 wayland: Use wl_fixed_t for angle arguments in wp_tablet_tool
This is a change in tablet protocol v2
2016-07-22 13:31:09 +02:00
Carlos Garnacho
3d9bb1cc09 wayland: Use tablet protocol v2
This commit merely updates the code generation from the v2 protocol
description.
2016-07-22 13:31:09 +02:00
Jouke Witteveen
4ed59a020d Throw an error in case of unsupported session type
When launching a GNOME session from a text-mode VT, the logind session
type is unlikely to be set to either "wayland" or "x11". We search for a
supported session type first with logind and then with
$XDG_SESSION_TYPE. As a fallback, we also test $DISPLAY in case of a
"tty" logind session to support starting through xinit. Ideally, such
setups should set XDG_SESSION_TYPE=x11.
If no supported session type is found, we throw an error.

https://bugzilla.gnome.org/show_bug.cgi?id=759388
2016-07-22 10:52:04 +08:00
Thomas Hindoe Paaboel Andersen
b5e797f453 MetaSurfaceActorWayland: clean up var assigned to self
https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
Thomas Hindoe Paaboel Andersen
125cba7100 backend: simplify assert
We already checked that constraint is non-null.

https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
Jonas Ådahl
ad7ec6b979 main: Fix compilation with wayland disabled
https://bugzilla.gnome.org/show_bug.cgi?id=769024
2016-07-21 20:34:28 +08:00
Florian Müllner
de1464f88f renderer-native: Adjust to StageView memory handling changes
ClutterStageView now takes ownership of the :framebuffer property,
so we need to release our own reference.
2016-07-20 20:58:20 +02:00
Rui Matos
daf5a112fb meta/boxes: typedef cairo_rectangle_int_t MetaRectangle
They are already effectively interchangeable so this should reduce
pointless casts.

Just like in GDK though, we need to keep the old definition for
instrospection to be able to include the struct's fields.
2016-07-20 14:11:25 +02:00
Jonas Ådahl
a75e2ace82 Revert "main: Add --x11 command line argument"
This reverts commit feb4c36659.
2016-07-20 17:45:18 +08:00
Jonas Ådahl
f18e2a8c31 Fix out-of-tree building
We included generated cogl headers and non-generated clutter headers
from mutter, while only having added include paths for the opposite.
2016-07-20 16:17:22 +08:00
Jonas Ådahl
e891a8b628 renderer-native: Resize legacy onscreen before panting
By creating a pending gbm/EGL surface pair, only setting it on
swap-buffers, we would draw onto a buffer on the old surface, then swap
the buffer from the new surface, causing the first frame after a
hot-plug always having no content.

This was in the past not very noticable since some non-deterministic but
frequent side effect in gnome-shell caused hot-plugging to always render
two new frames, but after "Introduce regional stage rendering", this
side effect did not occur as often, thus making it more visible.

This commit updates the current gbm/EGL surface pair before painting a
frame, so that when the frame is painted, the surface with the correct
size is used and the buffer from correct surface is swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
aecd98b847 backends/native: Support drawing onto multiple onscreen framebuffers
Add support for drawing the stage using multiple stage views, where
each stage view has its own onscreen framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
d7b87799c8 backend: Ensure the backend gets notified of monitor state having changed
Being a listener to a signal, it is inconvenient to enforce order of
execution between different signal listeners. If there are things in
the backend that should be updated before various other signal
handlers, make sure so is done by emitting the signal after having
explicitly notified the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
28a898a22f Use signals instead of onscreen framebuffer frame callbacks
CoglFrameInfo is a frame info container associated with a single
onscreen framebuffer. The clutter stage will eventually support drawing
a stage frame with multiple onscreen framebuffers, thus needs its own
frame info container.

This patch introduces a new stage signal 'presented' and a accompaning
ClutterFrameInfo and adapts the stage windows and past onscreen frame
callbacks users to use the signal and new info container.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
92341e7c30 MetaRendererNative: Make cogl variables obvious via their names
Call a CoglContext "cogl_context", CoglDisplay "cogl_display" and
CoglRenderer "cogl_renderer" so that they won't be confused with
ClutterContext, MetaDisplay and MetaRenderer etc.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
2eb843268a renderer-native: Rename cogl vfunc implementations
Make the cogl vfunc functions have names that are globally
discoverable. Calling the same function in every backend the same name
causes code navigation tools to not function properly. Rename the
affected functions to closer correspond to the style mutter uses.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
44b163e39b renderer-native: Meta:ify a struct
Rename a struct from the old Cogl style to mutter style naming and
conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
566c28bdaf Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.

A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.

This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.

Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.

Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
749237a28e MetaWindowGroup: Only compensate for transforms when in clone paint
We were compensating for a clone paint viewport offset even when we
were not in clone paniting mode. This would break painting if we offset
the viewport for some other reason for example as in the future stage
view painting.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
7f0e6b9b4b compositor: Don't access use the onscreen framebuffer directly
Instead of assuming there is a single onscreen framebuffer, use the
helper functions for setting the frame callback and getting the frame
counter.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
a465e4c5b8 compositor: Initiate cogl context field on creation
There will only ever be one context; just get it from clutter instead
of waiting for we interact with a framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
767e12125b ClutterStageCogl: Let the sub-classes handle the onscreen
In preperation for having allowing drawing onto multiple onscreen
framebuffers, move the onscreen framebuffer handling to the
corresponding winsys dependent backends.

Currently the onscreen framebuffer is still accessed, but, as can seen
by the usage of "legacy" in the accessor name, it should be considered
the legacy method. Eventually only the X11 Compositing Manager backend
will make use of the legacy single onscreen framebuffer API.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
14dbdfe483 Get rid of ClutterStageEglNative
The functionality from ClutterStageEglNative (one function returning
TRUE) was moved to MetaStageWindowNative.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
c3d2352a9e Explicitly create per backend stage windows
Split the stage window implementations into three separate objects: one
for X11 as a compositing manager, one for X11 running as a nested
Wayland compositor, and one for running with the native backend.

The new stage window implementations are only thin shells; this is in
preparation for making the stage windows behave more differently.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
55726e787b backends: Make clutter stage resizing more explicit
The stage resizing was placed in the generic backend, which was only
run on certain configurations (when running nested or using the native
backend). This commits makes the resizing more explicit thus more
obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
085df1170e plugins/default: Make the background a vignette
Make the default plugin background a vignette in order to see that it
properly draws using the correct scale.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
8bebb8126c Let MetaMonitorManagerKms handle page flips
This commit completes the move of monitor logic to the monitor
mangager. The renderer now only deals with framebuffers, asking the
monitor manager to do the crtc flip tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
12ef1a5e4b backends/native: Let the monitor manager manage KMS modes
Let MetaMonitorManagerKms manage KMS modes. This lets us pass less
state to MetaRendererNative. Instead let MetaMonitorManager tell the
monitor manager when it should set the mode and with what framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00