From f9c0d0e246edf07c25a4917bf201d61f49a53484 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 25 Jul 2013 11:17:00 -0500 Subject: Add lightweight daemon to synchronize keyboard indicators to current xkb state Start keyboard indicator sync daemon on tdm load This resolves Bug 427 --- tdm/kfrontend/kgapp.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tdm') diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 6cfd230eb..bf71e433f 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -71,6 +71,7 @@ bool argb_visual_available = false; bool has_twin = false; bool is_themed = false; bool trinity_desktop_lock_use_sak = TRUE; +bool trinity_desktop_synchronize_keyboard_lights = TRUE; TQPoint primaryScreenPosition; static int @@ -208,6 +209,7 @@ kg_main( const char *argv0 ) TDECrash::setSafer( true ); TDEProcess *tsak = 0; + TDEProcess *kbdl = 0; TDEProcess *proc = 0; TDEProcess *comp = 0; TDEProcess *dcop = 0; @@ -238,6 +240,12 @@ kg_main( const char *argv0 ) delete tsak; } + if (trinity_desktop_synchronize_keyboard_lights) { + kbdl = new TDEProcess; + *kbdl << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + "tdekbdledsync"; + kbdl->start(); + } + XSetErrorHandler( ignoreXError ); argb_visual_available = false; char *display = 0; @@ -500,6 +508,10 @@ kg_main( const char *argv0 ) KGVerify::done(); + if (kbdl) { + kbdl->closeStdin(); + kbdl->detach(); + } if (comp) { if (comp->isRunning()) { if (_compositor == "kompmgr") { -- cgit v1.2.1