Fix wxGLCanvasEGL::IsShownOnScreen() under Wayland

Don't use m_readyToDraw in it, as the canvas is still shown even when
it's not ready to draw yet, and use m_wlSubsurface instead as it is
destroyed when the window is unmapped.

Closes #23899.
This commit is contained in:
Vadim Zeitlin 2023-09-25 00:51:30 +02:00
parent 8654766fed
commit cf44a87ec6

View file

@ -745,7 +745,7 @@ bool wxGLCanvasEGL::IsShownOnScreen() const
case wxDisplayX11:
return GetXWindow() && wxGLCanvasBase::IsShownOnScreen();
case wxDisplayWayland:
return m_readyToDraw && wxGLCanvasBase::IsShownOnScreen();
return m_wlSubsurface && wxGLCanvasBase::IsShownOnScreen();
case wxDisplayNone:
break;
}