1
0
Fork 0
Commit graph

244 commits

Author SHA1 Message Date
Jasper St. Pierre
467465c99c backend: Create the stage in the backend, rather than the compositor
This allows creating the stage much earlier than it otherwise would have
been. Our initialization sequence has always been a bit haphazard, with
first the MetaBackend created, then the MetaDisplay, and inside of that,
the MetaScreen and MetaCompositor.

Refactor this out so that the MetaBackend creates the Clutter
stage. Besides the clarity of early initialization, we now have much
easier access to the stage, allowing us to use it for things such as
key focus and beyond.
2014-08-13 20:08:46 -04:00
Jasper St. Pierre
e935b52e51 display: Move composite version checks here 2014-08-13 19:32:39 -04:00
Rui Matos
7d54631ebf backends: Make MetaBackend available to introspection
This moves meta-backend.h under meta/ and, for now, just exposes to
introspection the methods that we actually need in gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=734301
2014-08-07 11:31:59 +02:00
Carlos Garnacho
70aee2d95e display: cancel wayland client touches when the compositor is grabbed
When a compositor grab begins, clients will stop receiving events, so any
ongoing sequence at that time must be cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=733631
2014-07-24 18:07:30 +02:00
Rui Matos
f55737ec06 compositor: Sync X drawing only once per frame
We only need to call XSync() once per frame to synchronize X with GL
drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=728464
2014-07-23 13:59:18 -04:00
Adel Gadllah
6ee5a1437c x11: Move event filter to backend connection 2014-07-19 18:51:26 +02:00
Owen W. Taylor
182a267f69 Connect to ClutterStage::after-paint with connect_after()
Use connect_after() to accomodate code in GNOME Shell that,
when benchmarking drawing performance, connects to ::after-paint
and calls glFinish(). The timing information from that will be
more accurate if we hold off until that completes before we signal
apps to begin drawing the next frame. If there are no other
connections to ::after-paint, connect() vs. connect_after() doesn't
matter.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 13:38:15 -04:00
Jasper St. Pierre
b11405570a compositor: Don't bother selecting for events on the COW
We already select all the events we need on the stage window instead.
2014-07-15 17:18:37 -04:00
Jasper St. Pierre
463b50e746 screen: Fetch the COW window up-front
XGetCompositeOverlayWindow is a round trip to the X server. We shouldn't
be doing it on every MapWindow.
2014-07-10 14:18:02 -04:00
Jasper St. Pierre
1af9e92e91 Don't add in our old input event mask when we select input events
This causes a round-trip to the server, and just isn't necessary, since
we're always in charge of our event mask.
2014-07-10 13:30:05 -04:00
Carlos Garnacho
79e682bcd0 compositor: emit grab-op-begin/end signals on plugin grabs
This makes it possible to track there grabs triggered this way, in
addition to the ones handled by mutter.
2014-07-07 19:18:21 -04:00
Giovanni Campagna
8d08851f28 compositor: show the stage after we set the size
So that it is actually respected
2014-07-01 20:28:00 +02:00
Owen W. Taylor
bc510378b3 Switch to using ClutterStage::after-paint
The experimental API clutter_stage_set_paint_callback() is replaced
with an ::after-paint signal as of Clutter 1.19.5.
2014-06-27 14:36:32 -04:00
Jasper St. Pierre
24d7c5ebe3 compositor: Simplify meta_window_actor_set_updates_frozen
Since we always call it with the same value, just push that
value into the implementation.
2014-06-17 13:10:42 -04:00
Florian Müllner
b64548ee1f Pass button_rect when opening window menu from button
When opening the window menu without an associated control - e.g.
by right-clicking the titlebar or by keyboard - using coordinates
for the menu position is appropriate. However when the menu is
associated with a window button, the expected behavior in the
shell can be implemented much easier with the full button geometry:
the menu will point to the center of the button's bottom edge
rather than align to the left/right side of the titlebar as it
does now, and the clickable area where a release event does not
dismiss the menu will match the actual clickable area in mutter.

So add an additional show_window_menu_for_rect() function and
use it when opening the menu from a button.

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:49:48 +02:00
Florian Müllner
d380d30ef4 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 21:55:03 +02:00
Florian Müllner
31db32e826 Actually implement opening the app menu
The last commit added support for the "appmenu" button in decorations,
but didn't actually implement it. Add a new MetaWindowMenuType parameter
to the show_window_menu () functions and use it to ask the compositor
to display the app menu when the new button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
Jasper St. Pierre
6513cbb470 Add back coordinates to the window menu
It looks weird to have Alt+Space pop up under the cursor instead
of the top-left corner of the window, and the Wayland request will
pass through the coordinates as well.

