aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-04 02:30:14 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-04 02:30:14 +0100
commitf4dc07729938b53f94cc7410b2f1c6f5741636fb (patch)
tree0f42065d83a993f825a475015932ecdd497d8304 /src/main.cpp
parent36c7bbfda38d93c01b05d453276295ead289ea0e (diff)
pidof ignore self
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1c16e6f..3cccde2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -231,7 +231,7 @@ int main(int argc, char **argv) {
// that uses pid sandboxing. Replace this with a better method once we no longer rely on linux global hotkeys on some platform.
// TODO: This method doesn't work when disabling hotkeys and the method below with pidof gsr-ui doesn't work in flatpak.
// What do? creating a pid file doesn't work in flatpak either.
- if(is_gsr_ui_virtual_keyboard_running() || gsr::pidof("gsr-ui") != -1) {
+ if(is_gsr_ui_virtual_keyboard_running() || gsr::pidof("gsr-ui", getpid()) != -1) {
gsr::Rpc rpc;
if(rpc.open("gsr-ui") && rpc.write("show_ui\n", 8)) {
fprintf(stderr, "Error: another instance of gsr-ui is already running, opening that one instead\n");