xserver: Branch 'input-hotplug' - 9 commits
Daniel Stone
daniels at kemper.freedesktop.org
Fri Aug 18 17:30:05 EEST 2006
hw/xfree86/common/xf86Configure.c | 3 +
hw/xfree86/common/xf86Mode.c | 78 ++++++++--------------------
hw/xwin/winclipboardwndproc.c | 104 +++++++++++++++++++++++++++-----------
hw/xwin/winmultiwindowwndproc.c | 9 +++
include/input.h | 2
os/access.c | 4 +
6 files changed, 115 insertions(+), 85 deletions(-)
New commits:
diff-tree c14036977fef7b8787c0b68f5262fa0b6a2834f5 (from 1c2cb30cd88ba4453f9da339025f8ff39f7f5412)
Author: Daniel Stone <daniel at fooishbar.org>
Date: Fri Aug 18 17:24:34 2006 +0300
input.h: add InitCoreDevices prototype
diff --git a/include/input.h b/include/input.h
index 6572db5..6573a1f 100644
--- a/include/input.h
+++ b/include/input.h
@@ -167,6 +167,8 @@ typedef struct _InputOption {
struct _InputOption *next;
} InputOption;
+extern void InitCoreDevices(void);
+
extern DeviceIntPtr AddInputDevice(
DeviceProc /*deviceProc*/,
Bool /*autoStart*/);
diff-tree 1c2cb30cd88ba4453f9da339025f8ff39f7f5412 (from parents)
Merge: 633b6a69f560c0a77dcff78fdef5fcf0041e2e04 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec
Author: Daniel Stone <daniel at fooishbar.org>
Date: Fri Aug 18 17:05:50 2006 +0300
Merge branch 'origin' into input-hotplug
diff-tree 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec (from 708b225689b5a4ba9ffe3372b584b715ef9eacdc)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Aug 18 14:43:10 2006 +0100
Fix bug #5735, Serious flaw in CygwinX clipboard
integration prevents paste from X to Windows apps
(Brett Stahlman & Colin Harrison)
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index 09a01d3..802a740 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -56,6 +56,8 @@ extern void *g_pClipboardDisplay;
extern Window g_iClipboardWindow;
extern Atom g_atomLastOwnedSelection;
+/* BPS - g_hwndClipboard needed for X app->Windows paste fix */
+extern HWND g_hwndClipboard;
/*
* Local function prototypes
@@ -141,6 +143,12 @@ winProcessXEventsTimeout (HWND hwnd, int
* Process a given Windows message
*/
+/* BPS - Define our own message, which we'll post to ourselves to facilitate
+ * resetting the delayed rendering mechanism after each paste from X app to
+ * Windows app. TODO - Perhaps move to win.h with the other WM_USER messages.
+ */
+#define WM_USER_PASTE_COMPLETE (WM_USER + 1003)
+
LRESULT CALLBACK
winClipboardWindowProc (HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
@@ -327,8 +335,6 @@ winClipboardWindowProc (HWND hwnd, UINT
* previous XSetSelectionOwner messages.
*/
XSync (pDisplay, FALSE);
-
- winDebug("winClipboardWindowProc - XSync done.\n");
/* Release PRIMARY selection if owned */
iReturn = XGetSelectionOwner (pDisplay, XA_PRIMARY);
@@ -527,6 +533,13 @@ winClipboardWindowProc (HWND hwnd, UINT
SetClipboardData (CF_TEXT, NULL);
}
+ /* BPS - Post ourselves a user message whose handler will reset the
+ * delayed rendering mechanism after the paste is complete. This is
+ * necessary because calling SetClipboardData() with a NULL argument
+ * here will cause the data we just put on the clipboard to be lost!
+ */
+ PostMessage(g_hwndClipboard, WM_USER_PASTE_COMPLETE, 0, 0);
+
/* Special handling for WM_RENDERALLFORMATS */
if (message == WM_RENDERALLFORMATS)
{
@@ -544,6 +557,37 @@ winClipboardWindowProc (HWND hwnd, UINT
winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Returning.\n");
return 0;
}
+ /* BPS - This WM_USER message is posted by us. It gives us the opportunity
+ * to reset the delayed rendering mechanism after each and every paste
+ * from an X app to a Windows app. Without such a mechanism, subsequent
+ * changes of selection in the X app owning the selection are not
+ * reflected in pastes into Windows apps, since Windows won't send us the
+ * WM_RENDERFORMAT message unless someone has set changed data (or NULL)
+ * on the clipboard. */
+ case WM_USER_PASTE_COMPLETE:
+ {
+ if (hwnd != GetClipboardOwner ())
+ /* In case we've lost the selection since posting the message */
+ return 0;
+ winDebug ("winClipboardWindowProc - WM_USER_PASTE_COMPLETE\n");
+
+ /* Set up for another delayed rendering callback */
+ OpenClipboard (g_hwndClipboard);
+
+ /* Take ownership of the Windows clipboard */
+ EmptyClipboard ();
+
+ /* Advertise Unicode if we support it */
+ if (g_fUnicodeSupport)
+ SetClipboardData (CF_UNICODETEXT, NULL);
+
+ /* Always advertise regular text */
+ SetClipboardData (CF_TEXT, NULL);
+
+ /* Release the clipboard */
+ CloseClipboard ();
+ }
+ return 0;
}
/* Let Windows perform default processing for unhandled messages */
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:
diff-tree ee5e2cbd2bee610a95facc6b486c4a5070973099 (from 43e42eef1f5a22703eb64fc9cffecde036ea38e0)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Thu Aug 17 17:29:32 2006 -0400
Un-cut-and-paste the mode rejection message.
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 72dd1ca..cd57e99 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -47,6 +47,22 @@
#include "xf86Priv.h"
#include "xf86DDC.h"
+static void
+printModeRejectMessage(int index, DisplayModePtr p, int status)
+{
+ char *type;
+
+ if (p->type & M_T_BUILTIN)
+ type = "built-in ";
+ else if (p->type & M_T_DEFAULT)
+ type = "default ";
+ else
+ type = "";
+
+ xf86DrvMsg(index, X_INFO, "Not using %smode \"%s\" (%s)\n", type, p->name,
+ xf86ModeStatusToString(status));
+}
+
/*
* xf86GetNearestClock --
* Find closest clock to given frequency (in kHz). This assumes the
@@ -1644,18 +1660,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, Disp
q->name = xnfstrdup(p->name);
q->status = MODE_OK;
} else {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
+ printModeRejectMessage(scrp->scrnIndex, p, status);
}
}
@@ -1796,39 +1801,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, Disp
repeat = FALSE;
lookupNext:
- if (repeat && ((status = p->status) != MODE_OK)) {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
+ if (repeat && ((status = p->status) != MODE_OK))
+ printModeRejectMessage(scrp->scrnIndex, p, status);
saveType = p->type;
status = xf86LookupMode(scrp, p, clockRanges, strategy);
- if (repeat && status == MODE_NOMODE) {
+ if (repeat && status == MODE_NOMODE)
continue;
- }
- if (status != MODE_OK) {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
+ if (status != MODE_OK)
+ printModeRejectMessage(scrp->scrnIndex, p, status);
if (status == MODE_ERROR) {
ErrorF("xf86ValidateModes: "
"unexpected result from xf86LookupMode()\n");
@@ -2023,20 +2003,6 @@ xf86PruneDriverModes(ScrnInfoPtr scrp)
return;
n = p->next;
if (p->status != MODE_OK) {
-#if 0
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
-#endif
xf86DeleteMode(&(scrp->modes), p);
}
p = n;
diff-tree 43e42eef1f5a22703eb64fc9cffecde036ea38e0 (from 7da51447eaab34292e14077fb5a48e6b2e587781)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Thu Aug 17 16:22:07 2006 -0400
Fix default mouse device on Linux, again.
It would be really nice if we only did this in one place instead of 40.
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index f0efa62..cb09108 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -87,6 +87,9 @@ static char *DFLT_MOUSE_DEV = "/dev/devi
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
static char *DFLT_MOUSE_DEV = "/dev/sysmouse";
static char *DFLT_MOUSE_PROTO = "auto";
+#elif defined(linux)
+static char DFLT_MOUSE_DEV[] = "/dev/input/mice";
+static char DFLT_MOUSE_PROTO[] = "auto";
#else
static char *DFLT_MOUSE_DEV = "/dev/mouse";
static char *DFLT_MOUSE_PROTO = "auto";
More information about the xorg-commit
mailing list