summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xwin/winclipboard/internal.h1
-rw-r--r--hw/xwin/winclipboard/thread.c4
-rw-r--r--hw/xwin/winclipboard/wndproc.c6
3 files changed, 9 insertions, 2 deletions
diff --git a/hw/xwin/winclipboard/internal.h b/hw/xwin/winclipboard/internal.h
index bcf45ca4d..c6bde84af 100644
--- a/hw/xwin/winclipboard/internal.h
+++ b/hw/xwin/winclipboard/internal.h
@@ -44,6 +44,7 @@
#define WIN_XEVENTS_NOTIFY_TARGETS 4
#define WM_WM_REINIT (WM_USER + 1)
+#define WM_WM_QUIT (WM_USER + 2)
/*
* References to external symbols
diff --git a/hw/xwin/winclipboard/thread.c b/hw/xwin/winclipboard/thread.c
index 1653747ea..b80258196 100644
--- a/hw/xwin/winclipboard/thread.c
+++ b/hw/xwin/winclipboard/thread.c
@@ -344,7 +344,7 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
winClipboardProc_Done:
/* Close our Windows window */
if (g_hwndClipboard) {
- winClipboardWindowDestroy();
+ DestroyWindow(g_hwndClipboard);
}
/* Close our X window */
@@ -484,7 +484,7 @@ void
winClipboardWindowDestroy(void)
{
if (g_hwndClipboard) {
- SendMessage(g_hwndClipboard, WM_DESTROY, 0, 0);
+ SendMessage(g_hwndClipboard, WM_WM_QUIT, 0, 0);
}
}
diff --git a/hw/xwin/winclipboard/wndproc.c b/hw/xwin/winclipboard/wndproc.c
index b5566fa5a..423dcade3 100644
--- a/hw/xwin/winclipboard/wndproc.c
+++ b/hw/xwin/winclipboard/wndproc.c
@@ -154,6 +154,12 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
ChangeClipboardChain(hwnd, s_hwndNextViewer);
s_hwndNextViewer = NULL;
+ }
+ return 0;
+
+ case WM_WM_QUIT:
+ {
+ winDebug("winClipboardWindowProc - WM_WM_QUIT\n");
PostQuitMessage(0);
}