1
0
Fork 0
Commit graph

176 commits

Author SHA1 Message Date
Jasper St. Pierre
11aa3c030b wayland-surface: Don't require we manually bump the version for xdg-shell
It's in the protocol as an enum.
2014-02-16 10:21:22 -05:00
Jasper St. Pierre
bd1bec5617 wayland-surface: Prefix xdg-shell methods with "xdg_shell_" 2014-02-16 10:21:22 -05:00
Adel Gadllah
d9659d4b36 wayland-surface: Don't crash when someone tries to run a native app using old gtk
This ends up calling set_dbus_properties with a NULL
window, instead of segfaulting the compositor return so that the broken
app dies instead.

https://bugzilla.gnome.org/show_bug.cgi?id=724472
2014-02-16 16:19:23 +01:00
Jasper St. Pierre
f16e9b2ee7 wayland-surface: Make set_margin double-buffered as well 2014-02-10 14:16:06 -05:00
Jasper St. Pierre
06380938d4 wayland-surface: Make set_fullscreen / set_maximized and friends double-buffered 2014-02-09 18:23:39 -05:00
Jasper St. Pierre
def5e86673 wayland: Add support for the set_margin request 2014-02-07 19:28:36 -05:00
Jasper St. Pierre
0c213c8fee wayland: Add support for the delete event 2014-02-07 19:28:36 -05:00
Jasper St. Pierre
912a0abd26 wayland: Remove edges
This is an upstream change to xdg-shell.
2014-02-07 19:28:36 -05:00
Jasper St. Pierre
d694260ad2 xwayland: Fix xwayland
Don't give us a freed pointer here.
2014-02-07 19:28:05 -05:00
Jasper St. Pierre
8566566451 xwayland: Split out the XWayland stuff into its own private struct 2014-02-07 16:21:27 -05:00
Jasper St. Pierre
f6db756326 shaped-texture: Move unobscured_region processing here
We want to remove a bunch of auxilliary duties from the MetaWindowActor
and MetaSurfaceActor, including some details of how culling is done.
Move the unobscured region culling code to the MetaShapedTexture, which
helps the actor become "more independent".

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-05 14:42:38 -05:00
Jasper St. Pierre
3e98ffaf99 wayland-surface: Don't crash if a client destroys a buffer in use
This is considered "undefined" by upstream. Right now GTK+ does this
a lot, so we shouldn't crash. Let's make them crash instead and send
them an error instead.
2014-02-03 18:36:46 -05:00
Jasper St. Pierre
7e7b671b8e keybindings: Simplify interface for VT switching 2014-02-01 19:38:01 -05:00
Jasper St. Pierre
8905bd2280 window-x11: Move meta_window_new to window-x11.c and rename 2014-02-01 19:19:22 -05:00
Jasper St. Pierre
59c8b949ad window: Delay the showing of XWayland clients until set_window_id
Use our new "surface_mapped" field to delay the showing of XWayland clients
until we have associated together the window's XID and the Wayland surface ID.

This ensures that when we show this window to the compositor, it will properly
use the Wayland surface for rendering, rather than trying to use COMPOSITE and
crash.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 19:18:01 -05:00
Jasper St. Pierre
2f6f0f252c wayland: Simply store a MetaWaylandBuffer
There's no need for the MetaWaylandBufferReference abstraction...
2014-02-01 17:55:16 -05:00
Jasper St. Pierre
13651949ed wayland-seat: Rename sprite to cursor_surface 2014-02-01 17:55:03 -05:00
Jasper St. Pierre
fdeb72224c wayland-seat: Fix pointer issues
Moving the mouse over weston-terminal, we can see several issues:

 * it often updates late, or not at all
 * the attachment of the pointer sprite is wrong

These are because we willy-nilly call seat_update_sprite all over the
place, and often in wrong areas. Set up a set_pointer_surface helper
method that will do the right thing for us in all cases, and call it
on transitions.
2014-02-01 17:54:47 -05:00
Jasper St. Pierre
92e36e7076 wayland-surface: Attach the buffer to a surface, even if it doesn't have a role
Currently, set_cursor isn't properly working. Often, the requests look
like this:

  cursor_surface = wl_compositor.create_surface()
  cursor_buffer = create_cursor_buffer()
  cursor_surface.attach(cursor_buffer, 0, 0)
  cursor_surface.commit()
  wl_pointer.set_cursor(cursor_surface, 7, 14)

But since the surface doesn't "have a role" when the commit comes in,
we ignore it, and don't do anything with the pending buffer. When
set_cursor is called, however, we don't immediately update anything
since it doesn't have a buffer.

This effectively means that set_cursor has unpredictable side effects.
Weston's toy toolkit reuses the same surface for every buffer, so it
only fails the first time. In clients that use a new surface for every
cursor sprite, the cursor is effectively invisible.

