Kodi Community Forum
Kodi minimize on Exec / ExecWait execution - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Kodi minimize on Exec / ExecWait execution (/showthread.php?tid=365911)



Kodi minimize on Exec / ExecWait execution - wastis - 2021-12-10

Hi developers,

first, thank you very much for your ongoing development of Kodi.

The following is not really a bug as it is designed that way, however when calling Exec in the keyboard.xml, Kodi minimizes. Reason is, I guess, the TMSG_MINIMIZE message in the code.

Would it be possible to enhance Kodi by a function, that executes the shell without minimizing?

With Kodi 19 on linux, the initiation of the python interpreter became so slow, that it cannot follow anymore the key press messages on some systems. This can cause the Kodi system to become unresponsive as it is busy to start python sessions.

A workaround in some use cases could be to launch shell scripts instead, that is really fast compared to launch python scripts.

xbmc/input/interfaces/builtins
Code:
  template<int Wait=0>
static int Exec(const std::vector<std::string>& params)
{
  CApplicationMessenger::GetInstance().PostMsg(TMSG_MINIMIZE);
  CApplicationMessenger::GetInstance().PostMsg(TMSG_EXECUTE_OS, Wait, -1, nullptr, params[0]);

  return 0;
}