[mutter/wip/wayland-kms: 34/39] meta-wayland: intersect the damage region with the window size before applying
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/wayland-kms: 34/39] meta-wayland: intersect the damage region with the window size before applying
- Date: Fri, 23 Aug 2013 16:19:10 +0000 (UTC)
commit df2686813d8207d70ae13dfe067953b0a564afe1
Author: Giovanni Campagna <gcampagn redhat com>
Date: Mon Jul 29 14:09:26 2013 +0200
meta-wayland: intersect the damage region with the window size before applying
According to the wayland documentation, damage outside the
window size is ignored.
This happened with xwayland+wlshm (causing a GL error when calling
TexSubImage2D), probably due to not resizing the buffer
until we receive the corresponding X event.
Might also be an off-by-one in xwayland, as the window size did
not actually change.
Note: we might want to take the configure_notify path instead,
and keep the GL/clutter size consistent with wayland rather than
X, because in the end that's what matters for events and composition.
https://bugzilla.gnome.org/show_bug.cgi?id=706289
src/wayland/meta-wayland.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index a524d4b..81648fe 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -213,6 +213,16 @@ surface_process_damage (MetaWaylandSurface *surface,
{
MetaWindowActor *window_actor =
META_WINDOW_ACTOR (meta_window_get_compositor_private (surface->window));
+ MetaRectangle rect;
+ cairo_rectangle_int_t cairo_rect;
+
+ meta_window_get_input_rect (surface->window, &rect);
+ cairo_rect.x = rect.x;
+ cairo_rect.y = rect.y;
+ cairo_rect.width = rect.width;
+ cairo_rect.height = rect.height;
+
+ cairo_region_intersect_rectangle (region, &cairo_rect);
if (window_actor)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]