Add it to the compositor interface, and extend the
_GTK_SHOW_WINDOW_MENU ClientMessage to support it as well.
2014-05-22 10:50:57 -04:00
Jasper St. Pierre
8640982e68 Convert window menus to a compositor implementation 2014-05-17 15:16:23 -04:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Jasper St. Pierre
63f1a10e33 compositor: Don't select for weird events on the COW/stage
Talking it over with Owen, we weren't sure why this was here.

At one point, we were creating a foreign stage window, so potentially
Clutter didn't select for its own events, but now we're using a standard
stage window, so this seems weird.

Why we did it on the COW, nobody knows. Maybe copy/paste bugginess?
2014-04-24 16:26:21 -04:00
Jasper St. Pierre
925075ddaf compositor: Don't select for stage events on the UI X11 connection 2014-04-24 12:12:53 -04:00
Jasper St. Pierre
41de208f31 compositor: Also ungrab the VCP when beginning a modal
XXX: This should not be needed. We need to figure out why
there's a grab on the UI connection.
2014-04-24 11:26:12 -04:00
Jasper St. Pierre
e9eb3c32a9 compositor: Move event spoofing code to MetaBackendX11
This is now where we handle device events.
2014-04-23 14:23:13 -04:00
Jasper St. Pierre
61b714c666 compositor: Remove "exclusive is exclusive" codepath
We now handle input events in the backend.
2014-04-23 14:23:13 -04:00
Jasper St. Pierre
e9263d25b9 compositor: Take modal grabs through the backend as well 2014-04-23 14:23:12 -04:00
Jasper St. Pierre
d590626017 compositor: Select for input on the output window the right display 2014-04-23 14:23:12 -04:00
Jasper St. Pierre
2769683521 Rename MetaWaylandStage to MetaStage and put in compositor/ 2014-04-22 16:56:02 -04:00
Jasper St. Pierre
168ede9374 compositor: Create the MetaWaylandStage here 2014-04-22 16:56:01 -04:00
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Matthias Clasen
f4f529385a Fix the build with -Werror=maybe-uninitialized
gcc can't really know that the condition won't change between
the first if and the second, so help it out by initializing
the variable up top.
2014-03-27 14:58:20 -04:00
Adel Gadllah
6eeaf09ab7 compositor: Don't call process_damage if the window is gone
We might get a damage event for an already unmanaged window calling
process_damage is pointless and causes a crash so simply skip that case.

https://bugzilla.gnome.org/show_bug.cgi?id=727115
2014-03-27 14:06:27 +01:00
Jasper St. Pierre
cd905a34fb compositor: Kill off MetaCompScreen
Compositors haven't been able to manage more than one screen for
quite a while. Merge MetaCompScreen into MetaCompositor, and update
the API to match.

We still keep MetaScreen in the public compositor API for compatibility
purposes.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
47aa583625 display: Kill off grab_screen
Just like active_screen, the screen can always be inferred
from the MetaDisplay, so there's no point in keeping it around.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
d7519f4ebc Remove any possibility for zaphod mode
We previously separated out MetaDisplay and MetaScreen. mutter
would only manage one screen, but we still kept a list of screens
for simplicity.

With Wayland support, we no longer care about the ability to
manage more than one screen at a time. Remove this by killing
the list of screens, in favor of having just one MetaScreen
in MetaDisplay.

We also kill off active_screen at the same time, since it's
not necessary anymore.

A future cleanup should merge MetaDisplay and MetaScreen. To avoid
breaking API, we should probably keep MetaScreen around as a dummy
type.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
e67abdd3ff compositor: Kill unused variable 2014-03-20 13:18:55 -04:00
Jasper St. Pierre
ca4777f778 compositor: Make code a bit more understandable 2014-03-20 13:18:47 -04:00
Rui Matos
76dc0ca681 wayland: Exempt CLICKING grab ops when syncing wayland input focus
If we have a CLICKING grab op we still need to send events to xwayland
so that we get them back for gtk+ to process thus we can't steer
wayland input focus away from it.

