bringup RAIL only when we receive a RAIL command
This commit is contained in:
parent
ec4791ac40
commit
b205654e78
@ -547,7 +547,7 @@ process_message_channel_setup(struct stream *s)
|
||||
g_rdpdr_chan_id = ci->id;
|
||||
}
|
||||
/* disabled for now */
|
||||
else if (g_strcasecmp(ci->name, "notrail") == 0)
|
||||
else if (g_strcasecmp(ci->name, "rail") == 0)
|
||||
{
|
||||
g_rail_index = g_num_chan_items;
|
||||
g_rail_chan_id = ci->id;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user