File ckb-next-use-run.patch of Package ckb-next

Index: ckb-next-0.4.4/ckb-next-dev-detect
===================================================================
--- ckb-next-0.4.4.orig/ckb-next-dev-detect
+++ ckb-next-0.4.4/ckb-next-dev-detect
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
 
 # Newline
 N=$'\n'
@@ -67,7 +67,7 @@ else
             OUT="${OUT}${N}${N}Daemon on current boot:${N}`journalctl -o short-precise -b 0 --unit=ckb-next-daemon 2>&1`"
             OUT="${OUT}${N}${N}Daemon on last boot:${N}`journalctl -o short-precise -b -1 --unit=ckb-next-daemon 2>&1`"
         fi
-        OUT="${OUT}${N}${N}Dev nodes:${N}`find /dev/input/ckb* -print -type f -exec cat {} \; 2>&1`"
+        OUT="${OUT}${N}${N}Dev nodes:${N}`find /run/ckb* -print -type f -exec cat {} \; 2>&1`"
         OUT="${OUT}${N}${N}Environment:${N}`printenv | grep "QT\|XDG.*DESKTOP\|DISPLAY" 2>&1`"
         OUT="${OUT}${N}${N}Kernel command line:${N}`cat /proc/cmdline`"
         GUIPATH="$(which ckb-next)"
Index: ckb-next-0.4.4/src/daemon/devnode.c
===================================================================
--- ckb-next-0.4.4.orig/src/daemon/devnode.c
+++ ckb-next-0.4.4/src/daemon/devnode.c
@@ -7,12 +7,7 @@
 #include "profile.h"
 #include <ckbnextconfig.h>
 
-// OSX doesn't like putting FIFOs in /dev for some reason
-#ifndef OS_MAC
-const char *const devpath = "/dev/input/ckb";
-#else
-const char *const devpath = "/var/run/ckb";
-#endif
+const char *const devpath = "/run/ckb";
 
 long gid = -1;
 #define S_GID_READ  (gid >= 0 ? S_CUSTOM_R : S_READ)
Index: ckb-next-0.4.4/src/gui/kbmanager.cpp
===================================================================
--- ckb-next-0.4.4.orig/src/gui/kbmanager.cpp
+++ ckb-next-0.4.4/src/gui/kbmanager.cpp
@@ -2,11 +2,7 @@
 #include "idletimer.h"
 #include <limits>
 
-#ifndef Q_OS_MACOS
-QString devpath = "/dev/input/ckb%1";
-#else
-QString devpath = "/var/run/ckb%1";
-#endif
+QString devpath = "/run/ckb%1";
 
 #ifdef DEBUG_IDLE_TIMER
 #define IDLE_TIMER_DURATION 5000
openSUSE Build Service is sponsored by