diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/config/10-quirks.conf | 54 | ||||
-rw-r--r-- | xorg-server/config/Makefile.am | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 19 | ||||
-rw-r--r-- | xorg-server/hw/xwin/Makefile.am | 2 | ||||
-rw-r--r-- | xorg-server/hw/xwin/XWin.exe.manifest | 2 | ||||
-rwxr-xr-x | xorg-server/hw/xwin/windialogs.c | 62 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/winmultiwindowclass.c | 8 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowclass.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowicons.c | 2 | ||||
-rwxr-xr-x | xorg-server/hw/xwin/winmultiwindowwindow.c | 10 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwndproc.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winprefs.c | 7 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winprefs.h | 2 | ||||
-rw-r--r-- | xorg-server/include/registry.h | 1 |
14 files changed, 103 insertions, 78 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 1a8006456..9bfe66d9d 100644 --- a/xorg-server/hw/xwin/Makefile.am +++ b/xorg-server/hw/xwin/Makefile.am @@ -161,6 +161,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 77feb514e..3e3bd401c 100755 --- 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 @@ -296,7 +293,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); @@ -315,7 +312,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; @@ -415,14 +412,13 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv) "DEPTH_CHANGE_BOX", pScreenPriv->hwndScreen, winChangeDepthDlgProc, - (int) pScreenPriv); + (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgDepthChange, SW_SHOW); - winDebug ("winDisplayDepthChangeDialog - DialogBox returned: %d\n", - (int) g_hDlgDepthChange); - winDebug ("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); @@ -433,7 +429,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv) * disruptive screen depth changes. */ -static wBOOL CALLBACK +static INT_PTR CALLBACK winChangeDepthDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { @@ -537,7 +533,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); @@ -554,7 +550,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; @@ -615,26 +611,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; @@ -642,14 +629,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; @@ -657,14 +645,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; @@ -672,14 +660,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 96f69727f..e95c138a8 100644..100755 --- a/xorg-server/hw/xwin/winmultiwindowclass.c +++ b/xorg-server/hw/xwin/winmultiwindowclass.c @@ -222,7 +222,7 @@ winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints) } int -winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy) +winMultiWindowGetTransientFor(WindowPtr pWin, Window *pDaddyId) { struct _Window *pwin; struct _Property *prop; @@ -239,15 +239,15 @@ 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 && prop->format == 32 && prop->data) { if (ppDaddy) - memcpy (ppDaddy, prop->data, 4*(int)prop->size); /* format/8 = 4 */ + memcpy (pDaddy, prop->data, 4*(int)prop->size); /* format/8 = 4 */ return 1; } else diff --git a/xorg-server/hw/xwin/winmultiwindowclass.h b/xorg-server/hw/xwin/winmultiwindowclass.h index 419602154..cb47ce943 100644 --- a/xorg-server/hw/xwin/winmultiwindowclass.h +++ b/xorg-server/hw/xwin/winmultiwindowclass.h @@ -108,6 +108,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 2e0c82604..74c4b8dfe 100644 --- a/xorg-server/hw/xwin/winmultiwindowicons.c +++ b/xorg-server/hw/xwin/winmultiwindowicons.c @@ -626,7 +626,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 e11e63437..94956863b 100755 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -434,7 +434,7 @@ winCreateWindowsWindow(WindowPtr pWin) winWindowPriv(pWin); winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv; WinXSizeHints hints; - WindowPtr pDaddy; + Window daddyId; DWORD dwStyle, dwExStyle; RECT rc; @@ -485,10 +485,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; } } @@ -566,7 +566,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 abd7672cc..af6bb528e 100644 --- a/xorg-server/hw/xwin/winmultiwindowwndproc.c +++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c @@ -354,7 +354,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; @@ -383,8 +383,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 a4d241060..5a51f3b3b 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -183,7 +183,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); } @@ -619,13 +619,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 */ |