https://bugzilla.gnome.org/show_bug.cgi?id=726123
2014-03-20 17:08:53 +01:00
Rui Matos
1b29113150 wayland: Set/unset wayland focus on mutter grab/ungrab operations
This ensures that we send the proper leave and enter events to wayland
clients.

Particularly, this solves a bug in SSD xwayland windows where clicking
and dragging on the title bar to move the window only works on the odd
turn (unless the pointer moves away from the title bar between
tries). This happens because xwayland gets a button press but doesn't
see the release so when it gets the next button press it discards it
because its pointer button tracking logic says that the button is
already pressed. Sending the proper wayland pointer leave event fixes
it since wayland clients must forget about button state at that point.

https://bugzilla.gnome.org/show_bug.cgi?id=726123
2014-03-20 17:08:53 +01:00
Jasper St. Pierre
044c06bff3 Don't include wayland/ by default either 2014-03-18 22:04:36 -04:00
Jasper St. Pierre
a3ccc4fd1c Remove x11/ directory from default include path 2014-03-18 22:04:36 -04:00
Jasper St. Pierre
420f322910 compositor: Assume the plugin manager always exists 2014-03-18 18:25:33 -04:00
Jasper St. Pierre
4bf6e0ae8c compositor: Kill off an unused cursor variable 2014-03-18 18:25:33 -04:00
Jasper St. Pierre
97872e70a5 compositor: Fix variable name style in meta_shape_cow_for_window
This has bugged me forever...
2014-03-18 18:25:33 -04:00
Jasper St. Pierre
be57308663 compositor: Clean up
Remove a bunch of weird checks, random logs, unused variables
and other cruft that nobody cares about today.
2014-03-18 18:25:32 -04:00
Jasper St. Pierre
33f1bd96f5 compositor: Kill off modal_plugin
We only ever have one plugin, so don't bother recording which plugin
is modal, only whether we are modal or not.
2014-03-18 18:25:32 -04:00
Jasper St. Pierre
9ba49358e5 compositor: Remove meta_check_end_modal
"This is used when reloading plugins"

