|
|
|
@ -330,20 +330,43 @@ rail_is_another_wm_running(void)
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
int APP_CC
|
|
|
|
|
rail_init(void)
|
|
|
|
|
{
|
|
|
|
|
LOG(10, ("chansrv::rail_init:"));
|
|
|
|
|
xcommon_init();
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
int APP_CC
|
|
|
|
|
rail_deinit(void)
|
|
|
|
|
{
|
|
|
|
|
if (g_rail_up)
|
|
|
|
|
{
|
|
|
|
|
list_delete(g_window_list);
|
|
|
|
|
g_window_list = 0;
|
|
|
|
|
/* no longer window manager */
|
|
|
|
|
XSelectInput(g_display, g_root_window, 0);
|
|
|
|
|
g_rail_up = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int APP_CC
|
|
|
|
|
rail_startup()
|
|
|
|
|
{
|
|
|
|
|
int dummy;
|
|
|
|
|
int ver_maj;
|
|
|
|
|
int ver_min;
|
|
|
|
|
Status st;
|
|
|
|
|
|
|
|
|
|
LOG(10, ("chansrv::rail_init:"));
|
|
|
|
|
xcommon_init();
|
|
|
|
|
|
|
|
|
|
if (rail_is_another_wm_running())
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_ERROR, "rail_init: another window manager "
|
|
|
|
|
"is running");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list_delete(g_window_list);
|
|
|
|
|
g_window_list = list_create();
|
|
|
|
|
rail_send_init();
|
|
|
|
@ -372,21 +395,6 @@ rail_init(void)
|
|
|
|
|
g_default_cursor = XCreateFontCursor(g_display, XC_left_ptr);
|
|
|
|
|
XDefineCursor(g_display, g_root_window, g_default_cursor);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
int APP_CC
|
|
|
|
|
rail_deinit(void)
|
|
|
|
|
{
|
|
|
|
|
if (g_rail_up)
|
|
|
|
|
{
|
|
|
|
|
list_delete(g_window_list);
|
|
|
|
|
g_window_list = 0;
|
|
|
|
|
/* no longer window manager */
|
|
|
|
|
XSelectInput(g_display, g_root_window, 0);
|
|
|
|
|
g_rail_up = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -454,6 +462,8 @@ rail_process_exec(struct stream *s, int size)
|
|
|
|
|
|
|
|
|
|
if (g_strlen(ExeOrFile) > 0)
|
|
|
|
|
{
|
|
|
|
|
rail_startup();
|
|
|
|
|
|
|
|
|
|
LOG(10, ("rail_process_exec: pre"));
|
|
|
|
|
/* ask main thread to fork */
|
|
|
|
|
tc_mutex_lock(g_exec_mutex);
|
|
|
|
|