aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/config/10-quirks.conf54
-rw-r--r--xorg-server/config/Makefile.am4
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c19
-rw-r--r--xorg-server/hw/xwin/Makefile.am2
-rw-r--r--xorg-server/hw/xwin/XWin.exe.manifest2
-rw-r--r--xorg-server/hw/xwin/windialogs.c62
-rw-r--r--xorg-server/hw/xwin/winmultiwindowclass.c10
-rw-r--r--xorg-server/hw/xwin/winmultiwindowclass.h2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowicons.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c10
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c6
-rw-r--r--xorg-server/hw/xwin/winprefs.c7
-rw-r--r--xorg-server/hw/xwin/winprefs.h2
-rw-r--r--xorg-server/include/registry.h1
14 files changed, 104 insertions, 79 deletions
diff --git a/xorg-server/config/10-quirks.conf b/xorg-server/config/10-quirks.conf
new file mode 100644
index 000000000..c9b823ceb
--- /dev/null
+++ b/xorg-server/config/10-quirks.conf
@@ -0,0 +1,54 @@
+# Collection of quirks and blacklist/whitelists for specific devices.
+
+
+# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
+# http://bugs.freedesktop.org/show_bug.cgi?id=22442
+Section "InputClass"
+ Identifier "ThinkPad HDAPS accelerometer blacklist"
+ MatchProduct "ThinkPad HDAPS accelerometer data"
+ Option "Ignore" "on"
+EndSection
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=523914
+# Mouse does not move in PV Xen guest
+# Explicitly tell evdev to not ignore the absolute axes.
+Section "InputClass"
+ Identifier "Xen Virtual Pointer axis blacklist"
+ MatchProduct "Xen Virtual Pointer"
+ Option "IgnoreAbsoluteAxes" "off"
+ Option "IgnoreRelativeAxes" "off"
+EndSection
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=612140
+# please make Evoluent VerticalMouse 3 work out of the box
+# Button mapping on this mouse is quirky
+Section "InputClass"
+ Identifier "Evoluent VerticalMouse 3"
+ MatchProduct "Evoluent VerticalMouse 3"
+ # Sets following configuration:
+ # top button: left
+ # middle button: middle
+ # bottom button: right
+ # wheel click: middle
+ # thumb button: 8 (back)
+ Option "ButtonMapping" "1 2 2 4 5 6 7 3 8"
+EndSection
+
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=55867
+# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
+Section "InputClass"
+ Identifier "Tag trackballs as XI_TRACKBALL"
+ MatchProduct "trackball"
+ MatchDriver "evdev"
+ Option "TypeName" "TRACKBALL"
+EndSection
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=62831
+# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
+Section "InputClass"
+ Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
+ MatchProduct "La-VIEW Technology Naos 5000 Mouse"
+ MatchDriver "evdev"
+ Option "TypeName" "MOUSE"
+EndSection
diff --git a/xorg-server/config/Makefile.am b/xorg-server/config/Makefile.am
index 69bdcf730..da81d7712 100644
--- a/xorg-server/config/Makefile.am
+++ b/xorg-server/config/Makefile.am
@@ -11,7 +11,7 @@ libconfig_la_LIBADD = $(UDEV_LIBS)
if XORG
xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR)
-xorgconfd_DATA = 10-evdev.conf
+xorgconfd_DATA = 10-evdev.conf 10-quirks.conf
endif
else
@@ -44,4 +44,4 @@ endif # CONFIG_NEED_DBUS
endif # !CONFIG_UDEV
-EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py
+EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py 10-quirks.conf
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 40963c3b0..0b047f025 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -99,7 +99,6 @@ typedef struct _DRI2Drawable {
CARD64 last_swap_msc; /* msc at completion of most recent swap */
CARD64 last_swap_ust; /* ust at completion of most recent swap */
int swap_limit; /* for N-buffering */
- unsigned long serialNumber;
Bool needInvalidate;
int prime_id;
PixmapPtr prime_slave_pixmap;
@@ -189,19 +188,6 @@ DRI2GetDrawable(DrawablePtr pDraw)
}
}
-static unsigned long
-DRI2DrawableSerial(DrawablePtr pDraw)
-{
- ScreenPtr pScreen = pDraw->pScreen;
- PixmapPtr pPix;
-
- if (pDraw->type != DRAWABLE_WINDOW)
- return pDraw->serialNumber;
-
- pPix = pScreen->GetWindowPixmap((WindowPtr) pDraw);
- return pPix->drawable.serialNumber;
-}
-
static DRI2DrawablePtr
DRI2AllocateDrawable(DrawablePtr pDraw)
{
@@ -235,7 +221,6 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
pPriv->last_swap_msc = 0;
pPriv->last_swap_ust = 0;
xorg_list_init(&pPriv->reference_list);
- pPriv->serialNumber = DRI2DrawableSerial(pDraw);
pPriv->needInvalidate = FALSE;
pPriv->redirectpixmap = NULL;
pPriv->prime_slave_pixmap = NULL;
@@ -493,7 +478,6 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds,
|| attachment == DRI2BufferFrontLeft
|| !dimensions_match || (pPriv->buffers[old_buf]->format != format)) {
*buffer = create_buffer (pDraw, attachment, format);
- pPriv->serialNumber = DRI2DrawableSerial(pDraw);
return TRUE;
}
@@ -559,8 +543,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
ds = DRI2GetScreen(pDraw->pScreen);
dimensions_match = (pDraw->width == pPriv->width)
- && (pDraw->height == pPriv->height)
- && (pPriv->serialNumber == DRI2DrawableSerial(pDraw));
+ && (pDraw->height == pPriv->height);
buffers = calloc((count + 1), sizeof(buffers[0]));
if (!buffers)
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index 93ce57038..f13197592 100644
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -160,6 +160,8 @@ XWin_LDFLAGS = -mwindows -static
.rc.o:
$(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include
+XWin.o: XWin.rc XWin.exe.manifest X.ico
+
winprefsyacc.h: winprefsyacc.c
winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
diff --git a/xorg-server/hw/xwin/XWin.exe.manifest b/xorg-server/hw/xwin/XWin.exe.manifest
index a0d4d7dae..477334fb3 100644
--- a/xorg-server/hw/xwin/XWin.exe.manifest
+++ b/xorg-server/hw/xwin/XWin.exe.manifest
@@ -7,7 +7,7 @@
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
- processorArchitecture="X86"
+ processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index 86f332aad..054ee95b5 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -33,9 +33,6 @@
#include <xwin-config.h>
#endif
#include "win.h"
-#ifdef __CYGWIN__
-#include <sys/cygwin.h>
-#endif
#include <shellapi.h>
#include "winprefs.h"
@@ -50,13 +47,13 @@ extern Bool g_fClipboardStarted;
* Local function prototypes
*/
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winChangeDepthDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winAboutDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
static void
@@ -288,7 +285,7 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv)
g_hDlgExit = CreateDialogParam(g_hInstance,
"EXIT_DIALOG",
pScreenPriv->hwndScreen,
- winExitDlgProc, (int) pScreenPriv);
+ winExitDlgProc, (LPARAM) pScreenPriv);
/* Show the dialog box */
ShowWindow(g_hDlgExit, SW_SHOW);
@@ -307,7 +304,7 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv)
* Exit dialog window procedure
*/
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam)
{
static winPrivScreenPtr s_pScreenPriv = NULL;
@@ -407,14 +404,13 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
"DEPTH_CHANGE_BOX",
pScreenPriv->hwndScreen,
winChangeDepthDlgProc,
- (int) pScreenPriv);
+ (LPARAM) pScreenPriv);
/* Show the dialog box */
ShowWindow(g_hDlgDepthChange, SW_SHOW);
- ErrorF("winDisplayDepthChangeDialog - DialogBox returned: %d\n",
- (int) g_hDlgDepthChange);
- ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n",
- (int) GetLastError());
+ if (!g_hDlgDepthChange)
+ ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n",
+ (int) GetLastError());
/* Minimize the display window */
ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE);
@@ -425,7 +421,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
* disruptive screen depth changes.
*/
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winChangeDepthDlgProc(HWND hwndDialog, UINT message,
WPARAM wParam, LPARAM lParam)
{
@@ -539,7 +535,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv)
g_hDlgAbout = CreateDialogParam(g_hInstance,
"ABOUT_BOX",
pScreenPriv->hwndScreen,
- winAboutDlgProc, (int) pScreenPriv);
+ winAboutDlgProc, (LPARAM) pScreenPriv);
/* Show the dialog box */
ShowWindow(g_hDlgAbout, SW_SHOW);
@@ -556,7 +552,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv)
* Process messages for the about dialog.
*/
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
{
static winPrivScreenPtr s_pScreenPriv = NULL;
@@ -621,26 +617,17 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
case ID_ABOUT_CHANGELOG:
{
- int iReturn;
-
-#ifdef __CYGWIN__
- const char *pszCygPath = "/usr/X11R6/share/doc/"
- "xorg-x11-xwin/changelog.html";
- char pszWinPath[MAX_PATH + 1];
+ INT_PTR iReturn;
- /* Convert the POSIX path to a Win32 path */
- cygwin_conv_to_win32_path(pszCygPath, pszWinPath);
-#else
const char *pszWinPath = "http://x.cygwin.com/"
"devel/server/changelog.html";
-#endif
- iReturn = (int) ShellExecute(NULL,
+ iReturn = (INT_PTR) ShellExecute(NULL,
"open",
pszWinPath, NULL, NULL, SW_MAXIMIZE);
if (iReturn < 32) {
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - "
- "ShellExecute failed: %d\n", iReturn);
+ "ShellExecute failed: %d\n", (int)iReturn);
}
}
return TRUE;
@@ -648,14 +635,15 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
case ID_ABOUT_WEBSITE:
{
const char *pszPath = __VENDORDWEBSUPPORT__;
- int iReturn;
+ INT_PTR iReturn;
- iReturn = (int) ShellExecute(NULL,
+ iReturn = (INT_PTR) ShellExecute(NULL,
"open",
pszPath, NULL, NULL, SW_MAXIMIZE);
if (iReturn < 32) {
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - "
- "ShellExecute failed: %d\n", iReturn);
+ "ShellExecute failed: %d\n", (int)iReturn);
+
}
}
return TRUE;
@@ -663,14 +651,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
case ID_ABOUT_UG:
{
const char *pszPath = "http://x.cygwin.com/docs/ug/";
- int iReturn;
+ INT_PTR iReturn;
- iReturn = (int) ShellExecute(NULL,
+ iReturn = (INT_PTR) ShellExecute(NULL,
"open",
pszPath, NULL, NULL, SW_MAXIMIZE);
if (iReturn < 32) {
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - "
- "ShellExecute failed: %d\n", iReturn);
+ "ShellExecute failed: %d\n", (int)iReturn);
}
}
return TRUE;
@@ -678,14 +666,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
case ID_ABOUT_FAQ:
{
const char *pszPath = "http://x.cygwin.com/docs/faq/";
- int iReturn;
+ INT_PTR iReturn;
- iReturn = (int) ShellExecute(NULL,
+ iReturn = (INT_PTR) ShellExecute(NULL,
"open",
pszPath, NULL, NULL, SW_MAXIMIZE);
if (iReturn < 32) {
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - "
- "ShellExecute failed: %d\n", iReturn);
+ "ShellExecute failed: %d\n", (int)iReturn);
}
}
return TRUE;
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.c b/xorg-server/hw/xwin/winmultiwindowclass.c
index 1af104df9..ced8f4554 100644
--- a/xorg-server/hw/xwin/winmultiwindowclass.c
+++ b/xorg-server/hw/xwin/winmultiwindowclass.c
@@ -213,7 +213,7 @@ winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints)
}
int
-winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy)
+winMultiWindowGetTransientFor(WindowPtr pWin, Window *pDaddyId)
{
struct _Window *pwin;
struct _Property *prop;
@@ -230,13 +230,13 @@ winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy)
else
prop = NULL;
- if (ppDaddy)
- *ppDaddy = NULL;
+ if (pDaddyId)
+ *pDaddyId = 0;
while (prop) {
if (prop->propertyName == XA_WM_TRANSIENT_FOR) {
- if (ppDaddy)
- memcpy(ppDaddy, prop->data, sizeof(WindowPtr));
+ if (pDaddyId)
+ memcpy(pDaddyId, prop->data, sizeof(Window));
return 1;
}
else
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.h b/xorg-server/hw/xwin/winmultiwindowclass.h
index 0e3465c78..3244f78e3 100644
--- a/xorg-server/hw/xwin/winmultiwindowclass.h
+++ b/xorg-server/hw/xwin/winmultiwindowclass.h
@@ -118,6 +118,6 @@ int
winMultiWindowGetWMName(WindowPtr pWin, char **wmName);
int
- winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy);
+ winMultiWindowGetTransientFor(WindowPtr pWin, Window *ppDaddy);
#endif
diff --git a/xorg-server/hw/xwin/winmultiwindowicons.c b/xorg-server/hw/xwin/winmultiwindowicons.c
index 0322d9816..bcc5688df 100644
--- a/xorg-server/hw/xwin/winmultiwindowicons.c
+++ b/xorg-server/hw/xwin/winmultiwindowicons.c
@@ -624,7 +624,7 @@ winDestroyIcon(HICON hIcon)
/* Delete the icon if its not one of the application defaults or an override */
if (hIcon &&
hIcon != g_hIconX &&
- hIcon != g_hSmallIconX && !winIconIsOverride((unsigned long) hIcon))
+ hIcon != g_hSmallIconX && !winIconIsOverride(hIcon))
DestroyIcon(hIcon);
}
#endif
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 09481560c..44ad19302 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -486,7 +486,7 @@ winCreateWindowsWindow(WindowPtr pWin)
winWindowPriv(pWin);
winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv;
WinXSizeHints hints;
- WindowPtr pDaddy;
+ Window daddyId;
DWORD dwStyle, dwExStyle;
RECT rc;
@@ -516,10 +516,10 @@ winCreateWindowsWindow(WindowPtr pWin)
winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX,
iY);
- if (winMultiWindowGetTransientFor(pWin, &pDaddy)) {
- if (pDaddy) {
+ if (winMultiWindowGetTransientFor(pWin, &daddyId)) {
+ if (daddyId) {
hFore = GetForegroundWindow();
- if (hFore && (pDaddy != (WindowPtr) GetProp(hFore, WIN_WID_PROP)))
+ if (hFore && (daddyId != (Window) (INT_PTR) GetProp(hFore, WIN_WID_PROP)))
hFore = NULL;
}
}
@@ -593,7 +593,7 @@ winCreateWindowsWindow(WindowPtr pWin)
/* Cause any .XWinrc menus to be added in main WNDPROC */
PostMessage(hWnd, WM_INIT_SYS_MENU, 0, 0);
- SetProp(hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin));
+ SetProp(hWnd, WIN_WID_PROP, (HANDLE) (INT_PTR) winGetWindowID(pWin));
/* Flag that this Windows window handles its own activation */
SetProp(hWnd, WIN_NEEDMANAGE_PROP, (HANDLE) 0);
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 0e46ea7fe..381818789 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -343,7 +343,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* */
wmMsg.msg = 0;
wmMsg.hwndWindow = hwnd;
- wmMsg.iWindow = (Window) GetProp(hwnd, WIN_WID_PROP);
+ wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP);
wmMsg.iX = pDraw->x;
wmMsg.iY = pDraw->y;
@@ -391,8 +391,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* */
SetProp(hwnd,
WIN_WID_PROP,
- (HANDLE) winGetWindowID(((LPCREATESTRUCT) lParam)->
- lpCreateParams));
+ (HANDLE) (INT_PTR) winGetWindowID(((LPCREATESTRUCT) lParam)->
+ lpCreateParams));
/*
* Make X windows' Z orders sync with Windows windows because
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 6cbd7ad80..8936aae63 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -181,7 +181,7 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam)
wmMsg.msg = WM_WM_ICON_EVENT;
wmMsg.hwndWindow = hwnd;
- wmMsg.iWindow = (Window) GetProp(hwnd, WIN_WID_PROP);
+ wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP);
winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg);
}
@@ -617,13 +617,10 @@ winOverrideIcon(char *res_name, char *res_class, char *wmName)
* ICONS{} overrides)?
*/
int
-winIconIsOverride(unsigned hiconIn)
+winIconIsOverride(HICON hicon)
{
- HICON hicon;
int i;
- hicon = (HICON) hiconIn;
-
if (!hicon)
return 0;
diff --git a/xorg-server/hw/xwin/winprefs.h b/xorg-server/hw/xwin/winprefs.h
index 5de5719e1..a4a6e7eec 100644
--- a/xorg-server/hw/xwin/winprefs.h
+++ b/xorg-server/hw/xwin/winprefs.h
@@ -162,7 +162,7 @@ Bool
HandleCustomWM_COMMAND(unsigned long hwndIn, int command);
int
- winIconIsOverride(unsigned hiconIn);
+ winIconIsOverride(HICON hicon);
HICON winOverrideIcon(char *res_name, char *res_class, char *wmName);
diff --git a/xorg-server/include/registry.h b/xorg-server/include/registry.h
index e298ab6fc..96be87aad 100644
--- a/xorg-server/include/registry.h
+++ b/xorg-server/include/registry.h
@@ -60,6 +60,7 @@ extern _X_EXPORT void dixFreeRegistry(void);
#define LookupResourceName(a) XREGISTRY_UNKNOWN
#define dixResetRegistry() { ; }
+#define dixFreeRegistry() { ; }
#endif /* XREGISTRY */
#endif /* DIX_REGISTRY_H */