mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
Add workaround for wayland session
This commit is contained in:
parent
5c0bf14554
commit
4953e79588
1 changed files with 17 additions and 1 deletions
|
@ -76,12 +76,28 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon,
|
||||||
setSurfaceType(QSurface::VulkanSurface);
|
setSurfaceType(QSurface::VulkanSurface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// NOTE: You cannot safely create a wayland window that has hidden initial status and perform any changes on the window while it is still hidden.
|
||||||
|
// Doing this will create a surface with deferred commands that require a buffer. When binding to your session, this may assert in your compositor due to protocol restrictions.
|
||||||
|
Visibility startup_visibility = Hidden;
|
||||||
|
#ifndef _WIN32
|
||||||
|
if (const char* session_type = ::getenv("XDG_SESSION_TYPE"))
|
||||||
|
{
|
||||||
|
if (!strcasecmp(session_type, "wayland"))
|
||||||
|
{
|
||||||
|
// Start windowed. This is a featureless rectangle on-screen with no window decorations.
|
||||||
|
// It does not even resemble a window until the WM attaches later on.
|
||||||
|
// Fullscreen could technically work with some fiddling, but easily breaks depending on geometry input.
|
||||||
|
startup_visibility = Windowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
setMinimumWidth(160);
|
setMinimumWidth(160);
|
||||||
setMinimumHeight(90);
|
setMinimumHeight(90);
|
||||||
setScreen(screen);
|
setScreen(screen);
|
||||||
setGeometry(geometry);
|
setGeometry(geometry);
|
||||||
setTitle(qstr(m_window_title));
|
setTitle(qstr(m_window_title));
|
||||||
setVisibility(Hidden);
|
setVisibility(startup_visibility);
|
||||||
create();
|
create();
|
||||||
|
|
||||||
// Change cursor when in fullscreen.
|
// Change cursor when in fullscreen.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue