xwayland: Fix delay in displaying pop-up menu
Xwayland pop-up menus aren't displayed until the mouse moves, or some other action causes the compositor to repaint. This is because the shell knows nothing about xwayland override redirect windows, so it won't assign them an output. Without an output, the surface commit won't cause a repaint. Fix this with brute force by updating their geometry on commit. If the geometry is dirty (and it will be for new surfaces), this will cause an output to be assigned before the upcoming weston_surface_schedule_repaint() Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Found-by: Hideyuki Nagase <hideyukn@microsoft.com>
This commit is contained in:
parent
14533cdd25
commit
889c2e3f0d
@ -170,6 +170,16 @@ weston_desktop_xwayland_surface_committed(struct weston_desktop_surface *dsurfac
|
|||||||
if (surface->added)
|
if (surface->added)
|
||||||
weston_desktop_api_committed(surface->desktop, surface->surface,
|
weston_desktop_api_committed(surface->desktop, surface->surface,
|
||||||
sx, sy);
|
sx, sy);
|
||||||
|
|
||||||
|
/* If we're an override redirect window, the shell has no knowledge of
|
||||||
|
* our existence, so it won't assign us an output.
|
||||||
|
*
|
||||||
|
* We should already have dirty geometry if we're a new view, so just
|
||||||
|
* update the transform to get us an output assigned, or we won't
|
||||||
|
* cause a repaint.
|
||||||
|
*/
|
||||||
|
if (surface->state == XWAYLAND)
|
||||||
|
weston_view_update_transform(surface->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user