xserver: Branch 'master' - 4 commits
Alan Hourihane
alanh at kemper.freedesktop.org
Fri Aug 18 11:14:33 EEST 2006
hw/xwin/winclipboardwndproc.c | 56 ++++++++++++++++++++--------------------
hw/xwin/winmultiwindowwndproc.c | 9 ++++++
os/access.c | 4 ++
3 files changed, 42 insertions(+), 27 deletions(-)
New commits:
diff-tree 708b225689b5a4ba9ffe3372b584b715ef9eacdc (from parents)
Merge: e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 ee5e2cbd2bee610a95facc6b486c4a5070973099
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Aug 18 09:13:52 2006 +0100
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
diff-tree e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 (from 1880defe4eaba02f9585b154d0883235eabc6d11)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Aug 18 09:11:48 2006 +0100
Fix bug #7302, make Xn.hosts work from the
Microsoft Windows install directory on Xming.
(Colin Harrison)
diff --git a/os/access.c b/os/access.c
index 81f5b74..69e3051 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1188,7 +1188,11 @@ ResetHosts (char *display)
FreeHost (host);
}
+#if defined WIN32 && defined __MINGW32__
+#define ETC_HOST_PREFIX "X"
+#else
#define ETC_HOST_PREFIX "/etc/X"
+#endif
#define ETC_HOST_SUFFIX ".hosts"
fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) +
strlen(display) + 1;
diff-tree 1880defe4eaba02f9585b154d0883235eabc6d11 (from a1a8e4f7f5917f537eb3dd51d3d6fa3e129236ce)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Aug 18 09:09:53 2006 +0100
Fix bug #7281, clipboard viewer should not
call SetClipboard viewer when bogus in Xming/CygwinX
(Colin Harrison)
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index 369aac5..09a01d3 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -167,16 +167,19 @@ winClipboardWindowProc (HWND hwnd, UINT
case WM_CREATE:
{
+ HWND first, next;
+ DWORD error_code = 0;
winDebug ("winClipboardWindowProc - WM_CREATE\n");
+ first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
+ if (first == hwnd) return 0; /* Make sure it's not us! */
/* Add ourselves to the clipboard viewer chain */
- s_hwndNextViewer = SetClipboardViewer (hwnd);
- if (s_hwndNextViewer == hwnd)
- {
- s_hwndNextViewer = NULL;
- winErrorFVerb (1, "winClipboardWindowProc - WM_CREATE: "
- "attempted to set next window to ourselves.");
- }
+ next = SetClipboardViewer (hwnd);
+ error_code = GetLastError();
+ if (SUCCEEDED(error_code) && (next == first)) /* SetClipboardViewer must have succeeded, and the handle */
+ s_hwndNextViewer = next; /* it returned must have been the first window in the chain */
+ else
+ s_fCBCInitialized = FALSE;
}
return 0;
@@ -220,28 +223,27 @@ winClipboardWindowProc (HWND hwnd, UINT
* expensive than just putting ourselves back into the chain.
*/
+ HWND first, next;
+ DWORD error_code = 0;
winDebug ("winClipboardWindowProc - WM_WM_REINIT: Enter\n");
- if (hwnd != GetClipboardViewer ())
- {
- winDebug (" WM_WM_REINIT: Replacing us(%x) with %x at head "
- "of chain\n", hwnd, s_hwndNextViewer);
- s_fCBCInitialized = FALSE;
- ChangeClipboardChain (hwnd, s_hwndNextViewer);
- s_hwndNextViewer = NULL;
- s_fCBCInitialized = FALSE;
- winDebug (" WM_WM_REINIT: Putting us back at head of chain.\n");
- s_hwndNextViewer = SetClipboardViewer (hwnd);
- if (s_hwndNextViewer == hwnd)
- {
- s_hwndNextViewer = NULL;
- winErrorFVerb (1, "winClipboardWindowProc - WM_WM_REINIT: "
- "attempted to set next window to ourselves.\n");
- }
- }
+
+ first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
+ if (first == hwnd) return 0; /* Make sure it's not us! */
+ winDebug (" WM_WM_REINIT: Replacing us(%x) with %x at head "
+ "of chain\n", hwnd, s_hwndNextViewer);
+ s_fCBCInitialized = FALSE;
+ ChangeClipboardChain (hwnd, s_hwndNextViewer);
+ s_hwndNextViewer = NULL;
+ s_fCBCInitialized = FALSE;
+ winDebug (" WM_WM_REINIT: Putting us back at head of chain.\n");
+ first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
+ if (first == hwnd) return 0; /* Make sure it's not us! */
+ next = SetClipboardViewer (hwnd);
+ error_code = GetLastError();
+ if (SUCCEEDED(error_code) && (next == first)) /* SetClipboardViewer must have succeeded, and the handle */
+ s_hwndNextViewer = next; /* it returned must have been the first window in the chain */
else
- {
- winDebug (" WM_WM_REINIT: already at head of viewer chain.\n");
- }
+ s_fCBCInitialized = FALSE;
}
winDebug ("winClipboardWindowProc - WM_WM_REINIT: Exit\n");
return 0;
diff-tree a1a8e4f7f5917f537eb3dd51d3d6fa3e129236ce (from a815b9b990e068f02d9cbba2b17f2cc3a30a9310)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Aug 18 09:08:12 2006 +0100
Fix bug #7280, round title corner background
should be transparent not black in Xming/CygwinX
(Colin Harrison)
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 045adba..e359744 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -394,6 +394,15 @@ winTopLevelWindowProc (HWND hwnd, UINT m
* currently being created.
*/
winReorderWindowsMultiWindow ();
+
+ /* Fix a 'round title bar corner background should be transparent not black' problem when first painted */
+ RECT rWindow;
+ HRGN hRgnWindow;
+ GetWindowRect(hwnd, &rWindow);
+ hRgnWindow = CreateRectRgnIndirect(&rWindow);
+ SetWindowRgn (hwnd, hRgnWindow, TRUE);
+ DeleteObject(hRgnWindow);
+
return 0;
case WM_INIT_SYS_MENU:
More information about the xorg-commit
mailing list