To solve this, change the code to always set the buffer for a surface,
even if it doesn't have any real role.
2014-02-01 17:24:13 -05:00
Jasper St. Pierre
d74796ee80 wayland-surface: Use the same commit() when commiting subsurface
Refactor our commit() implementation out of wl_surface_commit(),
and pass the double-buffered state around to all our implementation
methods. This allows us to drop a few lines destroying and
reinitializing list of frame callbacks. This is a big cleanup for
the next commit, though.
2014-02-01 16:44:18 -05:00
Jasper St. Pierre
3e35cac67a wayland-surface: Repick after cleaning up everything else
Just a code cleanup to keep all the freeing code together.
2014-02-01 16:29:36 -05:00
Jasper St. Pierre
1f7a6bf845 wayland-surface: Don't clean up the buffer_destroy_listener twice
double_buffered_state_destroy will do this for us.
2014-02-01 16:29:09 -05:00
Jasper St. Pierre
365442c1ff wayland-surface: Fix typo 2014-02-01 16:19:54 -05:00
Jasper St. Pierre
9567fa9c6a wayland: Check for launcher before freeing it
This prevents a segfault on shutdown.
2014-01-31 19:03:56 -05:00
Jasper St. Pierre
7a8de0c0af wayland: Reindent 2014-01-31 19:03:56 -05:00
Jasper St. Pierre
10fead9ba1 wayland-pointer: Fix infinite loop when leaving focus from a destroyed surface
To prevent corruption, our focus listener needs to be removed even when
the surface is destroyed. So, bailing out when pointer->focus->resource
is NULL just isn't good enough.
2014-01-31 18:21:04 -05:00
Jasper St. Pierre
a09fa3b0e4 wayland: Clean up the parallels between creating callbacks and surface extensions 2014-01-31 16:40:47 -05:00
Jasper St. Pierre
9edff6f250 wayland: Use wl_callback_send_done
For no specific reason...
2014-01-31 16:40:47 -05:00
Jasper St. Pierre
225e20a898 wayland: Remove superfluous "wayland_" from arguments 2014-01-31 11:38:37 -05:00
Jasper St. Pierre
1a62ac9276 xwayland: Shuffle some code around 2014-01-31 11:24:02 -05:00
Jonas Ådahl
4f4b1bfc37 wayland: Support wl_subsurface.set_sync/set_desync
Implement support for synchronous subsurfaces commits. This means that
the client can, by calling wl_subsurface.set_sync, cause its surface
state to be commited not until its parent commits.

This will mean there will be will potentially be one more surface state
(regions, buffer) at the same time: the active surface state, the mutable
pending surface state, and the immutable surface state that was pending
on last surface commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2014-01-30 15:13:44 -05:00
Jonas Ådahl
9348c9bd4b wayland: Make wl_subsurface.place_(above|below) properly synchronized
The placement set by either wl_subsurface.place_above or
wl_subsurface.place_below should be applied when the parent surface
invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2014-01-30 15:13:43 -05:00
Jonas Ådahl
16de7f66fb wayland: Make wl_subsurface.set_position properly synchronized
The position set by wl_subsurface.set_position should be applied when
the parent surface invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2014-01-30 19:12:06 +01:00
Jonas Ådahl
799c27484d wayland: Report error when trying to stack subsurface incorrectly
Don't allow a client to stack a subsurface next to a subsurface with
another parent, or to a non-parent non-subsurface surface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2014-01-30 19:12:06 +01:00
Jasper St. Pierre
9c876722a0 xwayland: Use server protocol wrappers instead of wl_resource_post_event 2014-01-29 10:27:16 -05:00
Jasper St. Pierre
96fc93d744 xwayland: Reindent 2014-01-29 10:23:58 -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
ac32b9ef95 get xwayland working again 2014-01-21 19:06:06 -05:00
Jasper St. Pierre
e6391c2896 surface content 2014-01-21 19:01:34 -05:00
Jasper St. Pierre
a0fe392665 surface-actor: Move unobscured_region processing here
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
8cb9cfb7b8 Revert "meta-weston-launch: Call VT_ACTIVATE ourselves"
This reverts commit ebe6e3180e.

This is wrong, as mutter's controlling TTY may not be the same
as the active VT, and in fact won't be in the case of systemd
spawning us.

The "correct" API for this is to use David Herrmann's
"Session Positions" system to switch to another VT:

  http://lists.freedesktop.org/archives/systemd-devel/2013-December/014956.html
2014-01-16 13:42:07 -05:00
Jasper St. Pierre
002c5b8f87 wayland: Don't keep track of the drm FD in the WaylandCompositor
As logind can give us a new FD at any time when it resumes. Theoretically,
this is still technically wrong, as the MetaCursorTracker holds onto it.
We'll fix this after we port to logind.
2013-12-31 19:22:16 -05:00
Jasper St. Pierre
1d3dbea20c meta-weston-launch: Don't use a GObject here
We don't need a complicated API anymore.
2013-12-31 19:22:16 -05:00
Jasper St. Pierre
ebe6e3180e meta-weston-launch: Call VT_ACTIVATE ourselves
We don't need any special permissions, so we don't need to go through
weston-launch to do so...
2013-12-31 19:22:16 -05:00
Jasper St. Pierre
a3de799939 wayland-surface: Remove inappropriate meta-weston-launch.h include 2013-12-31 19:20:58 -05:00
Jasper St. Pierre
7009d1e470 wayland: Update to latest xdg-shell
We don't use the new maximize / fullscreen request system yet, leading
to broken maximization / fullscreen. This will be fixed in a followup.
2013-12-17 15:04:16 -05:00
Jasper St. Pierre
fd8cc9b7a8 xwayland: Remove outdated code
Now that focus management goes through the central display.c,
we don't need to do this separately. Wayland and X clients
should just behave as one.
2013-12-09 13:57:32 -05:00
Jasper St. Pierre
65b39212d5 meta-wayland: Remove undefined variable 2013-12-05 18:32:11 -05:00
Jasper St. Pierre
283649b8d7 Support keybindings again, too 2013-12-05 17:18:49 -05:00
Jasper St. Pierre
1be117e430 wayland-surface: Properly set the window type
We need to make sure to call meta_window_type_changed after updating
the type...
2013-12-04 10:41:58 -05:00