disconnect from display on finish

This commit is contained in:
vaxerski 2023-02-03 10:47:49 +00:00
parent 7ae1d1dabd
commit bec451ee84
1 changed files with 9 additions and 2 deletions

View File

@ -35,8 +35,10 @@ void CHyprpicker::init() {
//renderSurface(m_pLastSurface);
}
if (m_pWLDisplay) {
wl_display_disconnect(m_pWLDisplay);
m_pWLDisplay = nullptr;
}
}
void CHyprpicker::finish(int code) {
@ -46,6 +48,11 @@ void CHyprpicker::finish(int code) {
destroyBuffer(&ls->screenBuffer);
}
if (m_pWLDisplay) {
wl_display_disconnect(m_pWLDisplay);
m_pWLDisplay = nullptr;
}
exit(code);
}