mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
This commit is contained in:
parent
590cf4e832
commit
cbe5b6b3bc
@ -211,6 +211,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 = 0;
|
||||
cairo_rect.y = 0;
|
||||
cairo_rect.width = rect.width;
|
||||
cairo_rect.height = rect.height;
|
||||
|
||||
cairo_region_intersect_rectangle (region, &cairo_rect);
|
||||
|
||||
if (window_actor)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user