disconnect from display on finish

This commit is contained in:
vaxerski 2023-02-03 10:47:49 +00:00
parent 7ae1d1dabd
commit bec451ee84

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);
}