mirror of
https://github.com/hyprwm/hyprpicker.git
synced 2026-05-07 04:28:00 +02:00
internal: clean up files on SIGTERM (#155)
This commit is contained in:
parent
847edaeaea
commit
69474aa494
2 changed files with 3 additions and 8 deletions
|
|
@ -13,8 +13,7 @@
|
|||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
static void sigHandler(int sig) {
|
||||
g_pHyprpicker->m_vLayerSurfaces.clear();
|
||||
exit(0);
|
||||
g_pHyprpicker->m_bRunning.store(false);
|
||||
}
|
||||
|
||||
void CHyprpicker::init() {
|
||||
|
|
@ -123,11 +122,7 @@ void CHyprpicker::init() {
|
|||
while (m_bRunning && wl_display_dispatch(m_pWLDisplay) != -1) {
|
||||
//renderSurface(m_pLastSurface);
|
||||
}
|
||||
|
||||
if (m_pWLDisplay) {
|
||||
wl_display_disconnect(m_pWLDisplay);
|
||||
m_pWLDisplay = nullptr;
|
||||
}
|
||||
finish(1);
|
||||
}
|
||||
|
||||
void CHyprpicker::finish(int code) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class CHyprpicker {
|
|||
bool m_bUseLowerCase = false;
|
||||
bool m_bIncludeCursor = false;
|
||||
|
||||
bool m_bRunning = true;
|
||||
volatile std::atomic<bool> m_bRunning = true;
|
||||
float m_fZoomScale = 10.0;
|
||||
int m_iCircleRadius = 100;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue