diff options
author | Pekka Paalanen <ppaalanen@gmail.com> | 2012-10-10 12:49:28 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-10 21:38:44 -0400 |
commit | 0cbd3b50590cbb86ab963201526f3b8ade257ec3 (patch) | |
tree | 009385bbd2e02a42063f46ea02c858ec1b20e83f /clients | |
parent | 512dde8ce9723fe98e715ad6fe0a4f04eefd7394 (diff) | |
download | weston-0cbd3b50590cbb86ab963201526f3b8ade257ec3.tar.gz weston-0cbd3b50590cbb86ab963201526f3b8ade257ec3.tar.bz2 weston-0cbd3b50590cbb86ab963201526f3b8ade257ec3.zip |
compositor, clients: double-buffer input region
Make input region double-buffered as specified in the new protocol.
While doing it, get rid of the undef region code, and instead use a
maximum sized real pixman region. This avoids special-casing regions
that might sometimes be undef.
As the input region is now usable by default instead of undef,
weston_surface_update_transform() does not need to reset the input
region anymore.
weston_surface_attach() no longer resets the input region on surface
size change. Therefore, also weston_seat_update_drag_surface() does not
need to reset it.
Update toytoolkit to set input region before calling wl_surface_commit()
or swapBuffers (which does commit).
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'clients')
-rw-r--r-- | clients/window.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clients/window.c b/clients/window.c index 973b2106..2d0efc50 100644 --- a/clients/window.c +++ b/clients/window.c @@ -837,6 +837,13 @@ window_attach_surface(struct window *window) window->opaque_region = NULL; } + if (window->input_region) { + wl_surface_set_input_region(window->surface, + window->input_region); + wl_region_destroy(window->input_region); + window->input_region = NULL; + } + switch (window->buffer_type) { #ifdef HAVE_CAIRO_EGL case WINDOW_BUFFER_TYPE_EGL_WINDOW: @@ -867,13 +874,6 @@ window_attach_surface(struct window *window) default: return; } - - if (window->input_region) { - wl_surface_set_input_region(window->surface, - window->input_region); - wl_region_destroy(window->input_region); - window->input_region = NULL; - } } int |