|
|
@ -508,7 +508,7 @@ rail_win_popdown(void)
|
|
|
|
window_attributes.map_state == IsViewable &&
|
|
|
|
window_attributes.map_state == IsViewable &&
|
|
|
|
list_index_of(g_window_list, children[i]) >= 0)
|
|
|
|
list_index_of(g_window_list, children[i]) >= 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LOG(10, (" dismiss pop up 0x%8.8x", children[i]));
|
|
|
|
LOG(10, (" dismiss pop up 0x%8.8lx", children[i]));
|
|
|
|
rail_send_key_esc(children[i]);
|
|
|
|
rail_send_key_esc(children[i]);
|
|
|
|
rv = 1;
|
|
|
|
rv = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -756,7 +756,7 @@ rail_win_set_state(Window win, unsigned long state)
|
|
|
|
int old_state;
|
|
|
|
int old_state;
|
|
|
|
unsigned long data[2] = { state, None };
|
|
|
|
unsigned long data[2] = { state, None };
|
|
|
|
|
|
|
|
|
|
|
|
LOG(10, (" rail_win_set_state: %d", state));
|
|
|
|
LOG(10, (" rail_win_set_state: %ld", state));
|
|
|
|
/* check whether WM_STATE exists */
|
|
|
|
/* check whether WM_STATE exists */
|
|
|
|
old_state = rail_win_get_state(win);
|
|
|
|
old_state = rail_win_get_state(win);
|
|
|
|
if (old_state == -1)
|
|
|
|
if (old_state == -1)
|
|
|
@ -1259,7 +1259,7 @@ rail_win_send_text(Window win)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (data && len > 0)
|
|
|
|
if (data && len > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LOG(10, ("chansrv::rail_win_send_text: 0x%8.8x text %s length %d",
|
|
|
|
LOG(10, ("chansrv::rail_win_send_text: 0x%8.8lx text %s length %d",
|
|
|
|
win, data, len));
|
|
|
|
win, data, len));
|
|
|
|
make_stream(s);
|
|
|
|
make_stream(s);
|
|
|
|
init_stream(s, len + 1024);
|
|
|
|
init_stream(s, len + 1024);
|
|
|
@ -1289,7 +1289,7 @@ rail_destroy_window(Window window_id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct stream *s;
|
|
|
|
struct stream *s;
|
|
|
|
|
|
|
|
|
|
|
|
LOG(10, ("chansrv::rail_destroy_window 0x%8.8x", window_id));
|
|
|
|
LOG(10, ("chansrv::rail_destroy_window 0x%8.8lx", window_id));
|
|
|
|
make_stream(s);
|
|
|
|
make_stream(s);
|
|
|
|
init_stream(s, 1024);
|
|
|
|
init_stream(s, 1024);
|
|
|
|
|
|
|
|
|
|
|
@ -1309,7 +1309,7 @@ rail_show_window(Window window_id, int show_state)
|
|
|
|
int flags;
|
|
|
|
int flags;
|
|
|
|
struct stream* s;
|
|
|
|
struct stream* s;
|
|
|
|
|
|
|
|
|
|
|
|
LOG(10, ("chansrv::rail_show_window 0x%8.8x 0x%x", window_id, show_state));
|
|
|
|
LOG(10, ("chansrv::rail_show_window 0x%8.8lx 0x%x", window_id, show_state));
|
|
|
|
make_stream(s);
|
|
|
|
make_stream(s);
|
|
|
|
init_stream(s, 1024);
|
|
|
|
init_stream(s, 1024);
|
|
|
|
|
|
|
|
|
|
|
@ -1351,7 +1351,7 @@ rail_create_window(Window window_id, Window owner_id)
|
|
|
|
struct rail_window_data* rwd;
|
|
|
|
struct rail_window_data* rwd;
|
|
|
|
struct stream* s;
|
|
|
|
struct stream* s;
|
|
|
|
|
|
|
|
|
|
|
|
LOG(10, ("chansrv::rail_create_window 0x%8.8x", window_id));
|
|
|
|
LOG(10, ("chansrv::rail_create_window 0x%8.8lx", window_id));
|
|
|
|
|
|
|
|
|
|
|
|
rwd = rail_get_window_data_safe(window_id);
|
|
|
|
rwd = rail_get_window_data_safe(window_id);
|
|
|
|
if (rwd == 0)
|
|
|
|
if (rwd == 0)
|
|
|
@ -1507,7 +1507,7 @@ rail_configure_request_window(XConfigureRequestEvent* config)
|
|
|
|
if (mask & CWStackMode)
|
|
|
|
if (mask & CWStackMode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LOG(10, ("chansrv::rail_configure_request_window: CWStackMode "
|
|
|
|
LOG(10, ("chansrv::rail_configure_request_window: CWStackMode "
|
|
|
|
"detail 0x%8.8x above 0x%8.8x", config->detail, config->above));
|
|
|
|
"detail 0x%8.8x above 0x%8.8lx", config->detail, config->above));
|
|
|
|
if (config->detail == Above)
|
|
|
|
if (config->detail == Above)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LOG(10, ("chansrv::rail_configure_request_window: bring to front "
|
|
|
|
LOG(10, ("chansrv::rail_configure_request_window: bring to front "
|
|
|
@ -1808,7 +1808,7 @@ rail_xevent(void *xevent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case PropertyNotify:
|
|
|
|
case PropertyNotify:
|
|
|
|
prop_name = XGetAtomName(g_display, lxevent->xproperty.atom);
|
|
|
|
prop_name = XGetAtomName(g_display, lxevent->xproperty.atom);
|
|
|
|
LOG(10, (" got PropertyNotify window_id 0x%8.8x %s state new %d",
|
|
|
|
LOG(10, (" got PropertyNotify window_id 0x%8.8lx %s state new %d",
|
|
|
|
lxevent->xproperty.window, prop_name,
|
|
|
|
lxevent->xproperty.window, prop_name,
|
|
|
|
lxevent->xproperty.state == PropertyNewValue));
|
|
|
|
lxevent->xproperty.state == PropertyNewValue));
|
|
|
|
|
|
|
|
|
|
|
@ -1831,7 +1831,7 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case ConfigureRequest:
|
|
|
|
case ConfigureRequest:
|
|
|
|
LOG(10, (" got ConfigureRequest window_id 0x%8.8x", lxevent->xconfigurerequest.window));
|
|
|
|
LOG(10, (" got ConfigureRequest window_id 0x%8.8lx", lxevent->xconfigurerequest.window));
|
|
|
|
g_memset(&xwc, 0, sizeof(xwc));
|
|
|
|
g_memset(&xwc, 0, sizeof(xwc));
|
|
|
|
xwc.x = lxevent->xconfigurerequest.x;
|
|
|
|
xwc.x = lxevent->xconfigurerequest.x;
|
|
|
|
xwc.y = lxevent->xconfigurerequest.y;
|
|
|
|
xwc.y = lxevent->xconfigurerequest.y;
|
|
|
@ -1849,13 +1849,13 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case CreateNotify:
|
|
|
|
case CreateNotify:
|
|
|
|
LOG(10, (" got CreateNotify window 0x%8.8x parent 0x%8.8x",
|
|
|
|
LOG(10, (" got CreateNotify window 0x%8.8lx parent 0x%8.8lx",
|
|
|
|
lxevent->xcreatewindow.window, lxevent->xcreatewindow.parent));
|
|
|
|
lxevent->xcreatewindow.window, lxevent->xcreatewindow.parent));
|
|
|
|
rail_select_input(lxevent->xcreatewindow.window);
|
|
|
|
rail_select_input(lxevent->xcreatewindow.window);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case DestroyNotify:
|
|
|
|
case DestroyNotify:
|
|
|
|
LOG(10, (" got DestroyNotify window 0x%8.8x event 0x%8.8x",
|
|
|
|
LOG(10, (" got DestroyNotify window 0x%8.8lx event 0x%8.8lx",
|
|
|
|
lxevent->xdestroywindow.window, lxevent->xdestroywindow.event));
|
|
|
|
lxevent->xdestroywindow.window, lxevent->xdestroywindow.event));
|
|
|
|
if (lxevent->xdestroywindow.window != lxevent->xdestroywindow.event)
|
|
|
|
if (lxevent->xdestroywindow.window != lxevent->xdestroywindow.event)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1871,12 +1871,12 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case MapRequest:
|
|
|
|
case MapRequest:
|
|
|
|
LOG(10, (" got MapRequest window 0x%8.8x", lxevent->xmaprequest.window));
|
|
|
|
LOG(10, (" got MapRequest window 0x%8.8lx", lxevent->xmaprequest.window));
|
|
|
|
XMapWindow(g_display, lxevent->xmaprequest.window);
|
|
|
|
XMapWindow(g_display, lxevent->xmaprequest.window);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case MapNotify:
|
|
|
|
case MapNotify:
|
|
|
|
LOG(10, (" got MapNotify window 0x%8.8x event 0x%8.8x",
|
|
|
|
LOG(10, (" got MapNotify window 0x%8.8lx event 0x%8.8lx",
|
|
|
|
lxevent->xmap.window, lxevent->xmap.event));
|
|
|
|
lxevent->xmap.window, lxevent->xmap.event));
|
|
|
|
if (lxevent->xmap.window != lxevent->xmap.event)
|
|
|
|
if (lxevent->xmap.window != lxevent->xmap.event)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1902,7 +1902,7 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case UnmapNotify:
|
|
|
|
case UnmapNotify:
|
|
|
|
LOG(10, (" got UnmapNotify 0x%8.8x", lxevent->xunmap.event));
|
|
|
|
LOG(10, (" got UnmapNotify 0x%8.8lx", lxevent->xunmap.event));
|
|
|
|
if (lxevent->xunmap.window != lxevent->xunmap.event)
|
|
|
|
if (lxevent->xunmap.window != lxevent->xunmap.event)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -1910,7 +1910,7 @@ rail_xevent(void *xevent)
|
|
|
|
if (is_window_valid_child_of_root(lxevent->xunmap.window))
|
|
|
|
if (is_window_valid_child_of_root(lxevent->xunmap.window))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
index = list_index_of(g_window_list, lxevent->xunmap.window);
|
|
|
|
index = list_index_of(g_window_list, lxevent->xunmap.window);
|
|
|
|
LOG(10, (" window 0x%8.8x is unmapped", lxevent->xunmap.window));
|
|
|
|
LOG(10, (" window 0x%8.8lx is unmapped", lxevent->xunmap.window));
|
|
|
|
if (index >= 0)
|
|
|
|
if (index >= 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
XGetWindowAttributes(g_display, lxevent->xunmap.window, &wnd_attributes);
|
|
|
|
XGetWindowAttributes(g_display, lxevent->xunmap.window, &wnd_attributes);
|
|
|
@ -1929,7 +1929,7 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case ConfigureNotify:
|
|
|
|
case ConfigureNotify:
|
|
|
|
LOG(10, (" got ConfigureNotify 0x%8.8x event 0x%8.8x", lxevent->xconfigure.window,
|
|
|
|
LOG(10, (" got ConfigureNotify 0x%8.8lx event 0x%8.8lx", lxevent->xconfigure.window,
|
|
|
|
lxevent->xconfigure.event));
|
|
|
|
lxevent->xconfigure.event));
|
|
|
|
rv = 0;
|
|
|
|
rv = 0;
|
|
|
|
if (lxevent->xconfigure.event != lxevent->xconfigure.window ||
|
|
|
|
if (lxevent->xconfigure.event != lxevent->xconfigure.window ||
|
|
|
@ -1975,8 +1975,8 @@ rail_xevent(void *xevent)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case ReparentNotify:
|
|
|
|
case ReparentNotify:
|
|
|
|
LOG(10, (" got ReparentNotify window 0x%8.8x parent 0x%8.8x "
|
|
|
|
LOG(10, (" got ReparentNotify window 0x%8.8lx parent 0x%8.8lx "
|
|
|
|
"event 0x%8.8x x %d y %d override redirect %d",
|
|
|
|
"event 0x%8.8lx x %d y %d override redirect %d",
|
|
|
|
lxevent->xreparent.window, lxevent->xreparent.parent,
|
|
|
|
lxevent->xreparent.window, lxevent->xreparent.parent,
|
|
|
|
lxevent->xreparent.event, lxevent->xreparent.x,
|
|
|
|
lxevent->xreparent.event, lxevent->xreparent.x,
|
|
|
|
lxevent->xreparent.y, lxevent->xreparent.override_redirect));
|
|
|
|
lxevent->xreparent.y, lxevent->xreparent.override_redirect));
|
|
|
|