mirror of https://github.com/nirenjan/libx52.git
feat: Remove conditional HAVE_EVDEV from x52d
With the migration to VKM, there's no longer a need to have a dependency on evdev, instead, the daemon now depends on vkm, which in turn pulls in the correct platform dependency, which is evdev on Linux.virtual-keyboard-mouse
parent
04025f0ac0
commit
15c366e1c6
|
|
@ -26,19 +26,14 @@ x52d_sources = [
|
|||
'x52d_notify.c',
|
||||
'x52d_led.c',
|
||||
'x52d_command.c',
|
||||
'x52d_io.c',
|
||||
'x52d_mouse_evdev.c',
|
||||
]
|
||||
|
||||
dep_threads = dependency('threads')
|
||||
x52d_linkwith = [lib_libx52, lib_libx52dcomm, lib_vkm]
|
||||
x52d_linkwith = [lib_libx52, lib_libx52dcomm, lib_vkm, lib_libx52io]
|
||||
x52d_deps = [dep_pinelog, dep_inih, dep_threads, dep_intl]
|
||||
x52d_cflags = []
|
||||
if dep_evdev.found()
|
||||
x52d_sources += 'x52d_io.c'
|
||||
x52d_sources += 'x52d_mouse_evdev.c'
|
||||
x52d_cflags += '-DHAVE_EVDEV'
|
||||
x52d_linkwith += lib_libx52io
|
||||
x52d_deps += dep_evdev
|
||||
endif
|
||||
|
||||
exe_x52d = executable('x52d', x52d_sources,
|
||||
install: true,
|
||||
|
|
|
|||
|
|
@ -329,10 +329,8 @@ int main(int argc, char **argv)
|
|||
goto cleanup;
|
||||
}
|
||||
x52d_notify_init(notify_sock);
|
||||
#if defined(HAVE_EVDEV)
|
||||
x52d_io_init();
|
||||
x52d_mouse_evdev_init();
|
||||
#endif
|
||||
|
||||
// Re-enable signals
|
||||
rc = pthread_sigmask(SIG_UNBLOCK, &sigblockset, NULL);
|
||||
|
|
@ -371,10 +369,8 @@ cleanup:
|
|||
x52d_dev_exit();
|
||||
x52d_command_exit();
|
||||
x52d_notify_exit();
|
||||
#if defined(HAVE_EVDEV)
|
||||
x52d_mouse_evdev_exit();
|
||||
x52d_io_exit();
|
||||
#endif
|
||||
|
||||
// Remove the PID file
|
||||
PINELOG_TRACE("Removing PID file %s", pid_file);
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ void x52d_cfg_set_Mouse_Enabled(bool enabled)
|
|||
{
|
||||
PINELOG_DEBUG(_("Setting mouse enable to %s"),
|
||||
enabled ? _("on") : _("off"));
|
||||
#if defined HAVE_EVDEV
|
||||
x52d_mouse_evdev_thread_control(enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
void x52d_cfg_set_Mouse_Speed(int speed)
|
||||
|
|
|
|||
|
|
@ -19,22 +19,18 @@
|
|||
#include "x52d_const.h"
|
||||
#include "x52d_mouse.h"
|
||||
|
||||
#if defined HAVE_EVDEV
|
||||
/* Stub for evdev */
|
||||
void x52d_mouse_evdev_thread_control(bool enabled)
|
||||
{
|
||||
function_called();
|
||||
check_expected(enabled);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void test_mouse_thread_enabled(void **state)
|
||||
{
|
||||
(void)state;
|
||||
#if defined HAVE_EVDEV
|
||||
expect_function_calls(x52d_mouse_evdev_thread_control, 1);
|
||||
expect_value(x52d_mouse_evdev_thread_control, enabled, true);
|
||||
#endif
|
||||
|
||||
x52d_cfg_set_Mouse_Enabled(true);
|
||||
}
|
||||
|
|
@ -42,10 +38,8 @@ static void test_mouse_thread_enabled(void **state)
|
|||
static void test_mouse_thread_disabled(void **state)
|
||||
{
|
||||
(void)state;
|
||||
#if defined HAVE_EVDEV
|
||||
expect_function_calls(x52d_mouse_evdev_thread_control, 1);
|
||||
expect_value(x52d_mouse_evdev_thread_control, enabled, false);
|
||||
#endif
|
||||
|
||||
x52d_cfg_set_Mouse_Enabled(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: libx52 0.3.3\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
||||
"POT-Creation-Date: 2026-03-19 23:20-0700\n"
|
||||
"POT-Creation-Date: 2026-03-22 17:35-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
@ -143,12 +143,12 @@ msgid "Unknown LED state %d"
|
|||
msgstr ""
|
||||
|
||||
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
||||
#: daemon/x52d_mouse.c:68
|
||||
#: daemon/x52d_mouse.c:66
|
||||
msgid "off"
|
||||
msgstr ""
|
||||
|
||||
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
||||
#: daemon/x52d_mouse.c:68
|
||||
#: daemon/x52d_mouse.c:66
|
||||
msgid "on"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -576,25 +576,25 @@ msgstr ""
|
|||
msgid "Error %d blocking signals on child threads: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:340
|
||||
#: daemon/x52d_main.c:338
|
||||
#, c-format
|
||||
msgid "Error %d unblocking signals on child threads: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:353
|
||||
#: daemon/x52d_main.c:351
|
||||
msgid "Reloading X52 configuration"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:360
|
||||
#: daemon/x52d_main.c:358
|
||||
msgid "Saving X52 configuration to disk"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:366
|
||||
#: daemon/x52d_main.c:364
|
||||
#, c-format
|
||||
msgid "Received termination signal %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:383
|
||||
#: daemon/x52d_main.c:379
|
||||
msgid "Shutting down X52 daemon"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -841,17 +841,17 @@ msgstr ""
|
|||
msgid "Setting mouse enable to %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_mouse.c:47
|
||||
#: daemon/x52d_mouse.c:45
|
||||
#, c-format
|
||||
msgid "Ignoring mouse speed %d outside supported range (0-%d)"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_mouse.c:59
|
||||
#: daemon/x52d_mouse.c:57
|
||||
#, c-format
|
||||
msgid "Setting mouse speed to %d (delay %d ms, multiplier %f)"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_mouse.c:67
|
||||
#: daemon/x52d_mouse.c:65
|
||||
#, c-format
|
||||
msgid "Setting mouse reverse scroll to %s"
|
||||
msgstr ""
|
||||
|
|
|
|||
22
po/xx_PL.po
22
po/xx_PL.po
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: libx52 0.2.3\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
||||
"POT-Creation-Date: 2026-03-19 23:20-0700\n"
|
||||
"POT-Creation-Date: 2026-03-22 17:35-0700\n"
|
||||
"PO-Revision-Date: 2026-03-19 23:21-0700\n"
|
||||
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
|
||||
"Language-Team: Dummy Language for testing i18n\n"
|
||||
|
|
@ -143,12 +143,12 @@ msgid "Unknown LED state %d"
|
|||
msgstr "Unknownay EDLay atestay %d"
|
||||
|
||||
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
||||
#: daemon/x52d_mouse.c:68
|
||||
#: daemon/x52d_mouse.c:66
|
||||
msgid "off"
|
||||
msgstr "offay"
|
||||
|
||||
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
||||
#: daemon/x52d_mouse.c:68
|
||||
#: daemon/x52d_mouse.c:66
|
||||
msgid "on"
|
||||
msgstr "onay"
|
||||
|
||||
|
|
@ -625,25 +625,25 @@ msgstr "Otifynay ocketsay = %s"
|
|||
msgid "Error %d blocking signals on child threads: %s"
|
||||
msgstr "Erroray %d ockingblay ignalssay onay ildchay eadsthray: %s"
|
||||
|
||||
#: daemon/x52d_main.c:340
|
||||
#: daemon/x52d_main.c:338
|
||||
#, c-format
|
||||
msgid "Error %d unblocking signals on child threads: %s"
|
||||
msgstr "Erroray %d unblockingay ignalssay onay ildchay eadsthray: %s"
|
||||
|
||||
#: daemon/x52d_main.c:353
|
||||
#: daemon/x52d_main.c:351
|
||||
msgid "Reloading X52 configuration"
|
||||
msgstr "Eloadingray X52 onfigurationcay"
|
||||
|
||||
#: daemon/x52d_main.c:360
|
||||
#: daemon/x52d_main.c:358
|
||||
msgid "Saving X52 configuration to disk"
|
||||
msgstr "Avingsay X52 onfigurationcay otay iskday"
|
||||
|
||||
#: daemon/x52d_main.c:366
|
||||
#: daemon/x52d_main.c:364
|
||||
#, c-format
|
||||
msgid "Received termination signal %s"
|
||||
msgstr "Eceivedray erminationtay ignalsay %s"
|
||||
|
||||
#: daemon/x52d_main.c:383
|
||||
#: daemon/x52d_main.c:379
|
||||
msgid "Shutting down X52 daemon"
|
||||
msgstr "Uttingshay ownday X52 aemonday"
|
||||
|
||||
|
|
@ -894,17 +894,17 @@ msgstr "Uttingshay ownday X52 I/O iverdray eadthray"
|
|||
msgid "Setting mouse enable to %s"
|
||||
msgstr "Ettingsay ousemay enableay otay %s"
|
||||
|
||||
#: daemon/x52d_mouse.c:47
|
||||
#: daemon/x52d_mouse.c:45
|
||||
#, c-format
|
||||
msgid "Ignoring mouse speed %d outside supported range (0-%d)"
|
||||
msgstr "Ignoringay ousemay eedspay %d outsideay upportedsay angeray (0-%d)"
|
||||
|
||||
#: daemon/x52d_mouse.c:59
|
||||
#: daemon/x52d_mouse.c:57
|
||||
#, c-format
|
||||
msgid "Setting mouse speed to %d (delay %d ms, multiplier %f)"
|
||||
msgstr "Ettingsay ousemay eedspay otay %d (elayday %d ms, ultipliermay %f)"
|
||||
|
||||
#: daemon/x52d_mouse.c:67
|
||||
#: daemon/x52d_mouse.c:65
|
||||
#, c-format
|
||||
msgid "Setting mouse reverse scroll to %s"
|
||||
msgstr "Ettingsay ousemay everseray ollscray otay %s"
|
||||
|
|
|
|||
Loading…
Reference in New Issue