dix: add missing dixFreeRegistry define

Fixes a build failure on debian's udeb builds.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
config: add a quirks file for devices needing special configuration

This is the fedora quirks file configuring the special handling some devices
need. Rather than keeping this distro-specific add it to the tree so we can
share these quirks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer

Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute()
to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin

The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit
cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's
path we are converting haven't existed for a while, so just remove this unused,
cygwin-specific code.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds

Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds

dwInitParam parameter is LPARAM, not int
Return type of DLGPROC is INT_PTR, not WINBOOL

Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we
are just interested in GetLastError() if it is NULL

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: Change winIconIsOverride() to take a HICON parameter

Change winIconIsOverride() to take a HICON parameter, so some unneccessary
casts, which weren't portable to 64-bit Cygwin, can be removed.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr

winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is
an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type

Win32 Windows properties are of pointer type HANDLE, not an integer type, but we
use the Windows property WINDOW_WID_PROP to store the X window XID.

Add appropriate casts to show it doesn't matter that an XID is smaller than a
pointer on 64-bit build.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin: Update manifest to target all architectures, not just x86

Update manifest to target all architectures, not just x86

Also: Write explicit dependencies for Xwin.rc.  XWin.exe.manifest and X.ico are
included the resource compiler output, so add a dependency on them to cause it
to be recompiled if they change.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Merge remote-tracking branch 'jturney/master'
Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes"

This reverts commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f.  After a
long debug session by Paul Berry, it appears that this was the commit
that has been producing sporadic failures in piglit front buffer
rendering tests for the last several years.

GetBuffers may return fresh buffers with invalid contents at a couple
reasonable times:

- When first asked for a non-fake-front buffer.
- When the drawable size is changed, an Invalidate has been sent, and
  obviously the app needs to redraw the whole buffer.
- After a glXSwapBuffers(), GL allows the backbuffer to be undefined,
  and an Invalidate was sent to tell the GL that it should grab these
  appropriate new buffers to avoid stalling.

But with the patch being reverted, GetBuffers would also return fresh
invalid buffers when the drawable serial number changed, which is
approximately "whenever, for any reason".  The app is not expecting
invalid buffer contents "whenever", nor is it valid.  Because the GL
usually only GetBuffers after an Invalidate is sent, and the new
buffer allocation only happened during a GetBuffers, most apps saw no
problems.  But apps that do (fake-)frontbuffer rendering do frequently
ask the server for the front buffer (since we drop the fake front
allocation when we're not doing front buffer rendering), and if the
drawable serial got bumped midway through a draw, the server would
pointlessly ditch the front *and* backbuffer full of important
drawing, resulting in bad rendering.

The patch was originally to fix bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=28365
Specifically:

    To reproduce, start with a large-ish display (i.e. 1680x1050 on my
    laptop), use the patched glxgears from bug 28252 to add the
    -override option.  Then run glxgears -override -geometry 640x480
    to create a 640x480 window in the top left corner, which will work
    fine.  Next, run xrandr -s 640x480 and watch the fireworks.

I've tested with an override-redirect glxgears, both with vblank sync
enabled and disabled, both with gnome-shell and no window manager at
all, before and after this patch.  The only problem observed was that
before and after the revert, sometimes when alt-tabbing to kill my
gears after completing the test gnome-shell would get confused about
override-redirectness of the glxgears window (according to a log
message) and apparently not bother doing any further compositing.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>