Yeah, no.
2014-03-18 18:25:32 -04:00
Jasper St. Pierre
dd8d8e436d wayland: Remove special code for modal grabs
Since we never pass any Clutter events to Wayland, it's not needed.
2014-03-10 15:10:44 -04:00
Rui Matos
674bcef6da Handle mouse-button-modifier being disabled
In case 'mouse-button-modifier' is disabled the mask is 0 which means
we would always grab.
2014-02-28 14:55:14 +01:00
Giovanni Campagna
b9a5d710b7 compositor: always redirect passive button grabs to clutter
All WM events (passive button grabs and passive keyboard grabs)
are handled through clutter now, so we must make sure we spoof
them even if they happen on frames (because that's where we
grab on)
2014-02-27 14:37:48 +01:00
Giovanni Campagna
65dd54a4db compositor: don't spoof events when running as a wayland compositor
Weirdly, clutter stopped segfaulting when we call clutter_x11 methods
and the backend is not right, but this is correct anyway, and
probably fixes some BadDrawable errors in mutter-wayland on x11,
caused by mixing windows of the outer X and windows of Xwayland.
2014-02-27 14:28:46 +01:00
Giovanni Campagna
b00fa70d91 display: move more event handling to clutter
Mouse event handling was duplicated, resulting in weird interactions
if clutter was allowed to see certain events (for example under
wayland, where it gets all events). Because now clutter sees all
X events, even when running as an x11 compositor, we can handle
everything using the clutter variants.
At the same time, rewrite a little the passive button grab code,
to make it clear what is being matched on what and why.
2014-02-27 03:13:33 +01:00
Giovanni Campagna
394b44a2c2 compositor: fix mouse interactions on frames
meta_ui_window_is_widget() returns FALSE for frame windows, so we
must filter those explicitly (by letting the event go to gtk
and from there to MetaFrames). Also, for proper gtk widgets
(window menus) we want to let gtk see all events, including
keyboard, otherwise we break keynav in the window menu.
This means that having a window menu open disables keybindings
(because the event doesn't run through clutter)
2014-02-27 03:13:32 +01:00
Giovanni Campagna
ed6821a819 keybindings: fix per window keybindings
We must spoof events to clutter even if they are associated
with a MetaWindow, because keyboard events are always associated
with one (the focus window), and we must process keybindings
for window togheter with the global ones if they include Super,
because we're not going to see them again.
2014-02-27 03:13:32 +01:00
Jasper St. Pierre
98c4b82907 Revert "window: Update the shape, input, and opaque regions immediately"
This reverts commit c0d791cd6e.
2014-02-26 20:45:38 -05:00
Jasper St. Pierre
c0d791cd6e window: Update the shape, input, and opaque regions immediately
... and individually. It turns out that updating the opaque region
was causing the shape region to be updated, which was causing a new
shape mask to be generated and uploaded to the GPU. Considering
GTK+ regenerates the opaque region on pretty much any focus change,
this is not good.
2014-02-26 20:03:16 -05:00
Giovanni Campagna
45624f2edf MetaWindowActor: survive having no MetaSurfaceActor
We need a MetaWaylandSurface to build a MetaSurfaceActor, but
we don't have one until we get the set_window_xid() call from
XWayland. On the other hand, plugins expect to see the window
actor right from when the window is created, so we need this
empty state.

Based on a patch by Jasper St. Pierre.
2014-02-25 01:22:56 +01:00
Jasper St. Pierre
9b24ae2033 Revert "compositor: Delay meta_compositor_add_window until the first show"
This reverts commit 4efe4483fb.
2014-02-24 14:46:18 -05:00
Jasper St. Pierre
04b5232960 compositor: The stage is always focused when we're a Wayland compositor
gnome-shell has some complex tracking to set the X input focus
correctly, assuming various things about how the stage is set up in X11.
For instance, it assumes that all actors that get key focus are
gnome-shell Chrome actors that will get events through the stage, so
when one of them is focused, it will try to set the focus back to the
stage.

In Wayland, windows are considered chrome actors that will get key
events through the stage, so this only has the result of unfocusing any
windows that have just received key focus.

We should probably move this input focus moving to mutter instead of
gnome-shell so we can better use mutter's internal state and heuristics.
2014-02-23 12:34:53 -05:00
Jasper St. Pierre
f860df4b2d Revert "compositor: fix focusing the stage window"
This reverts commit 876f81db12.

This doesn't quite work properly, and is overcomplicated.
2014-02-23 12:34:52 -05:00
Stefano Facchini
4de3f7ca29 Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-19 21:55:35 +01:00
Jasper St. Pierre
4efe4483fb compositor: Delay meta_compositor_add_window until the first show
In order for the compositor to properly determine whether a client
is an X11 client or not, we need to wait until XWayland calls
set_window_id to mark the surface as an XWayland client. To prevent
the compositor from getting tripped up over this, make sure that
the window has been fully initialized by the time we call
meta_compositor_add_window.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:44:38 -05:00
Jasper St. Pierre
aec3edb1cc Always map the client and frame windows
Traditionally, WMs unmap windows when minimizing them, and map them
when restoring them or wanting to show them for other reasons, like
upon creation.

However, as metacity morphed into mutter, we optionally chose to keep
windows mapped for the lifetime of the window under the user option
"live-window-previews", which makes the code keep windows mapped so it
can show window preview for minimized windows in other places, like
Alt-Tab and Expose.

I removed this preference two years ago mechanically, by removing all
the if statements, but never went through and cleaned up the code so
that windows are simply mapped for the lifetime of the window -- the
"architecture" of the old code that maps and unmaps on show/hide was
still there.

Remove this now.

The one case we still need to be careful of is shaded windows, in which
we do still unmap the client window. In the future, we might want to
show previews of shaded windows in the overview and Alt-Tab. In that
we'd also keep shaded windows mapped, and could remove all unmap logic,
but we'd need a more complex method of showing the shaded titlebar, such
as using a different actor.

At the same time, simplify the compositor interface by removing
meta_compositor_window_[un]mapped API, and instead adding/removing the
window on-demand.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:19:41 -05:00
Jasper St. Pierre
d5d5c2167a compositor: Remove pending_input_region
Ever since the change to create the output window synchronously at startup,
there hasn't been any time where somebody could set a stage region the
output window was ready, so this was effectively dead code.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:21:00 -05:00
Jasper St. Pierre
39fee9f5a2 window-actor: Flip set_redirected around
I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:19:26 -05:00
Jasper St. Pierre
d6282716b2 compositor: Simplify the unredirected window management code
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:19:26 -05:00
Jasper St. Pierre
20545941fa Revert unintentional merge from wip/surface-content to wayland
This reverts a lot of commits.
2014-01-22 09:18:13 -05:00
Jasper St. Pierre
0a81314337 window-actor: Flip set_redirected around
I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
fa7a5782c6 compositor: Simplify the unredirected window management code
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
0e5f365d55 compositor: Remove pending_input_region
Ever since the change to create the output window synchronously at startup,
there hasn't been any time where somebody could set a stage region the
output window was ready, so this was effectively dead code.
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
bfc906cbc4 compositor: Remove meta_compositor_window_[un]mapped
We no longer unmap the toplevel windows during normal operation. The
toplevel state is tied to the window's lifetime.

Call meta_compositor_add_window / meta_compositor_remove_window instead...
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
8131f34eb6 Move _NET_WM_WINDOW_OPACITY handling to the standard window-props interface 2013-12-09 15:53:23 -05:00
Jasper St. Pierre
f29241d90e compositor: Remove atom_x_root_pixmap
It's unused
2013-12-09 15:53:23 -05:00
Jasper St. Pierre
283649b8d7 Support keybindings again, too 2013-12-05 17:18:49 -05:00
Jasper St. Pierre
29197d40c6 compositor: Don't assume we're a Wayland compositor 2013-12-05 17:18:49 -05:00
Jasper St. Pierre
0924c7d61b wayland: Use a stage paint callback instead of a signal handler on "paint"
This is much more appropriate...
2013-12-03 14:49:40 -05:00
Rui Matos
762fa0e116 compositor: Also redirect windows in wayland compositor mode
XWayland was doing this for us but now it isn't anymore.
2013-11-25 12:00:55 +01:00
Jasper St. Pierre
4326d0bf3a compositor: Make sure to construct plugin_mgr in Wayland as well... 2013-11-19 15:37:31 -05:00
Owen W. Taylor
b9da43b753 Rename meta_window_get_outer_rect() to meta_window_get_frame_rect()
For clarity, rename meta_window_get_outer_rect() to match terminology
we use elsewhere. The old function is left as a deprecated
compatibility wrapper.
2013-11-19 14:04:16 -05:00
Jasper St. Pierre
26aa10a974 compositor: Clean up comment
So it seems that we were intentionally delaying the output window,
although I wonder why...
2013-11-19 13:52:45 -05:00
Jasper St. Pierre
f6144082b1 compositor: Initialize the plugin manager after initializing the output window
Plugins like gnome-shell may want to grab the output window immediately
before bouncing back to the mainloop.
2013-11-19 13:52:13 -05:00
Jasper St. Pierre
8dd97b4998 compositor: Remove outdated comment
XWayland no longer redirects windows by default.
2013-11-18 21:18:59 -05:00
Giovanni Campagna
7b537d6b8f Fix regression in mutter-wayland translations
Switching meta/util.h to gi18n.h was wrong, mutter is a library
and needs gi18n-lib.h, but that cannot be included from a public
header (since it depends on config.h or command line options),
so split util.h into a public and a private part.

https://bugzilla.gnome.org/show_bug.cgi?id=707897
2013-09-11 16:01:07 +02:00
Giovanni Campagna
004ee2d3b5 MetaPluginManager: don't require plugins to pass events to clutter
We don't want the shell to know if it's running on ClutterX11 or
not, so we should forward the event ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=707482
2013-09-10 17:26:15 +02:00
Ray Strode
7ac9a6e241 compositor: initial has_window to FALSE in sync_actor_stacking
Spotted by Jasper, discussed on IRC.
2013-09-03 16:09:05 -04:00
Giovanni Campagna
b53bf0e8c2 Fix distcheck
Missing translation files, missing dists and some -Werrors.
2013-09-03 17:00:18 +02:00
Giovanni Campagna
7eb4bfbea3 wayland: implement support for plugin modality
Calling XIGrabDevice has no effect under wayland, because the
xserver is getting events from us. Instead, we need to use our
own interfaces for grabs.
At the same time, we can simplify the public API, as plugins
should always listen for events using clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-30 10:37:25 +02:00
Jasper St. Pierre
2d35e07fae wayland: Add support for set_opaque_region / set_input_region
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:52 -04:00
Giovanni Campagna
9a4783e364 Integrate the monitor manager with wayland
Use the right backend when running as a wayland compositor,
export the data to wayland clients, and use it to keep the stage
appropriately sized.
2013-08-27 10:09:39 +02:00
Giovanni Campagna
bd3d5df9ce Remove HAVE_WAYLAND ifdefs
Wayland support is always enabled now.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
876f81db12 compositor: fix focusing the stage window
We can't use the X11 stage window, if clutter is not using the X11
backend (and even if it was, it would be bogus when the xwayland
server is not the one clutter is talking to). Instead, we introduce
the concept of "focus type", which we use to differentiate the
various meanings of None in the focus_xwindow field.

https://bugzilla.gnome.org/show_bug.cgi?id=706364
2013-08-20 14:41:24 +02:00
Giovanni Campagna
75f3ae14b5 MetaPlugin: simplify the modal API
Remove grab window and cursor from the API, and just grab always
on the stage window with no cursor.
This is mainly to remove the X11 usage in the public API, in preparation
for implementing this in wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-20 14:25:49 +02:00
Robert Bragg
f9a11b3b18 wayland: Adds basic hybrid X + Wayland support
This adds support for running mutter as a hybrid X and Wayland
compositor. It runs a headless XWayland server for X applications
that presents wayland surfaces back to mutter which mutter can then
composite.

This aims to not break Mutter's existing support for the traditional X
compositing model which means a single build of Mutter can be
distributed supporting the traditional model and the new Wayland based
compositing model.

TODO: although building with --disable-wayland has at least been tested,
I still haven't actually verified that running as a traditional
compositor isn't broken currently.

Note: At this point no input is supported

Note: multiple authors have contributed to this patch:
Authored-by: Robert Bragg <robert@linux.intel.com>
Authored-by: Neil Roberts <neil@linux.intel.com>
Authored-by: Rico Tzschichholz.
Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
2013-08-10 19:13:48 -04:00
Jasper St. Pierre
3b51405255 main: Don't select for touch events on the stage
GNOME Shell's actors aren't touch capable, so we need to make sure that
they get the fallback pointer emulated events for now. This fixes the top
bar and other elements not working on a touchscreen without a grab.

https://bugzilla.gnome.org/show_bug.cgi?id=697192
2013-07-15 12:47:46 -04:00
Jasper St. Pierre
96221e6c04 compositor: Add an API to query if the stage is focused
gnome-shell needs to know whether the stage window is focused so
it can synchronize between stage window focus and Clutter key actor
focus. Track all X windows, even those without MetaWindows, when
tracking the focus window, and add a compositor-level API to determine
when the stage is focused.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-06-20 17:21:54 -04:00
Adel Gadllah
2a5b068863 compositor: Prevent an error in application code from keeping unredirect on permanently
We substract one from the unredirect counter when enable_unredirect_for_screen
gets called. It is an unsigned integer so substracting one from zero (which means enable) would overflow and thus keep it peramently enabled.

This should never happen because it means there is an unmatched
enable / disable pair somewhere. So in addition to fixing it add a
warning when this case gets triggered.

https://bugzilla.gnome.org/show_bug.cgi?id=701224
2013-06-18 22:18:38 +02:00
Owen W. Taylor
47b21b3547 Use new clutter_stage_set_paint_callback() function for after-paint notification
Commit 4f2bb583bf changed things so that the compositor used
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT
to get after-paint notification and send _NET_WM_FRAME_DRAWN, but this
doesn't actually work, since Clutter will already have blocked for
VBlank before calling post-paint functions.

The result is that frame synced toolkits like GTK 3.8 will normally
only be able to draw every other frame.

Since ::paint doesn't work either, a new function
clutter_stage_set_paint_callback() has been added to Clutter
(and will be included in the 1.14 branch)

https://bugzilla.gnome.org/show_bug.cgi?id=698794
2013-06-03 13:21:54 -04:00
Jasper St. Pierre
bd19de9429 compositor: Add an API to focus the stage X window
gnome-shell has traditionally just called XSetInputFocus when wanting to
set the input focus to the stage window, but this might cause strange,
hard-to-reproduce bugs because of an interference with mutter's focus
prediction. Add API to allow gnome-shell to focus the stage window that
also updates mutter's internal focus prediction state.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-24 17:43:37 -04:00
Giovanni Campagna
e10804727d compositor: remove the overlay_group concept
The hierarchy handling is handled in the shell by adding stuff
directly to the uiGroup, and we have a dedicated actor for
the overview there, so we don't need this anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 18:36:05 +02:00
Tomeu Vizoso
9df2d83aa0 Add small note to the docs about the actor containers in the compositor
https://bugzilla.gnome.org/show_bug.cgi?id=695935
2013-03-18 23:08:24 +01:00