1
0
Fork 0
Commit graph

66 commits

Author SHA1 Message Date
Jasper St. Pierre
91f35d6a01 wayland: Use standard SINCE version definitions 2014-05-12 17:01:00 -04:00
Jasper St. Pierre
88040d6b8a wayland: Have a consistent _init pattern for subcomponents 2014-04-22 18:27:43 -04:00
Jasper St. Pierre
fa2e1e4eda wayland-seat: Clean up includes 2014-04-22 18:25:34 -04:00
Jasper St. Pierre
6072e981a8 wayland: Kill extra includes to meta-wayland-stage.h
No idea why these are still included at all...
2014-04-22 16:56:02 -04:00
Jasper St. Pierre
7c6c4d63c5 seat: Move the keyboard resource creation over to MetaWaylandKeyboard 2014-04-17 19:15:53 -04:00
Jasper St. Pierre
5d43e33032 seat: Don't set the data device key focus on get_keyboard creation
It's not necessary, as we don't use anything from the protocol
keyboard at all.
2014-04-17 19:15:53 -04:00
Jasper St. Pierre
45a8a3f490 seat: Move pointer event handling to MetaWaylandPointer as well
Now everything that deals with the pointer is inside meta-wayland-pointer.c
2014-04-17 19:15:53 -04:00
Jasper St. Pierre
bdf55bc674 seat: Rewrite event handling in terms of MetaWaylandPointer 2014-04-17 19:15:53 -04:00
Jasper St. Pierre
e15c260e56 seat: Group CLUTTER_SCROLL handling together with other pointer events 2014-04-17 19:15:53 -04:00
Jasper St. Pierre
65ed8a817d seat: Don't save the current stage ourselves
ClutterInputDevice already saves it.
2014-04-17 19:15:53 -04:00
Jasper St. Pierre
a8d2dfd14f seat: Don't require an event to repick()
We always pass NULL, and anywhere where we want to pass an event
should be handled internally.
2014-04-17 19:15:53 -04:00
Jasper St. Pierre
e02bf13206 seat: Remove incorrect comment above repick 2014-04-17 19:15:53 -04:00
Jasper St. Pierre
4b7d77864a seat: Move update_pointer to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
72e4d42267 seat: Reorder handle_event helpers near handle_event 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
1abdd7be10 seat: Move pointer interface over to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
f3d88ca1d1 seat: Rewrite the pointer interface in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
15d89d451f seat: Move update_cursor_surface to the end
It's now only a public API.
2014-04-17 19:15:52 -04:00
Jasper St. Pierre
4510b82361 seat: Move set_cursor_surface and all that tracking to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
ae0853ed86 seat: Move cursor storage to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
76544ff6e1 seat: Rewrite get_pointer / get_keyboard in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
dde96951a7 seat: Rewrite handle_scroll in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
678fa52ae1 seat: Reformat 2014-04-17 19:15:51 -04:00
Jasper St. Pierre
1be97f3d59 seat: Reorder 2014-04-17 19:15:51 -04:00
Jasper St. Pierre
339a78718d pointer/keyboard: Support more than one focused resource
Sophisticated clients, like those using ClutterGtk, will have more
than one focused resource per client, as both Clutter and GDK will
ask for a wl_pointer / wl_keyboard. Support this naturally using
the same "hack" as Weston: multiple resource lists, where we move
elements from one to the other.
2014-04-16 15:31:53 -04:00
Jasper St. Pierre
30d534f17e display: Rename grab_op_is_wayland to grab_op_should_block_wayland
The idea here is that while we take a WM-side grab, like a compositor
grab or a resizing grab, we need to remove the focus from the Wayland
client.

We make a special exception for CLICKING operations, because these
are really an internal state machine while you're pressing on a button
inside a frame, and in this case, we need to not kill the focus.
2014-04-12 00:24:26 -07:00
Jasper St. Pierre
e4cd000cef wayland: Implement wl_seat v3
The new XWayland DDX flat out requires seat v3.
2014-04-02 11:40:40 -04:00
Jasper St. Pierre
be60e4f6e7 cursor-tracker: Make set_window_cursor take a MetaCursorReference as well 2014-03-31 18:27:19 -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
8968501031 wayland-seat: Don't send pointer enter/leave events during a GRAB_OP
meta_wayland_seat_repick() can be called in various cases while mutter
has a GRAB_OP ongoing which means we could be sending wrong pointer
enter/leave events.

https://bugzilla.gnome.org/show_bug.cgi?id=726123
2014-03-20 17:08:53 +01:00
Rui Matos
b3364cad3e wayland: Update keyboard state unconditionally
In particular we need to know about all key events to keep the xkb
state reliable even if the event is then consumed by a global shortcut
or grab and never reaches any wayland client.

We also need to keep track of all pressed keys at all times so that we
can send an updated set or pressed keys to the focused client when a
grab ends.

