OSDN Git Service

kwin: use exact number of atoms as array size in Atoms::Atoms()
authorIvailo Monev <xakepa10@gmail.com>
Sun, 18 Jul 2021 12:55:57 +0000 (15:55 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 18 Jul 2021 12:56:13 +0000 (15:56 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kwin/atoms.cpp
kwin/client.cpp

index f111e46..8fe3d5d 100644 (file)
@@ -29,7 +29,7 @@ namespace KWin
 Atoms::Atoms()
 {
 
-    const int max = 50;
+    const int max = 32;
     Atom* atoms[max];
     char* names[max];
     Atom atoms_return[max];
index 7757d30..392597b 100644 (file)
@@ -1344,8 +1344,9 @@ void Client::killProcess(bool ask, xcb_timestamp_t timestamp)
             QStringList lst;
             lst << clientMachine()->hostName() << "kill" << QString::number(pid);
             QProcess::startDetached("xon", lst);
-        } else
+        } else {
             ::kill(pid, SIGTERM);
+        }
     } else {
         QString hostname = clientMachine()->isLocal() ? "localhost" : clientMachine()->hostName();
         QProcess::startDetached(KStandardDirs::findExe("kwin_killer_helper"),