--- sourceforge.net/trunk/rdesktop/xwin.c 2008/03/06 15:39:21 1443 +++ sourceforge.net/trunk/rdesktop/xwin.c 2008/03/07 11:27:12 1447 @@ -2028,8 +2028,16 @@ /* the window manager told us to quit */ if ((xevent.xclient.message_type == g_protocol_atom) && ((Atom) xevent.xclient.data.l[0] == g_kill_atom)) - /* Quit */ - return 0; + { + /* When killing a seamless window, close the window on the + serverside instead of terminating rdesktop */ + sw = sw_get_window_by_wnd(xevent.xclient.window); + if (!sw) + /* Otherwise, quit */ + return 0; + /* send seamless destroy process message */ + seamless_send_destroy(sw->id); + } break; case KeyPress: @@ -3465,9 +3473,7 @@ XSelectInput(g_display, wnd, input_mask); - /* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a - seamless window, we could try to close the window on the - serverside, instead of terminating rdesktop */ + /* handle the WM_DELETE_WINDOW protocol. */ XSetWMProtocols(g_display, wnd, &g_kill_atom, 1); sw = xmalloc(sizeof(seamless_window));