https://bugzilla.gnome.org/show_bug.cgi?id=722847
2014-03-18 19:15:17 +01:00
Rui Matos
62e45b6d5e wayland-pointer: Drop unused arg from focus grab interface method
https://bugzilla.gnome.org/show_bug.cgi?id=726123
2014-03-17 11:06:58 +01:00
Jasper St. Pierre
d6b6b363ad seat: Add support for smooth scrolling 2014-03-10 11:36:36 -04:00
Jasper St. Pierre
254e2e993c seat: Redo scroll handling
To make way for smooth scrolling
2014-03-10 11:36:36 -04:00
Jasper St. Pierre
c595a9c29f seat: Reduce indentation 2014-03-10 11:36:36 -04:00
Jasper St. Pierre
83aca0b53d window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:

  * X11 compositor. In this case, we're a traditional X11 compositor,
    not a Wayland compositor. We use XCompositeNameWindowPixmap to get
    the backing pixmap for the window, and deal with the COMPOSITE
    extension messiness.

    In this case, meta_is_wayland_compositor() is FALSE.

  * Wayland clients. In this case, we're a Wayland compositor managing
    Wayland surfaces. The rendering for this is fairly straightforward,
    as Cogl handles most of the complexity with EGL and SHM buffers...
    Wayland clients give us the input and opaque regions through
    wl_surface.

    In this case, meta_is_wayland_compositor() is TRUE and
    priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.

  * XWayland clients. In this case, we're a Wayland compositor, like
    above, and XWayland hands us Wayland surfaces. XWayland handles
    the COMPOSITE extension messiness for us, and hands us a buffer
    like any other Wayland client. We have to fetch the input and
    opaque regions from the X11 window ourselves.

    In this case, meta_is_wayland_compositor() is TRUE and
    priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.

We now split the rendering logic into two subclasses, which are:

  * MetaSurfaceActorX11, which handles the X11 compositor case, in that
    it uses XCompositeNameWindowPixmap to get the backing pixmap, and
    deal with all the COMPOSITE extension messiness.

  * MetaSurfaceActorWayland, which handles the Wayland compositor case
    for both native Wayland clients and XWayland clients. XWayland handles
    COMPOSITE for us, and handles pushing a surface over through the
    xf86-video-wayland DDX.

Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-20 14:44:31 -05:00
Jasper St. Pierre
1e6b3faa83 Fix the input region not working properly
The input region was set on the shaped texture, but the shaped texture
was never picked properly, as it was never set to be reactive. Move the
pick implementation and reactivity to the MetaSurfaceActor, and update
the code everywhere else to expect a MetaSurfaceActor.
2014-02-18 21:29:23 -05:00
Jasper St. Pierre
a364c2a96b pointer/keyboard: Make sure not to get stale on client resources as well
Both the pointer/keyboard resource and surface resource can be destroyed
at any point in the destruction process, so we need to have destroy
listeners on both. To make the code easier to follow, rename ->focus
to ->focus_surface at the same time, and rearrange the code so that
the two of them are always grouped together.
2014-02-18 18:03:31 -05:00
Jasper St. Pierre
304a525744 wayland: Remove is_native from seat
We can easily do this with a Clutter backend check instead...
2014-02-17 20:49:04 -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
4780f74a40 wayland-surface: Properly allow setting the cursor to a NULL buffer 2013-11-25 17:18:22 -05:00
Jasper St. Pierre
a02d734243 window-actor: Move all buffer management and damage correction here
We want ShapedTexture to be a dumb actor that knows how to
pick/paint fairly easily, without any "platform knowledge", so to say...
2013-11-18 21:19:00 -05:00
Jasper St. Pierre
d96b053c9d cursor-tracker: Use a sync methodology for the cursor image
Rather than have MetaWaylandSeat do all the state management itself,
put the split between the root cursor and the window cursor in the
cursor tracker itself. We'll expand this to add a "grab" cursor in
the next commit, allowing us to force a cursor on grab operations.
2013-11-18 19:25:47 -05:00
Rui Matos
63b9110f93 wayland: Update internal wayland state unconditionally
Things like idle times and the cursor position need to be updated even
if there's a mutter grab in effect.

https://bugzilla.gnome.org/show_bug.cgi?id=712247
2013-11-13 21:55:05 +01:00
Jasper St. Pierre
6cc014a941 wayland: Move cursor tracker handling code to meta_wayland_seat_handle_event 2013-11-12 16:53:14 -05:00
Jasper St. Pierre
b7b95123ed wayland: Drop raise on click too
We'll handle this through GCD as well.
2013-11-12 16:53:14 -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
ad84aef766 wayland-seat: Fix updating the grab serial
We shouldn't update the grab serial if we go from 2 buttons => 1.
2013-11-12 15:52:14 -05:00
Giovanni Campagna
c0e7f6d9bf wayland: remove some wl_signal usage
It was a left-over from the initial code import from weston.

https://bugzilla.gnome.org/show_bug.cgi?id=707863
2013-09-16 14:51:13 +02:00