Merge branch 'present-bump-version-to-1.3' into 'master'

present: Check PresentOptionAsyncMayTear against capabilities

See merge request xorg/xserver!1183
This commit is contained in:
Olivier Fourdan 2025-12-06 19:03:43 +01:00
commit 6a726e4a37

View file

@ -246,6 +246,15 @@ present_pixmap(WindowPtr window,
{
ScreenPtr screen = window->drawable.pScreen;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
uint32_t capabilities;
/* Make sure the option PresentOptionAsyncMayTear, if passed by the client,
* is actually supported.
*/
capabilities = screen_priv->query_capabilities(screen_priv);
if ((options & PresentOptionAsyncMayTear) &&
!(capabilities & PresentCapabilityAsyncMayTear))
return BadValue;
return screen_priv->present_pixmap(window,
pixmap,