diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2014-04-02 19:53:46 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-02 21:25:27 -0700 |
commit | 9fc71519912c33a270f2579e1ef52b809faf130e (patch) | |
tree | 6bb0316b263271434d0fec419b656da54fb3b668 | |
parent | a4ab5422e9ae8699b0ce6f86241d6105ddac445f (diff) | |
download | weston-9fc71519912c33a270f2579e1ef52b809faf130e.tar.gz |
Add possible capabilities CURSOR_PLANE and ARBITRARY_MODE
The CURSOR_PLANE capability indicates that the backend has a concept of a
cursor plane and can handle a cursor without compositing. This is currently
only advertised by the DRM backend.
The ARBITRARY_MODE flag specifies that the backend is capable of switching to
virtually any resolution. This is currently only advertised in the RDP
backend. While it's a bit buggy right now, it should be capable of this.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r-- | src/compositor-drm.c | 5 | ||||
-rw-r--r-- | src/compositor-rdp.c | 4 | ||||
-rw-r--r-- | src/compositor.h | 6 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 77caddf3..3c15ec30 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2788,6 +2788,11 @@ drm_compositor_create(struct wl_display *display, goto err_sprite; } + /* A this point we have some idea of whether or not we have a working + * cursor plane. */ + if (!ec->cursors_are_broken) + ec->base.capabilities |= WESTON_CAP_CURSOR_PLANE; + path = NULL; if (udev_input_init(&ec->input, diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 909e2257..f4c80a01 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -1005,7 +1005,9 @@ rdp_compositor_create(struct wl_display *display, if (rdp_compositor_create_output(c, config->width, config->height) < 0) goto err_compositor; - if (!config->env_socket) { + c->base.capabilities |= WESTON_CAP_ARBITRARY_MODES; + + if(!config->env_socket) { c->listener = freerdp_listener_new(); c->listener->PeerAccepted = rdp_incoming_peer; c->listener->param4 = c; diff --git a/src/compositor.h b/src/compositor.h index 37ad17fb..15d6e03c 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -558,6 +558,12 @@ enum weston_capability { /* screencaptures need to be y-flipped */ WESTON_CAP_CAPTURE_YFLIP = 0x0002, + + /* backend/renderer has a seperate cursor plane */ + WESTON_CAP_CURSOR_PLANE = 0x0004, + + /* backend supports setting arbitrary resolutions */ + WESTON_CAP_ARBITRARY_MODES = 0x0008, }; struct weston_compositor { |