Skip to content

Commit

Permalink
wayland_backend: Update some libdecor usage
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Mar 10, 2024
1 parent 544e232 commit ee0143a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/wayland_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,16 +562,8 @@ namespace gamescope
if ( !pParent )
{
m_pFrame = libdecor_decorate( m_pBackend->GetLibDecor(), m_pSurface, &s_LibDecorFrameInterface, this );

// We have to commit some libdecor state before calling libdecor_frame_set_visibility or it crashes.
// Oh great there's two bugs in this already.
CommitLibDecor( nullptr );

libdecor_frame_set_title( m_pFrame, "Gamescope" );
libdecor_frame_set_app_id( m_pFrame, "gamescope" );
// !!! Health Warning: This below call doesn't work on Plasma for borderless, and just makes the window not show up....
// Why? I don't know. Doesn't work in the demo app either. /shrug
libdecor_frame_set_visibility( m_pFrame, !g_bBorderlessOutputWindow );
libdecor_frame_map( m_pFrame );
}
else
Expand All @@ -584,6 +576,9 @@ namespace gamescope
wl_surface_commit( m_pSurface );
wl_display_roundtrip( m_pBackend->GetDisplay() );

if ( m_pFrame )
libdecor_frame_set_visibility( m_pFrame, !g_bBorderlessOutputWindow );

return true;
}

Expand Down

0 comments on commit ee0143a

Please sign in to comment.