mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
window-actor/x11: Queue full actor redraw when redraw queued
With frame timings, we might end up in a situation where a frame drawn is expected, but no damage was posted. Up until now, mutter handled this, if the window wasn't completely hidden, by posting a 1x1 pixel damage region. The problem with this is that we now are a bit more aggressive optimizing away no-op redraws, meaning we still might end up not drawing, making things get stuck. Fix this by doing a full actor redraw, as that is the only reliable way to both a new frame being drawn, as well as the actor in question itself getting redrawn. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1516 Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3369 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1471 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1754>
This commit is contained in:
parent
44a4e61665
commit
9b90b5a1b0
@ -483,10 +483,12 @@ meta_window_actor_x11_queue_frame_drawn (MetaWindowActor *actor,
|
||||
* damage or any unobscured, or while we had the window frozen
|
||||
* (e.g. during an interactive resize.) We need to make sure that the
|
||||
* before_paint/after_paint functions get called, enabling us to
|
||||
* send a _NET_WM_FRAME_DRAWN. We do a 1-pixel redraw to get
|
||||
* consistent timing with non-empty frames. If the window
|
||||
* is completely obscured, or completely off screen we fire off the
|
||||
* send_frame_messages timeout.
|
||||
* send a _NET_WM_FRAME_DRAWN. We need to do full damage to ensure that
|
||||
* the window is actually repainted, otherwise any subregion we would pass
|
||||
* might end up being either outside of any stage view, or be occluded by
|
||||
* something else, which could potentially result in no frame being drawn
|
||||
* after all. If the window is completely obscured, or completely off
|
||||
* screen we fire off the send_frame_messages timeout.
|
||||
*/
|
||||
if (is_obscured ||
|
||||
!clutter_actor_peek_stage_views (CLUTTER_ACTOR (actor)))
|
||||
@ -495,8 +497,7 @@ meta_window_actor_x11_queue_frame_drawn (MetaWindowActor *actor,
|
||||
}
|
||||
else if (surface)
|
||||
{
|
||||
const cairo_rectangle_int_t clip = { 0, 0, 1, 1 };
|
||||
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (surface), &clip);
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (surface));
|
||||
actor_x11->repaint_scheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user