mirror of
https://github.com/hyprwm/hyprpicker.git
synced 2024-11-17 00:25:57 +01:00
Hyprpicker stopped working after running several times when started with option '-a'. The reason was that finish() has not been called after wl-copy replaced the currently running process due to the call of execlp() (execlp() never returns in that case). To fix this issue finish now is called before the call of execlp() when hyprpicker is running with option '-a' Co-authored-by: Stefan Römer <sroemer@github.com>
This commit is contained in:
parent
f6c24d90e3
commit
aa3c2acd59
1 changed files with 6 additions and 1 deletions
|
@ -160,6 +160,7 @@ void Events::handlePointerButton(void *data, struct wl_pointer *wl_pointer, uint
|
||||||
Debug::log(NONE, "%g%% %g%% %g%% %g%%", c, m, y, k);
|
Debug::log(NONE, "%g%% %g%% %g%% %g%%", c, m, y, k);
|
||||||
|
|
||||||
if (g_pHyprpicker->m_bAutoCopy)
|
if (g_pHyprpicker->m_bAutoCopy)
|
||||||
|
g_pHyprpicker->finish();
|
||||||
Clipboard::copy("%g%% %g%% %g%% %g%%", c, m, y, k);
|
Clipboard::copy("%g%% %g%% %g%% %g%%", c, m, y, k);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -182,6 +183,7 @@ void Events::handlePointerButton(void *data, struct wl_pointer *wl_pointer, uint
|
||||||
Debug::log(NONE, "#%s%s%s", toHex(COL.r).c_str(), toHex(COL.g).c_str(), toHex(COL.b).c_str());
|
Debug::log(NONE, "#%s%s%s", toHex(COL.r).c_str(), toHex(COL.g).c_str(), toHex(COL.b).c_str());
|
||||||
|
|
||||||
if (g_pHyprpicker->m_bAutoCopy)
|
if (g_pHyprpicker->m_bAutoCopy)
|
||||||
|
g_pHyprpicker->finish();
|
||||||
Clipboard::copy("#%s%s%s", toHex(COL.r).c_str(), toHex(COL.g).c_str(), toHex(COL.b).c_str());
|
Clipboard::copy("#%s%s%s", toHex(COL.r).c_str(), toHex(COL.g).c_str(), toHex(COL.b).c_str());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -193,6 +195,7 @@ void Events::handlePointerButton(void *data, struct wl_pointer *wl_pointer, uint
|
||||||
Debug::log(NONE, "%i %i %i", COL.r, COL.g, COL.b);
|
Debug::log(NONE, "%i %i %i", COL.r, COL.g, COL.b);
|
||||||
|
|
||||||
if (g_pHyprpicker->m_bAutoCopy)
|
if (g_pHyprpicker->m_bAutoCopy)
|
||||||
|
g_pHyprpicker->finish();
|
||||||
Clipboard::copy("%i %i %i", COL.r, COL.g, COL.b);
|
Clipboard::copy("%i %i %i", COL.r, COL.g, COL.b);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -243,12 +246,14 @@ void Events::handlePointerButton(void *data, struct wl_pointer *wl_pointer, uint
|
||||||
Debug::log(NONE, "%g %g%% %g%%", h, s, l_or_v);
|
Debug::log(NONE, "%g %g%% %g%%", h, s, l_or_v);
|
||||||
|
|
||||||
if (g_pHyprpicker->m_bAutoCopy)
|
if (g_pHyprpicker->m_bAutoCopy)
|
||||||
|
g_pHyprpicker->finish();
|
||||||
Clipboard::copy("%g %g%% %g%%", h, s, l_or_v);
|
Clipboard::copy("%g %g%% %g%%", h, s, l_or_v);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pHyprpicker->finish();
|
if (!g_pHyprpicker->m_bAutoCopy)
|
||||||
|
g_pHyprpicker->finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::handleFrameDone(void *data, struct wl_callback *callback, uint32_t time) {
|
void Events::handleFrameDone(void *data, struct wl_callback *callback, uint32_t time) {
|
||||||
|
|
Loading…
Reference in a new issue