aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxorg-server/hw/xwin/winclipboard/internal.h16
-rwxr-xr-xxorg-server/hw/xwin/winclipboard/thread.c71
-rw-r--r--xorg-server/hw/xwin/winclipboardinit.c57
-rw-r--r--xorg-server/hw/xwin/winshaddd.c1
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c2
-rw-r--r--xorg-server/hw/xwin/winwindow.h2
6 files changed, 77 insertions, 72 deletions
diff --git a/xorg-server/hw/xwin/winclipboard/internal.h b/xorg-server/hw/xwin/winclipboard/internal.h
index d42497cc9..fece50740 100755
--- a/xorg-server/hw/xwin/winclipboard/internal.h
+++ b/xorg-server/hw/xwin/winclipboard/internal.h
@@ -58,22 +58,14 @@ typedef int pid_t;
/* Windows headers */
#include <X11/Xwindows.h>
-/* Clipboard module constants */
-#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
-#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
-#ifdef HAS_DEVWINDOWS
-#define WIN_MSG_QUEUE_FNAME "/dev/windows"
-#endif
-#define WIN_CONNECT_RETRIES 40
-#define WIN_CONNECT_DELAY 4
-#define WIN_JMP_OKAY 0
-#define WIN_JMP_ERROR_IO 2
-#define WIN_LOCAL_PROPERTY "CYGX_CUT_BUFFER"
+#include "winmsg.h"
+
#define WIN_XEVENTS_SUCCESS 0
#define WIN_XEVENTS_CONVERT 2
#define WIN_XEVENTS_NOTIFY 3
+#define WIN_LOCAL_PROPERTY "CYGX_CUT_BUFFER"
-#include "winmsg.h"
+#define WM_WM_REINIT (WM_USER + 200)
/*
* References to external symbols
diff --git a/xorg-server/hw/xwin/winclipboard/thread.c b/xorg-server/hw/xwin/winclipboard/thread.c
index 56f5484e6..1ba687eb1 100755
--- a/xorg-server/hw/xwin/winclipboard/thread.c
+++ b/xorg-server/hw/xwin/winclipboard/thread.c
@@ -47,6 +47,18 @@
#include "winmsg.h"
#include "internal.h"
+/* Clipboard module constants */
+#define WIN_CONNECT_RETRIES 40
+#define WIN_CONNECT_DELAY 4
+#define WIN_JMP_OKAY 0
+#define WIN_JMP_ERROR_IO 2
+
+#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
+#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
+#ifdef HAS_DEVWINDOWS
+#define WIN_MSG_QUEUE_FNAME "/dev/windows"
+#endif
+
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
@@ -55,6 +67,7 @@
*/
extern Bool g_fUnicodeClipboard;
+extern Bool g_fClipboard;
extern Bool g_fClipboardStarted;
extern Bool g_fClipboardLaunched;
extern HWND g_hwndClipboard;
@@ -423,6 +436,55 @@ commonexit:
}
/*
+ * Create the Windows window that we use to receive Windows messages
+ */
+
+HWND
+winClipboardCreateMessagingWindow(void)
+{
+ WNDCLASSEX wc;
+ HWND hwnd;
+
+ /* Setup our window class */
+ wc.cbSize = sizeof(WNDCLASSEX);
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = winClipboardWindowProc;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = GetModuleHandle(NULL);
+ wc.hIcon = 0;
+ wc.hCursor = 0;
+ wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
+ wc.lpszMenuName = NULL;
+ wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS;
+ wc.hIconSm = 0;
+ RegisterClassEx(&wc);
+
+ /* Create the window */
+ hwnd = CreateWindowExA(0, /* Extended styles */
+ WIN_CLIPBOARD_WINDOW_CLASS, /* Class name */
+ WIN_CLIPBOARD_WINDOW_TITLE, /* Window name */
+ WS_OVERLAPPED, /* Not visible anyway */
+ CW_USEDEFAULT, /* Horizontal position */
+ CW_USEDEFAULT, /* Vertical position */
+ CW_USEDEFAULT, /* Right edge */
+ CW_USEDEFAULT, /* Bottom edge */
+ (HWND) NULL, /* No parent or owner window */
+ (HMENU) NULL, /* No menu */
+ GetModuleHandle(NULL), /* Instance handle */
+ NULL); /* Creation data */
+ assert(hwnd != NULL);
+
+ /* I'm not sure, but we may need to call this to start message processing */
+ ShowWindow(hwnd, SW_HIDE);
+
+ /* Similarly, we may need a call to this even though we don't paint */
+ UpdateWindow(hwnd);
+
+ return hwnd;
+}
+
+/*
* winClipboardErrorHandler - Our application specific error handler
*/
@@ -478,3 +540,12 @@ winClipboardThreadExit(void *arg)
AbortDDX(EXIT_ERR_ABORT);
TerminateProcess(GetCurrentProcess(),1);
}
+
+
+void
+winFixClipboardChain(int Removed)
+{
+ if (g_fClipboard && g_hwndClipboard) {
+ PostMessage (g_hwndClipboard, WM_WM_REINIT, Removed, 0);
+ }
+}
diff --git a/xorg-server/hw/xwin/winclipboardinit.c b/xorg-server/hw/xwin/winclipboardinit.c
index 7eb672002..d4d9926ac 100644
--- a/xorg-server/hw/xwin/winclipboardinit.c
+++ b/xorg-server/hw/xwin/winclipboardinit.c
@@ -79,60 +79,3 @@ winInitClipboard(void)
return TRUE;
}
-
-/*
- * Create the Windows window that we use to receive Windows messages
- */
-
-HWND
-winClipboardCreateMessagingWindow(void)
-{
- WNDCLASSEX wc;
- HWND hwnd;
-
- /* Setup our window class */
- wc.cbSize = sizeof(WNDCLASSEX);
- wc.style = CS_HREDRAW | CS_VREDRAW;
- wc.lpfnWndProc = winClipboardWindowProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = GetModuleHandle(NULL);
- wc.hIcon = 0;
- wc.hCursor = 0;
- wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
- wc.lpszMenuName = NULL;
- wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS;
- wc.hIconSm = 0;
- RegisterClassEx(&wc);
-
- /* Create the window */
- hwnd = CreateWindowExA(0, /* Extended styles */
- WIN_CLIPBOARD_WINDOW_CLASS, /* Class name */
- WIN_CLIPBOARD_WINDOW_TITLE, /* Window name */
- WS_OVERLAPPED, /* Not visible anyway */
- CW_USEDEFAULT, /* Horizontal position */
- CW_USEDEFAULT, /* Vertical position */
- CW_USEDEFAULT, /* Right edge */
- CW_USEDEFAULT, /* Bottom edge */
- (HWND) NULL, /* No parent or owner window */
- (HMENU) NULL, /* No menu */
- GetModuleHandle(NULL), /* Instance handle */
- NULL); /* Creation data */
- assert(hwnd != NULL);
-
- /* I'm not sure, but we may need to call this to start message processing */
- ShowWindow(hwnd, SW_HIDE);
-
- /* Similarly, we may need a call to this even though we don't paint */
- UpdateWindow(hwnd);
-
- return hwnd;
-}
-
-void
-winFixClipboardChain(int Removed)
-{
- if (g_fClipboard && g_hwndClipboard) {
- PostMessage (g_hwndClipboard, WM_WM_REINIT, Removed, 0);
- }
-}
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 194449e63..0d1cb24fe 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -994,6 +994,7 @@ winRedrawScreenShadowDD(ScreenPtr pScreen)
if (FAILED(ddrval)) {
ErrorF("winRedrawScreenShadowDD - IDirectDrawSurface_Blt () "
"failed: %08x\n", (unsigned int) ddrval);
+ return FALSE;
}
return TRUE;
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index c7db77bac..b7187b136 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -985,7 +985,7 @@ winRedrawScreenShadowDDNL(ScreenPtr pScreen)
/* Return immediately if we didn't get needed surfaces */
if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4)
- return;
+ return FALSE;
/* Get the origin of the window in the screen coords */
ptOrigin.x = pScreenInfo->dwXOffset;
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index d6e155b3a..534b524b7 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -111,8 +111,6 @@ typedef struct _winWMMessageRec {
#define WM_WM_HINTS_EVENT (WM_USER + 14)
#define WM_MANAGE (WM_USER + 100)
#define WM_UNMANAGE (WM_USER + 102)
-#define WM_WM_REINIT (WM_USER + 200)
-
#define MwmHintsDecorations (1L << 1)