2028 |
/* the window manager told us to quit */ |
/* the window manager told us to quit */ |
2029 |
if ((xevent.xclient.message_type == g_protocol_atom) |
if ((xevent.xclient.message_type == g_protocol_atom) |
2030 |
&& ((Atom) xevent.xclient.data.l[0] == g_kill_atom)) |
&& ((Atom) xevent.xclient.data.l[0] == g_kill_atom)) |
2031 |
/* Quit */ |
{ |
2032 |
return 0; |
/* When killing a seamless window, close the window on the |
2033 |
|
serverside instead of terminating rdesktop */ |
2034 |
|
sw = sw_get_window_by_wnd(xevent.xclient.window); |
2035 |
|
if (!sw) |
2036 |
|
/* Otherwise, quit */ |
2037 |
|
return 0; |
2038 |
|
/* send seamless destroy process message */ |
2039 |
|
seamless_send_destroy(sw->id); |
2040 |
|
} |
2041 |
break; |
break; |
2042 |
|
|
2043 |
case KeyPress: |
case KeyPress: |
3473 |
|
|
3474 |
XSelectInput(g_display, wnd, input_mask); |
XSelectInput(g_display, wnd, input_mask); |
3475 |
|
|
3476 |
/* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a |
/* handle the WM_DELETE_WINDOW protocol. */ |
|
seamless window, we could try to close the window on the |
|
|
serverside, instead of terminating rdesktop */ |
|
3477 |
XSetWMProtocols(g_display, wnd, &g_kill_atom, 1); |
XSetWMProtocols(g_display, wnd, &g_kill_atom, 1); |
3478 |
|
|
3479 |
sw = xmalloc(sizeof(seamless_window)); |
sw = xmalloc(sizeof(seamless_window)); |