1
0
Fork 0
Commit graph

327 commits

Author SHA1 Message Date
Jasper St. Pierre
2ebecc5370 wayland-surface: Allow extension resources to be double-destroyed
As they will be on shutdown... I'm not sure if this is a wayland-server
bug or not, but we should guard against it anyway.
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
02144d17e9 wayland-surface: Fill in the maximized/fullscreen hints to the configure event 2013-11-19 19:35:34 -05:00
Jasper St. Pierre
bbe3641844 wayland-surface: Add support for xdg_popup 2013-11-19 18:44:21 -05:00
Jasper St. Pierre
0cc5cf940b wayland-surface: Remove some properties from the double-buffered state
Now that we can always set them on the MetaWindow...
2013-11-19 18:44:21 -05:00
Jasper St. Pierre
153d8efcf5 window: Create a backing MetaWindow for unmapped Wayland surfaces
We require a MetaWindow to properly implement some of the requests
for xdg_surface, so add a way to have an unmapped MetaWindow that
we can store properties on, that we later map when the client
attaches a buffer...
2013-11-19 17:48:19 -05:00
Jasper St. Pierre
be744775c1 wayland-surface: Support xdg_surface.destroy
Cool.
2013-11-19 17:48:19 -05:00
Jasper St. Pierre
5959457c73 wayland-surface: Embed MetaWaylandSurfaceExtension in MetaWaylandSurface
This makes it easier to support xdg_surface.destroy, which we're
going to add support for next commit...
2013-11-19 17:48:19 -05:00
Jasper St. Pierre
d945501be6 window: Remove width/height from meta_window_new_for_wayland 2013-11-19 15:37:33 -05:00
Jasper St. Pierre
9461c612de wayland-surface: Only spew about set_buffer_scale if it's not 1
... to stop the GTK+ spam on my system.
2013-11-19 13:00:34 -05:00
Jasper St. Pierre
f0280a8868 wayland-surface: Allow setting a NULL buffer to effectively unmap 2013-11-19 12:47:50 -05:00
Jasper St. Pierre
932e913d88 wayland-surface: Fix formatting 2013-11-14 21:49:51 -05:00
Jasper St. Pierre
b72315e27a wayland-surface: Support xdg_surface_resize as well 2013-11-14 21:48:39 -05:00
Jasper St. Pierre
3c7cd1f38c wayland-surface: Use begin_grab_op for move grabs 2013-11-14 21:34:20 -05:00
Jasper St. Pierre
875bbec949 wayland: Drop old hack to synthesize motion events
mutter now uses Clutter events for the source of its drag support, so
we don't need to synthesize X11 events anymore.
2013-11-12 16:53:14 -05:00
Jasper St. Pierre
72a900787f wayland: Send xdg_surface_focused_set / xdg_surface_focused_unset 2013-11-12 16:53:13 -05:00
Jasper St. Pierre
7186841db0 wayland-surface: Remove initial_state
Just put everything in the double buffered state so it all
arrives at the same time; on commit.
2013-11-12 16:53:13 -05:00
Jasper St. Pierre
ab080e3e6b Add support for xdg-shell
Replace our existing support for wl_shell with xdg_shell, the new proposal
for how Wayland surfaces should work.
2013-11-12 16:53:13 -05:00
Andreas Heider
237d990dea mutter-wl: Support setting NULL surface regions.
According to the wayland spec (A.14.1.5. wl_surface::set_opaque_region),
setting a NULL opaque region is possible and should cause the pending
opaque region to be set to empty. This implements the required
behavoir.

Also fixes set_input_region, which suffered from an analogous bug.

Previously the weston-simple-egl demo client caused mutter-wayland to
crash with a segfault in meta_wayland_surface_set_opaque_region, with
this patch it works as intended.

https://bugzilla.gnome.org/show_bug.cgi?id=711518
2013-11-05 18:18:15 -05:00
Giovanni Campagna
776a86a65f wayland: heavily refactor pointer grabs
Grabs are now slice allocated structures that are handled by
whoever starts the grab. They contain a generic grab structure
with the interface and a backpointer to the MetaWaylandPointer.
The grab interface has been changed to pass full clutter events,
which allowed to remove the confusion between grab->focus and
pointer->focus. Invidual grabs are now required to keep their
focus, and choose whoever gets the events.

https://bugzilla.gnome.org/show_bug.cgi?id=707863
2013-09-16 14:51:12 +02:00
Giovanni Campagna
76e2455d1b wayland: implement support for popup surfaces
Popup surfaces are mapped into override_redirect surfaces
of a DROPDOWN_MENU type, with the addition of a special pointer
grab.

https://bugzilla.gnome.org/show_bug.cgi?id=707863
2013-09-16 14:51:12 +02:00
Giovanni Campagna
81d9797544 wayland: implement transient hints for wayland clients
wl_shell supports a set_transient() map request that is equivalent
to setting WM_TRANSIENT_FOR in X11, so implement that.

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-16 14:48:57 +02:00
Giovanni Campagna
12d6c70000 MetaWaylandSurface: cache the surface type until the first commit
Once the sizing is properly wired up, we need to make sure that
the size at the initial map is correct, and not always 0, 0 because
the buffer is not yet converted into a CoglTexture by MetaShapedTexture,
otherwise we end up sending out configure events at 1 x 1.
To do so, we cache the surface type in the initial state until the
first commit.

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-16 14:46:35 +02:00
Giovanni Campagna
a7eaf43e18 wayland: implement resizing and maximization for wayland clients
To properly resize clients, we need to send them configure events
with the size we computed from the constraint system, and
then check if the new size they ask is compatible with
our expectation.

Note that this does not handle interactive resizing yet, it
merely makes the API calls work for wayland clients.

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-16 14:46:34 +02:00
Giovanni Campagna
168ea64a45 wayland: use symbolic constants for interface version
Replace magic numbers scattered around the code with proper
macros collected in one header file.

https://bugzilla.gnome.org/show_bug.cgi?id=707851
2013-09-10 15:55:11 +02:00
Giovanni Campagna
73ee491281 wayland: fix interface versioning
Add MIN(...) with the interface version actually implemented
to all resource constructor, so that we never risk seeing requests
we don't implement (and consequently segfault)

https://bugzilla.gnome.org/show_bug.cgi?id=707851
2013-09-10 15:54:42 +02:00
Giovanni Campagna
a26ded47d9 Add a private gtk-mutter protocol
Add a new interface, gtk_shell, than can be used by gtk to
retrieve a surface extension called gtk_surface, which will be
used to communicate with mutter all the GTK extensions to EWMH

https://bugzilla.gnome.org/show_bug.cgi?id=707128

Add support for GTK application menus

To do so, we need to be able to set surface state before creating
the MetaWindow, so we introduce MetaWaylandSurfaceInitialState as
a staging area.
The gtk-shell-surface implementation would either write to the
initial state, or directly to the window.

At the same, implement set_title and set_class too, because it's
easy enough.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
cad9e14463 Move surface state tracking and surface interface to a separate file
Move everything surface related from meta-wayland.c to meta-wayland-surface.c

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00