Make sure we notify other rdesktops that we exited so that they can update

their clipboard status.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1213 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Pierre Ossman 2006-03-28 13:56:08 +00:00
parent b48e542deb
commit b1f202a761
3 changed files with 13 additions and 0 deletions

View File

@ -209,6 +209,7 @@ void ui_clip_request_data(uint32 format);
void ui_clip_sync(void);
void ui_clip_set_mode(const char *optarg);
void xclip_init(void);
void xclip_deinit(void);
/* xkeymap.c */
BOOL xkeymap_from_locale(const char *locale);
FILE *xkeymap_open(const char *filename);

10
xclip.c
View File

@ -1173,3 +1173,13 @@ xclip_init(void)
targets[num_targets++] = format_string_atom;
targets[num_targets++] = XA_STRING;
}
void
xclip_deinit(void)
{
if (XGetSelectionOwner(g_display, primary_atom) == g_wnd)
XSetSelectionOwner(g_display, primary_atom, None, acquire_time);
if (XGetSelectionOwner(g_display, clipboard_atom) == g_wnd)
XSetSelectionOwner(g_display, clipboard_atom, None, acquire_time);
xclip_notify_change();
}

2
xwin.c
View File

@ -1636,6 +1636,8 @@ ui_deinit(void)
sw_remove_window(g_seamless_windows);
}
xclip_deinit();
if (g_IM != NULL)
XCloseIM(g_IM);