diff options
24 files changed, 127 insertions, 152 deletions
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_context.c b/mesalib/src/gallium/auxiliary/hud/hud_context.c index cbd00a961..981708314 100644 --- a/mesalib/src/gallium/auxiliary/hud/hud_context.c +++ b/mesalib/src/gallium/auxiliary/hud/hud_context.c @@ -456,7 +456,7 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex) cso_set_geometry_shader_handle(cso, NULL); cso_set_vertex_shader_handle(cso, hud->vs); cso_set_vertex_elements(cso, 2, hud->velems); - cso_set_render_condition(cso, NULL, 0); + cso_set_render_condition(cso, NULL, FALSE, 0); cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, 1, &hud->font_sampler_view); cso_set_samplers(cso, PIPE_SHADER_FRAGMENT, 1, sampler_states); diff --git a/mesalib/src/gallium/auxiliary/util/u_blit.c b/mesalib/src/gallium/auxiliary/util/u_blit.c index cda66d157..07418be45 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blit.c +++ b/mesalib/src/gallium/auxiliary/util/u_blit.c @@ -679,7 +679,7 @@ util_blit_pixels(struct blit_state *ctx, cso_set_rasterizer(ctx->cso, &ctx->rasterizer); cso_set_vertex_elements(ctx->cso, 2, ctx->velem); cso_set_stream_outputs(ctx->cso, 0, NULL, 0); - cso_set_render_condition(ctx->cso, NULL, 0); + cso_set_render_condition(ctx->cso, NULL, FALSE, 0); /* default sampler state */ ctx->sampler.normalized_coords = normalized; diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index e9ac170f7..be839d439 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -492,7 +492,7 @@ static void blitter_disable_render_cond(struct blitter_context_priv *ctx) struct pipe_context *pipe = ctx->base.pipe; if (ctx->base.saved_render_cond_query) { - pipe->render_condition(pipe, NULL, 0); + pipe->render_condition(pipe, NULL, FALSE, 0); } } @@ -502,6 +502,7 @@ static void blitter_restore_render_cond(struct blitter_context_priv *ctx) if (ctx->base.saved_render_cond_query) { pipe->render_condition(pipe, ctx->base.saved_render_cond_query, + ctx->base.saved_render_cond_cond, ctx->base.saved_render_cond_mode); ctx->base.saved_render_cond_query = NULL; } diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index e52d5acc9..d9cefde50 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h @@ -125,6 +125,7 @@ struct blitter_context struct pipe_query *saved_render_cond_query; uint saved_render_cond_mode; + boolean saved_render_cond_cond; }; /** @@ -515,10 +516,12 @@ util_blitter_save_sample_mask(struct blitter_context *blitter, static INLINE void util_blitter_save_render_condition(struct blitter_context *blitter, struct pipe_query *query, + boolean condition, uint mode) { blitter->saved_render_cond_query = query; blitter->saved_render_cond_mode = mode; + blitter->saved_render_cond_cond = condition; } #ifdef __cplusplus diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index 763b5cc22..b118fc8ae 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -283,6 +283,7 @@ util_cpu_detect(void) util_cpu_caps.has_ssse3 = (regs2[2] >> 9) & 1; /* 0x0000020 */ util_cpu_caps.has_sse4_1 = (regs2[2] >> 19) & 1; util_cpu_caps.has_sse4_2 = (regs2[2] >> 20) & 1; + util_cpu_caps.has_popcnt = (regs2[2] >> 23) & 1; util_cpu_caps.has_avx = (regs2[2] >> 28) & 1; util_cpu_caps.has_f16c = (regs2[2] >> 29) & 1; util_cpu_caps.has_mmx2 = util_cpu_caps.has_sse; /* SSE cpus supports mmxext too */ diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h index 21c2f048f..f9cd6475e 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h @@ -62,6 +62,7 @@ struct util_cpu_caps { unsigned has_ssse3:1; unsigned has_sse4_1:1; unsigned has_sse4_2:1; + unsigned has_popcnt:1; unsigned has_avx:1; unsigned has_f16c:1; unsigned has_3dnow:1; diff --git a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c index 7974b1d76..a885f2b0f 100644 --- a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1578,7 +1578,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, cso_set_sample_mask(ctx->cso, ~0); cso_set_vertex_elements(ctx->cso, 2, ctx->velem); cso_set_stream_outputs(ctx->cso, 0, NULL, 0); - cso_set_render_condition(ctx->cso, NULL, 0); + cso_set_render_condition(ctx->cso, NULL, FALSE, 0); set_fragment_shader(ctx, type, is_depth); set_vertex_shader(ctx); diff --git a/mesalib/src/mesa/main/bitset.h b/mesalib/src/mesa/main/bitset.h index c3b060b01..601fd0ebf 100644 --- a/mesalib/src/mesa/main/bitset.h +++ b/mesalib/src/mesa/main/bitset.h @@ -96,65 +96,4 @@ __bitset_ffs(const BITSET_WORD *x, int n) #define BITSET_FFS(x) __bitset_ffs(x, Elements(x)) -/**************************************************************************** - * 64-bit bitset implementation - */ - -#define BITSET64_WORD GLuint -#define BITSET64_WORDBITS (sizeof (BITSET64_WORD) * 8) - -/* bitset declarations - */ -#define BITSET64_DECLARE(name, size) \ - GLuint name[2] - -/* bitset operations - */ -#define BITSET64_COPY(x, y) do { (x)[0] = (y)[0]; (x)[1] = (y)[1]; } while (0) -#define BITSET64_EQUAL(x, y) ( (x)[0] == (y)[0] && (x)[1] == (y)[1] ) -#define BITSET64_ZERO(x) do { (x)[0] = 0; (x)[1] = 0; } while (0) -#define BITSET64_ONES(x) do { (x)[0] = 0xFF; (x)[1] = 0xFF; } while (0) - -#define BITSET64_BITWORD(b) ((b) / BITSET64_WORDBITS) -#define BITSET64_BIT(b) (1 << ((b) % BITSET64_WORDBITS)) - -/* single bit operations - */ -#define BITSET64_TEST(x, b) ((x)[BITSET64_BITWORD(b)] & BITSET64_BIT(b)) -#define BITSET64_SET(x, b) ((x)[BITSET64_BITWORD(b)] |= BITSET64_BIT(b)) -#define BITSET64_CLEAR(x, b) ((x)[BITSET64_BITWORD(b)] &= ~BITSET64_BIT(b)) - -#define BITSET64_MASK(b) ((b) == BITSET64_WORDBITS ? ~0 : BITSET64_BIT(b) - 1) -#define BITSET64_RANGE(b, e) (BITSET64_MASK((e) + 1) & ~BITSET64_MASK(b)) - -/* bit range operations - */ -#define BITSET64_TEST_SUBRANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - ((x)[BITSET64_BITWORD(b)] & BITSET64_RANGE(b, e)) : \ - (assert (!"BITSET64_TEST_RANGE: bit range crosses word boundary"), 0)) -#define BITSET64_TEST_RANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - (BITSET64_TEST_SUBRANGE(x, b, e)) : \ - (BITSET64_TEST_SUBRANGE(x, b, BITSET64_WORDBITS - 1) | \ - BITSET64_TEST_SUBRANGE(x, BITSET64_WORDBITS, e))) -#define BITSET64_SET_SUBRANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - ((x)[BITSET64_BITWORD(b)] |= BITSET64_RANGE(b, e)) : \ - (assert (!"BITSET64_SET_RANGE: bit range crosses word boundary"), 0)) -#define BITSET64_SET_RANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - (BITSET64_SET_SUBRANGE(x, b, e)) : \ - (BITSET64_SET_SUBRANGE(x, b, BITSET64_WORDBITS - 1) | \ - BITSET64_SET_SUBRANGE(x, BITSET64_WORDBITS, e))) -#define BITSET64_CLEAR_SUBRANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - ((x)[BITSET64_BITWORD(b)] &= ~BITSET64_RANGE(b, e)) : \ - (assert (!"BITSET64_CLEAR_RANGE: bit range crosses word boundary"), 0)) -#define BITSET64_CLEAR_RANGE(x, b, e) \ - (BITSET64_BITWORD(b) == BITSET64_BITWORD(e) ? \ - (BITSET64_CLEAR_SUBRANGE(x, b, e)) : \ - (BITSET64_CLEAR_SUBRANGE(x, b, BITSET64_WORDBITS - 1) | \ - BITSET64_CLEAR_SUBRANGE(x, BITSET64_WORDBITS, e))) - #endif diff --git a/mesalib/src/mesa/main/multisample.c b/mesalib/src/mesa/main/multisample.c index f4116ca00..8b974c1b7 100644 --- a/mesalib/src/mesa/main/multisample.c +++ b/mesalib/src/mesa/main/multisample.c @@ -120,7 +120,8 @@ _mesa_SampleMaski(GLuint index, GLbitfield mask) } -/* Helper for checking a requested sample count against the limit +/** + * Helper for checking a requested sample count against the limit * for a particular (target, internalFormat) pair. The limit imposed, * and the error generated, both depend on which extensions are supported. * @@ -131,8 +132,9 @@ GLenum _mesa_check_sample_count(struct gl_context *ctx, GLenum target, GLenum internalFormat, GLsizei samples) { - /* If ARB_internalformat_query is supported, then treat its highest returned sample - * count as the absolute maximum for this format; it is allowed to exceed MAX_SAMPLES. + /* If ARB_internalformat_query is supported, then treat its highest + * returned sample count as the absolute maximum for this format; it is + * allowed to exceed MAX_SAMPLES. * * From the ARB_internalformat_query spec: * @@ -141,7 +143,8 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target, */ if (ctx->Extensions.ARB_internalformat_query) { GLint buffer[16]; - int count = ctx->Driver.QuerySamplesForFormat(ctx, target, internalFormat, buffer); + int count = ctx->Driver.QuerySamplesForFormat(ctx, target, + internalFormat, buffer); int limit = count ? buffer[0] : -1; return samples > limit ? GL_INVALID_OPERATION : GL_NO_ERROR; @@ -159,7 +162,8 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target, * * And when describing the operation of TexImage*Multisample: * - * "The error INVALID_OPERATION may be generated if any of the following are true: + * "The error INVALID_OPERATION may be generated if any of the following + * are true: * * * <internalformat> is a depth/stencil-renderable format and <samples> * is greater than the value of MAX_DEPTH_TEXTURE_SAMPLES @@ -171,7 +175,8 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target, if (ctx->Extensions.ARB_texture_multisample) { if (_mesa_is_enum_format_integer(internalFormat)) - return samples > ctx->Const.MaxIntegerSamples ? GL_INVALID_OPERATION : GL_NO_ERROR; + return samples > ctx->Const.MaxIntegerSamples + ? GL_INVALID_OPERATION : GL_NO_ERROR; if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) { diff --git a/mesalib/src/mesa/state_tracker/st_cb_condrender.c b/mesalib/src/mesa/state_tracker/st_cb_condrender.c index 3a5835ecd..8776985f9 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_condrender.c +++ b/mesalib/src/mesa/state_tracker/st_cb_condrender.c @@ -76,12 +76,12 @@ st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, m = PIPE_RENDER_COND_WAIT; } - cso_set_render_condition(st->cso_context, stq->pq, m); + cso_set_render_condition(st->cso_context, stq->pq, FALSE, m); } /** - * Called via ctx->Driver.BeginConditionalRender() + * Called via ctx->Driver.EndConditionalRender() */ static void st_EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q) @@ -91,7 +91,7 @@ st_EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q) st_flush_bitmap_cache(st); - cso_set_render_condition(st->cso_context, NULL, 0); + cso_set_render_condition(st->cso_context, NULL, FALSE, 0); } 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 */ |