aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fontconfig/INSTALL2
-rw-r--r--fontconfig/README11
-rw-r--r--fontconfig/configure.ac4
-rw-r--r--fontconfig/fontconfig/fontconfig.h4
-rw-r--r--mesalib/configure.ac6
-rw-r--r--mesalib/include/GL/internal/dri_interface.h4
-rw-r--r--mesalib/scons/llvm.py7
-rw-r--r--mesalib/src/gallium/auxiliary/Makefile.sources2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_cpu_detect.h12
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_etc.c25
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h14
-rw-r--r--mesalib/src/glsl/.gitignore2
-rw-r--r--mesalib/src/mesa/Makefile.am5
-rw-r--r--mesalib/src/mesa/main/drawpix.c2
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.c32
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.h9
-rw-r--r--mesalib/src/mesa/main/texcompress_etc_tmp.h34
-rw-r--r--mesalib/src/mesa/main/teximage.c4
-rw-r--r--xorg-server/Xext/panoramiX.c5
-rw-r--r--xorg-server/Xext/xvmc.c8
-rw-r--r--xorg-server/configure.ac4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Extensions.h8
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2ext.c9
-rw-r--r--xorg-server/hw/xwin/Makefile.am1
-rw-r--r--xorg-server/hw/xwin/README141
-rw-r--r--xorg-server/hw/xwin/makefile1
-rw-r--r--xorg-server/hw/xwin/man/XWin.man26
-rw-r--r--xorg-server/hw/xwin/win.h3
-rw-r--r--xorg-server/hw/xwin/winblock.c2
-rw-r--r--xorg-server/hw/xwin/winclipboard.h7
-rw-r--r--xorg-server/hw/xwin/winclipboardinit.c2
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c6
-rw-r--r--xorg-server/hw/xwin/winclipboardunicode.c85
-rw-r--r--xorg-server/hw/xwin/winclipboardwndproc.c7
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c12
-rw-r--r--xorg-server/hw/xwin/winclipboardxevents.c14
-rw-r--r--xorg-server/hw/xwin/wincreatewnd.c115
-rw-r--r--xorg-server/hw/xwin/windialogs.c8
-rw-r--r--xorg-server/hw/xwin/winerror.c2
-rw-r--r--xorg-server/hw/xwin/winkeyhook.c18
-rw-r--r--xorg-server/hw/xwin/winmonitors.c2
-rw-r--r--xorg-server/hw/xwin/winmonitors.h28
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c75
-rw-r--r--xorg-server/hw/xwin/winprocarg.c5
-rw-r--r--xorg-server/hw/xwin/winscrinit.c4
-rw-r--r--xorg-server/hw/xwin/winwndproc.c29
-rw-r--r--xorg-server/include/extinit.h32
-rw-r--r--xorg-server/include/os.h10
-rw-r--r--xorg-server/os/utils.c73
-rw-r--r--xorg-server/randr/rrprovider.c47
-rw-r--r--xorg-server/randr/rrproviderproperty.c78
-rw-r--r--xorg-server/randr/rrscreen.c21
-rw-r--r--xorg-server/xkb/ddxList.c6
-rw-r--r--xorg-server/xkb/ddxLoad.c75
54 files changed, 509 insertions, 639 deletions
diff --git a/fontconfig/INSTALL b/fontconfig/INSTALL
index f3cf9f805..670add1f3 100644
--- a/fontconfig/INSTALL
+++ b/fontconfig/INSTALL
@@ -32,7 +32,7 @@ important steps:
6. Update the fontconfig documentation
- scp -rp doc/fontconfig-user.html doc/fontconfig-devel fontconfig.org:/srv/www.freedesktop.org/www/software/fontconfig
+ scp -rp doc/fontconfig-user.html doc/fontconfig-devel freedesktop.org:/srv/www.freedesktop.org/www/software/fontconfig
7. Compute md5sums for release files:
md5sum fontconfig-2.4.x.tar.gz ChangeLog-2.4.x
diff --git a/fontconfig/README b/fontconfig/README
index 12ef05614..624ffa4ce 100644
--- a/fontconfig/README
+++ b/fontconfig/README
@@ -1,12 +1,21 @@
Fontconfig
Font configuration and customization library
- Version 2.9.92 (2.10 RC2)
+ Version 2.10.0
2012-03-11
Check INSTALL for compilation and installation instructions.
Report bugs to https://bugs.freedesktop.org in the fontconfig module.
+2.10.0
+
+Akira TAGOH (5):
+ Bug 34266 - configs silently ignored if libxml2 doesn't support SAX1 interface
+ Update CaseFolding.txt to Unicode 6.1
+ Fix a build fail with gcc 2.95, not supporting the flexible array members.
+ Bump libtool revision
+ Update INSTALL
+
2.9.92 (2.10 RC2)
Akira TAGOH (9):
diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac
index 12e4d5a6c..8aa3d6ba7 100644
--- a/fontconfig/configure.ac
+++ b/fontconfig/configure.ac
@@ -34,7 +34,7 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h
-AM_INIT_AUTOMAKE(fontconfig, 2.9.92)
+AM_INIT_AUTOMAKE(fontconfig, 2.10.0)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
dnl libtool versioning
@@ -43,7 +43,7 @@ dnl bump revision when fixing bugs
dnl bump current and age, reset revision to zero when adding APIs
dnl bump current, leave age, reset revision to zero when changing/removing APIS
LIBT_CURRENT=7
-LIBT_REVISION=1
+LIBT_REVISION=2
AC_SUBST(LIBT_CURRENT)
AC_SUBST(LIBT_REVISION)
LIBT_AGE=6
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 8980b3142..41af47074 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -51,8 +51,8 @@ typedef int FcBool;
*/
#define FC_MAJOR 2
-#define FC_MINOR 9
-#define FC_REVISION 92
+#define FC_MINOR 10
+#define FC_REVISION 0
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 9227474f1..1d60957af 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -1847,9 +1847,9 @@ if test "x$enable_gallium_llvm" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
else
- LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
+ LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter mcjit`"
if test "x$enable_opencl" = xyes; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs ipo linker instrumentation`"
+ LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs ipo linker instrumentation`"
fi
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
@@ -2007,7 +2007,7 @@ if test "x$with_gallium_drivers" != x; then
USE_R600_LLVM_COMPILER=yes;
fi
if test "x$enable_opencl" = xyes -a "x$with_llvm_shared_libs" = xno; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs bitreader asmparser`"
+ LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs bitreader asmparser`"
fi
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
;;
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h
index bcdd7f605..9aef95860 100644
--- a/mesalib/include/GL/internal/dri_interface.h
+++ b/mesalib/include/GL/internal/dri_interface.h
@@ -916,7 +916,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 4
+#define __DRI_IMAGE_VERSION 5
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -950,6 +950,8 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_ATTRIB_HANDLE 0x2001
#define __DRI_IMAGE_ATTRIB_NAME 0x2002
#define __DRI_IMAGE_ATTRIB_FORMAT 0x2003 /* available in versions 3+ */
+#define __DRI_IMAGE_ATTRIB_WIDTH 0x2004 /* available in versions 5+ */
+#define __DRI_IMAGE_ATTRIB_HEIGHT 0x2005
typedef struct __DRIimageRec __DRIimage;
typedef struct __DRIimageExtensionRec __DRIimageExtension;
diff --git a/mesalib/scons/llvm.py b/mesalib/scons/llvm.py
index 8222c5b45..f87766af1 100644
--- a/mesalib/scons/llvm.py
+++ b/mesalib/scons/llvm.py
@@ -178,7 +178,12 @@ def generate(env):
pass
env.MergeFlags(cppflags)
- env.ParseConfig('llvm-config --libs engine bitwriter')
+ components = ['engine', 'bitwriter', 'x86asmprinter']
+
+ if llvm_version >= distutils.version.LooseVersion('3.1'):
+ components.append('mcjit')
+
+ env.ParseConfig('llvm-config --libs ' + ' '.join(components))
env.ParseConfig('llvm-config --ldflags')
except OSError:
print 'scons: llvm-config version %s failed' % llvm_version
diff --git a/mesalib/src/gallium/auxiliary/Makefile.sources b/mesalib/src/gallium/auxiliary/Makefile.sources
index 28a176d68..2807c780d 100644
--- a/mesalib/src/gallium/auxiliary/Makefile.sources
+++ b/mesalib/src/gallium/auxiliary/Makefile.sources
@@ -165,6 +165,7 @@ GALLIVM_SOURCES := \
gallivm/lp_bld_conv.c \
gallivm/lp_bld_flow.c \
gallivm/lp_bld_format_aos.c \
+ gallivm/lp_bld_format_aos_array.c \
gallivm/lp_bld_format_soa.c \
gallivm/lp_bld_format_yuv.c \
gallivm/lp_bld_gather.c \
@@ -187,7 +188,6 @@ GALLIVM_SOURCES := \
gallivm/lp_bld_type.c \
draw/draw_llvm.c \
draw/draw_llvm_sample.c \
- draw/draw_llvm_translate.c \
draw/draw_vs_llvm.c \
draw/draw_pt_fetch_shade_pipeline_llvm.c
diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
index 856e8d7a0..b44d9d9a0 100644
--- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
+++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
@@ -35,9 +35,16 @@
#ifndef _UTIL_CPU_DETECT_H
#define _UTIL_CPU_DETECT_H
+
#include "pipe/p_compiler.h"
#include "pipe/p_config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct util_cpu_caps {
unsigned nr_cpus;
@@ -66,4 +73,9 @@ util_cpu_caps;
void util_cpu_detect(void);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _UTIL_CPU_DETECT_H */
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_etc.c b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
index 7500e1ed6..f909b1608 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_etc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
@@ -13,30 +13,7 @@
void
util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
- struct etc1_block block;
- unsigned x, y, i, j;
-
- for (y = 0; y < height; y += bh) {
- const uint8_t *src = src_row;
-
- for (x = 0; x < width; x+= bw) {
- etc1_parse_block(&block, src);
-
- for (j = 0; j < bh; j++) {
- uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
- for (i = 0; i < bw; i++) {
- etc1_fetch_texel(&block, i, j, dst);
- dst[3] = 255;
- dst += comps;
- }
- }
-
- src += bs;
- }
-
- src_row += src_stride;
- }
+ etc1_unpack_rgba8888(dst_row, dst_stride, src_row, src_stride, width, height);
}
void
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index f35c35ffe..90b421ed8 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -477,6 +477,20 @@ unsigned ffs( unsigned u )
#endif /* FFS_DEFINED */
+/**
+ * Find last bit set in a word. The least significant bit is 1.
+ * Return 0 if no bits are set.
+ */
+static INLINE unsigned util_last_bit(unsigned u)
+{
+ unsigned r = 0;
+ while (u) {
+ r++;
+ u >>= 1;
+ }
+ return r;
+}
+
/* Destructively loop over all of the bits in a mask as in:
*
diff --git a/mesalib/src/glsl/.gitignore b/mesalib/src/glsl/.gitignore
index eae909cd3..5b4fc6c9c 100644
--- a/mesalib/src/glsl/.gitignore
+++ b/mesalib/src/glsl/.gitignore
@@ -1,8 +1,6 @@
glsl_compiler
glsl_lexer.cc
-glsl_lexer.cpp
glsl_parser.cc
-glsl_parser.cpp
glsl_parser.h
glsl_parser.output
builtin_function.cpp
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index 54c1bf8ad..2b023d727 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -98,8 +98,9 @@ noinst_LTLIBRARIES = libmesa.la libmesagallium.la
SRCDIR = $(top_srcdir)/src/mesa
include sources.mak
-AM_CFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CFLAGS)
-AM_CXXFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CXXFLAGS)
+AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CFLAGS = $(LLVM_CFLAGS)
+AM_CXXFLAGS = $(LLVM_CFLAGS)
# cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a configure substitution
MESA_ASM_FILES_FOR_ARCH =
diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c
index def55dddd..fdcbcccde 100644
--- a/mesalib/src/mesa/main/drawpix.c
+++ b/mesalib/src/mesa/main/drawpix.c
@@ -240,7 +240,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
}
if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyPixels(multisample FBO)");
goto end;
}
diff --git a/mesalib/src/mesa/main/texcompress_etc.c b/mesalib/src/mesa/main/texcompress_etc.c
index 5b331a92a..c645f52b9 100644
--- a/mesalib/src/mesa/main/texcompress_etc.c
+++ b/mesalib/src/mesa/main/texcompress_etc.c
@@ -69,3 +69,35 @@ _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
texel[BCOMP] = UBYTE_TO_FLOAT(dst[2]);
texel[ACOMP] = 1.0f;
}
+
+/**
+ * Decode texture data in format `MESA_FORMAT_ETC1_RGB8` to
+ * `MESA_FORMAT_ABGR8888`.
+ *
+ * The size of the source data must be a multiple of the ETC1 block size,
+ * which is 8, even if the texture image's dimensions are not aligned to 4.
+ * From the GL_OES_compressed_ETC1_RGB8_texture spec:
+ * The texture is described as a number of 4x4 pixel blocks. If the
+ * texture (or a particular mip-level) is smaller than 4 pixels in
+ * any dimension (such as a 2x2 or a 8x1 texture), the texture is
+ * found in the upper left part of the block(s), and the rest of the
+ * pixels are not used. For instance, a texture of size 4x2 will be
+ * placed in the upper half of a 4x4 block, and the lower half of the
+ * pixels in the block will not be accessed.
+ *
+ * \param src_width in pixels
+ * \param src_height in pixels
+ * \param dst_stride in bytes
+ */
+void
+_mesa_etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned src_width,
+ unsigned src_height)
+{
+ etc1_unpack_rgba8888(dst_row, dst_stride,
+ src_row, src_stride,
+ src_width, src_height);
+}
diff --git a/mesalib/src/mesa/main/texcompress_etc.h b/mesalib/src/mesa/main/texcompress_etc.h
index 8e8427f8f..411e1540d 100644
--- a/mesalib/src/mesa/main/texcompress_etc.h
+++ b/mesalib/src/mesa/main/texcompress_etc.h
@@ -24,6 +24,7 @@
#ifndef TEXCOMPRESS_ETC1_H
#define TEXCOMPRESS_ETC1_H
+#include <inttypes.h>
#include "glheader.h"
#include "mfeatures.h"
#include "texstore.h"
@@ -37,4 +38,12 @@ void
_mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
+void
+_mesa_etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned src_width,
+ unsigned src_height);
+
#endif
diff --git a/mesalib/src/mesa/main/texcompress_etc_tmp.h b/mesalib/src/mesa/main/texcompress_etc_tmp.h
index 5c8c6decf..8bbb2cde8 100644
--- a/mesalib/src/mesa/main/texcompress_etc_tmp.h
+++ b/mesalib/src/mesa/main/texcompress_etc_tmp.h
@@ -134,3 +134,37 @@ TAG(etc1_fetch_texel)(const struct TAG(etc1_block) *block,
dst[1] = TAG(etc1_clamp)(base_color[1], modifier);
dst[2] = TAG(etc1_clamp)(base_color[2], modifier);
}
+
+static void
+etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned width,
+ unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
+ struct etc1_block block;
+ unsigned x, y, i, j;
+
+ for (y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+
+ for (x = 0; x < width; x+= bw) {
+ etc1_parse_block(&block, src);
+
+ for (j = 0; j < bh; j++) {
+ uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
+ for (i = 0; i < bw; i++) {
+ etc1_fetch_texel(&block, i, j, dst);
+ dst[3] = 255;
+ dst += comps;
+ }
+ }
+
+ src += bs;
+ }
+
+ src_row += src_stride;
+ }
+}
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 126386ebe..64b25a82d 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -2005,7 +2005,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
@@ -2130,7 +2130,7 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c
index 070f54d7a..6eefa9789 100644
--- a/xorg-server/Xext/panoramiX.c
+++ b/xorg-server/Xext/panoramiX.c
@@ -1051,14 +1051,15 @@ int
ProcXineramaQueryScreens(ClientPtr client)
{
/* REQUEST(xXineramaQueryScreensReq); */
+ CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
xXineramaQueryScreensReply rep;
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
- rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
+ rep.length = bytes_to_int32(number * sz_XineramaScreenInfo);
+ rep.number = number;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c
index 8d93cc3b0..5f0123b32 100644
--- a/xorg-server/Xext/xvmc.c
+++ b/xorg-server/Xext/xvmc.c
@@ -135,6 +135,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
xvmcSurfaceInfo info;
XvMCAdaptorPtr adaptor = NULL;
XvMCSurfaceInfoPtr surface;
+ int num_surfaces;
REQUEST(xvmcListSurfaceTypesReq);
REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq);
@@ -154,16 +155,17 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
}
}
+ num_surfaces = (adaptor) ? adaptor->num_surfaces : 0;
rep = (xvmcListSurfaceTypesReply) {
.type = X_Reply,
.sequenceNumber = client->sequence,
- .num = (adaptor) ? adaptor->num_surfaces : 0,
- .length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo)),
+ .num = num_surfaces,
+ .length = bytes_to_int32(num_surfaces * sizeof(xvmcSurfaceInfo)),
};
WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep);
- for (i = 0; i < rep.num; i++) {
+ for (i = 0; i < num_surfaces; i++) {
surface = adaptor->surfaces[i];
info.surface_type_id = surface->surface_type_id;
info.chroma_format = surface->chroma_format;
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 64561928e..bf6868e00 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.12.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2012-07-10"
+AC_INIT([xorg-server], 1.12.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2012-07-17"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/xorg-server/hw/xfree86/common/xf86Extensions.h b/xorg-server/hw/xfree86/common/xf86Extensions.h
index 9b8448d64..cad86c881 100644
--- a/xorg-server/hw/xfree86/common/xf86Extensions.h
+++ b/xorg-server/hw/xfree86/common/xf86Extensions.h
@@ -29,25 +29,25 @@
#include "extnsionst.h"
#ifdef XF86DRI
-extern Bool noXFree86DRIExtension;
+extern _X_EXPORT Bool noXFree86DRIExtension;
extern void XFree86DRIExtensionInit(void);
#endif
#ifdef DRI2
#include <X11/extensions/dri2proto.h>
-extern Bool noDRI2Extension;
+extern _X_EXPORT Bool noDRI2Extension;
extern void DRI2ExtensionInit(void);
#endif
#ifdef XF86VIDMODE
#include <X11/extensions/xf86vmproto.h>
-extern Bool noXFree86VidModeExtension;
+extern _X_EXPORT Bool noXFree86VidModeExtension;
extern void XFree86VidModeExtensionInit(void);
#endif
#ifdef XFreeXDGA
#include <X11/extensions/xf86dgaproto.h>
-extern Bool noXFree86DGAExtension;
+extern _X_EXPORT Bool noXFree86DGAExtension;
extern void XFree86DGAExtensionInit(void);
extern void XFree86DGARegister(void);
#endif
diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c
index eb6fd44fc..ee610c0ec 100644
--- a/xorg-server/hw/xfree86/dri2/dri2ext.c
+++ b/xorg-server/hw/xfree86/dri2/dri2ext.c
@@ -550,15 +550,16 @@ static int
ProcDRI2GetParam(ClientPtr client)
{
REQUEST(xDRI2GetParamReq);
- xDRI2GetParamReply rep;
+ xDRI2GetParamReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
DrawablePtr pDrawable;
CARD64 value;
int status;
REQUEST_SIZE_MATCH(xDRI2GetParamReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
if (!validDrawable(client, stuff->drawable, DixReadAccess,
&pDrawable, &status))
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index f593ac12f..50f99b68c 100644
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -5,7 +5,6 @@ SRCS_CLIPBOARD = \
winclipboardinit.c \
winclipboardtextconv.c \
winclipboardthread.c \
- winclipboardunicode.c \
winclipboardwndproc.c \
winclipboardwrappers.c \
winclipboardxevents.c
diff --git a/xorg-server/hw/xwin/README b/xorg-server/hw/xwin/README
deleted file mode 100644
index 9f7090344..000000000
--- a/xorg-server/hw/xwin/README
+++ /dev/null
@@ -1,141 +0,0 @@
-Cygwin/X Release Notes
-======================
-
-Release X11R6.7
-===============
-
-Cygwin/X has continued its rapid pace of development that it has sustained
-since Spring 2001 and this release shows it, we now have: a stable and fast
-multi-window mode, seamless clipboard integration, a configurable tray menu
-icon, popups on error messages pointing users to the log file and our mailing
-list, the beginnings of indirect 3D acceleration for OpenGL applications,
-improved non-US keyboard and clipboard support, and only a handful of bugs
-that continue to be reported.
-
-Between the XFree86 4.3.0 release and the X.Org X11R6.7 release the Cyg-
-win/XFree86 project broke away from The XFree86 Project, Inc. due to a lack
-of support from the XFree86 project. As such, the Cygwin/XFree86 project was
-renamed to the Cygwin/X project and the upstream source code tree that Cyg-
-win/X pulls from and pushes to is now the tree managed by the X.Org Founda-
-tion. The Cygwin/X project has seen a rush of development and interest in
-the project since the split; one metric showing this is that the number of
-CVS committers we have has gone from zero to six.
-
-The most outstanding features of this release are
-
- o Major multi-window mode improvements. (Takuma Murakami, Earle F.
- Philhower III)
-
- o Initial work of accelerated OpenGL using the windows OpenGL drivers.
- (Alexander Gottwald)
-
- o Massive rework of clipboard integration with windows. (Harold L Hunt II,
- Kensuke Matsuzaki)
-
- o Improved Japanese clipboard and keyboard support. (Kensuke Matsuzaki,
- Takuma Murakami, Alexander Gottwald)
-
- o Customizable tray menu icon allowing shortcuts to start programs,
- etc.(Earle F. Philhower III)
-
- o New icons. (Jehan Bing, Michael Bax, Benjamin Rienfenstahl)
-
- o Fix some multi-monitor problems.(Takuma Murakami)
-
- o Fix repeated key strokes. (Ivan Pascal)
-
- o Automatic keyboard layouts for the most frequently used keyboard lay-
- outs. (Alexander Gottwald)
-
- o Built in SHM support with detection of the SHM engine (cygserver).
- (Ralf Habacker, Harold L Hunt II)
-
- o Merged in work on the NativeGDI engine. (Alan Hourihane)
-
-OpenGL with Cygwin/X
-====================
-
-Cygwin/X has supported GLX only with software rendering provided by the Mesa
-library. Starting with X11R6.7 we add support for hardware accelerated OpenGL.
-
-This support is still under development and still has some bigger problems.
-To provide both versions (the stable software rendering and the new hardware
-accelerated) we ship to binaries. XWin.exe contains the software rendering
-and XWin_GL.exe uses the hardware acceleration provided by the windows drivers.
-
-The known problems with hardware accelerated OpenGL are:
-
- o Only multiwindow mode is useful. In the other modes the OpenGL output
- does not align with the X11 windows.
-
- o Using two programs which require different visuals will fail. For example
- glxgears and glxinfo will not work without restarting XWin_GL.exe.
-
- o OpenGL extensions and functions from OpenGL 1.2 and later should work
- but are not completely tested.
-
- o The standard Windows OpenGL driver will produce no output. Use the one
- from your video adapter vendor.
-
-If you notice problems with some programs please send a message with the
-logfile /tmp/XWin.log and a short error description to <cygwin-xfree@cygwin.com>
-
-The hardware accelerated OpenGL was tested using:
-
- o glxgears
- o glxinfo
- o blender
- o tuxkart
- o GLUT demos (some did fail)
- o tuxracer (currently not working)
-
-
-Release X11R6.8
-===============
-
-Having reached a quite mature state in release X11R6.7 the development
-has slowed down a little bit. Some of the former active developers have
-retired or cut their work for the Cygwin/X project due to conflicts with
-job, study and family.
-
-The X11R6.8 release now includes major improvements from the xserver project.
-This includes the XFixes, Damage, Composite and XEVIE extension which is a
-major step towards allowing Cygwin/X to have real transparency.
-
-But at the current state Composite is not working with Cygwin/X. Not all code
-in the Cygwin/X Server has been updated to support the Composite feature and
-using it will even crash the xserver. But as a second problem nearly all
-functions required for compositing are lacking acceleration in Cygwin/X so
-the feature would not be very useful if it would work. So it is disabled by
-default.
-
-OpenGL with Cygwin/X
-====================
-
-The OpenGL support has lost some of it's limitations from the last release
-and should be much more stable. But due to missing wide spread testing in
-the community it is still available in a separate program. XWin still uses
-the old software OpenGL which is known to be stable.
-
-The known problems with hardware accelerated OpenGL are:
-
- o Only multiwindow mode is useful. In the other modes the OpenGL output
- does not align with the X11 windows.
-
- o OpenGL extensions and functions from OpenGL 1.2 and later should work
- but are not completely tested.
-
- o The standard Windows OpenGL driver will produce no output. Use the one
- from your video adapter vendor.
-
-If you notice problems with some programs please send a message with the
-logfile /tmp/XWin.log and a short error description to <cygwin-xfree@cygwin.com>
-
-The hardware accelerated OpenGL was tested using:
-
- o glxgears
- o glxinfo
- o blender
- o tuxkart
- o GLUT demos (some did fail)
-
diff --git a/xorg-server/hw/xwin/makefile b/xorg-server/hw/xwin/makefile
index 6492e3a07..8523d0f26 100644
--- a/xorg-server/hw/xwin/makefile
+++ b/xorg-server/hw/xwin/makefile
@@ -14,7 +14,6 @@ SRCS_CLIPBOARD = \
winclipboardinit.c \
winclipboardtextconv.c \
winclipboardthread.c \
- winclipboardunicode.c \
winclipboardwndproc.c \
winclipboardwrappers.c \
winclipboardxevents.c
diff --git a/xorg-server/hw/xwin/man/XWin.man b/xorg-server/hw/xwin/man/XWin.man
index d03a36521..dbadad6f5 100644
--- a/xorg-server/hw/xwin/man/XWin.man
+++ b/xorg-server/hw/xwin/man/XWin.man
@@ -313,18 +313,22 @@ exit silently and don't display any error message.
.B "\-xkbvariant \fIvariant\fp"
These options configure the xkeyboard extension to load
a particular keyboard map as the X server starts. The behavior is similar
-to the \fIsetxkbmap\fP program. The layout data is located at \fI
-__datadir__/X11/xkb/\fP. Additional information is found in the
-README files therein and in the man page of \fIsetxkbmap\fP. For example
-in order to load a German layout for a pc105 keyboard one uses
-the options:
+to the \fIsetxkbmap\fP(1) program.
+
+See the \fIxkeyboard-config\fP(__miscmansuffix__) manual page for a list of
+keyboard configurations.
+
+The keyboard layout data is located at \fI__datadir__/X11/xkb/\fP. Additional information
+can be found in the README files there and in the \fIsetxkbmap\fP(1) manual page.
+
+For example, in order to load a German layout for a pc105 keyboard, use the options:
.br
.I " \-xkblayout de \-xkbmodel pc105"
-Alternatively one may use the \fIsetxkbmap\fP program after \fIXWin\fP is
+Alternatively, you can use the \fIsetxkbmap\fP(1) program after \fIXWin\fP is
running.
-The default is to select a configuration matching your current layout as
+The default is to select a keyboard configuration matching your current layout as
reported by \fIWindows\fP, if known, or the default X server configuration
if no matching keyboard configuration was found.
@@ -370,7 +374,7 @@ window, in both the generic case and for particular programs.
* To change the style that is associated to the \fIWindows\fP window that
\fXWin I-multiwindow\fP produces for each top-level X window.
.PP
-The format of the \fI.XWinrc\fP file is given in the man page XWinrc(5).
+The format of the \fI.XWinrc\fP file is given in the XWinrc(5) manual page.
.SH EXAMPLES
Need some examples
@@ -378,15 +382,15 @@ Need some examples
.SH "SEE ALSO"
X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1), XWinrc(__filemansuffix__),
-setxkbmap(1), xkeyboard-config (__miscmansuffix__).
+setxkbmap(1), xkeyboard-config(__miscmansuffix__).
.SH BUGS
.I XWin
-and this man page still have many limitations.
+and this manual page still have many limitations.
The \fIXWin\fP software is continuously developing; it is therefore possible that
-this man page is not up to date. It is always prudent to
+this manual page is not up to date. It is always prudent to
look also at the output of \fIXWin -help\fP in order to
check the options that are operative.
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index b49859ddc..965be46f1 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -349,8 +349,7 @@ typedef struct {
DWORD dwScreen;
int iMonitor;
- HMONITOR hMonitor;
-
+ HMONITOR hMonitor;
DWORD dwUserWidth;
DWORD dwUserHeight;
DWORD dwWidth;
diff --git a/xorg-server/hw/xwin/winblock.c b/xorg-server/hw/xwin/winblock.c
index c1a6e705a..480e3bd48 100644
--- a/xorg-server/hw/xwin/winblock.c
+++ b/xorg-server/hw/xwin/winblock.c
@@ -58,7 +58,7 @@ winBlockHandler(ScreenPtr pScreen,
if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) {
int iReturn;
- winDebug("winBlockHandler - Releasing pmServerStarted\n");
+ ErrorF("winBlockHandler - pthread_mutex_unlock()\n");
/* Flag that modules are to be started */
pScreenPriv->fServerStarted = TRUE;
diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h
index d430b343f..a267dec7c 100644
--- a/xorg-server/hw/xwin/winclipboard.h
+++ b/xorg-server/hw/xwin/winclipboard.h
@@ -110,13 +110,6 @@ void
winDeinitClipboard(void);
/*
- * winclipboardunicode.c
- */
-
-Bool
- winClipboardDetectUnicodeSupport(void);
-
-/*
* winclipboardwndproc.c
*/
diff --git a/xorg-server/hw/xwin/winclipboardinit.c b/xorg-server/hw/xwin/winclipboardinit.c
index 1ddb35775..90fcf0086 100644
--- a/xorg-server/hw/xwin/winclipboardinit.c
+++ b/xorg-server/hw/xwin/winclipboardinit.c
@@ -61,7 +61,7 @@ extern HWND g_hwndClipboard;
Bool
winInitClipboard(void)
{
- winDebug ("winInitClipboard ()\n");
+ winDebug("winInitClipboard ()\n");
/* Wrap some internal server functions */
if (ProcVector[X_SetSelectionOwner] != winProcSetSelectionOwner) {
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 50643149b..eb32db88c 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -67,7 +67,6 @@ static jmp_buf g_jmpEntry;
static XIOErrorHandler g_winClipboardOldIOErrorHandler;
static pthread_t g_winClipboardProcThread;
-Bool g_fUnicodeSupport = FALSE;
Bool g_fUseUnicode = FALSE;
/*
@@ -112,11 +111,8 @@ winClipboardProc(void *pvNotUsed)
winDebug ("winClipboardProc - Hello\n");
- /* Do we have Unicode support? */
- g_fUnicodeSupport = winClipboardDetectUnicodeSupport();
-
/* Do we use Unicode clipboard? */
- fUseUnicode = g_fUnicodeClipboard && g_fUnicodeSupport;
+ fUseUnicode = g_fUnicodeClipboard;
/* Save the Unicode support flag in a global */
g_fUseUnicode = fUseUnicode;
diff --git a/xorg-server/hw/xwin/winclipboardunicode.c b/xorg-server/hw/xwin/winclipboardunicode.c
deleted file mode 100644
index 530ad9a01..000000000
--- a/xorg-server/hw/xwin/winclipboardunicode.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
- *
- * Authors: Harold L Hunt II
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "winclipboard.h"
-
-/*
- * Determine whether we suport Unicode or not.
- * NOTE: Currently, just check if we are on an NT-based platform or not.
- */
-
-Bool
-winClipboardDetectUnicodeSupport(void)
-{
- Bool fReturn = FALSE;
- OSVERSIONINFOEX osvi = { 0 };
-
- /* Get operating system version information */
- osvi.dwOSVersionInfoSize = sizeof(osvi);
- GetVersionEx ((LPOSVERSIONINFO)&osvi);
-
- /* Branch on platform ID */
- switch (osvi.dwPlatformId) {
- case VER_PLATFORM_WIN32_NT:
- if (osvi.dwMajorVersion >= 6)
- {
- if (osvi.wProductType == VER_NT_WORKSTATION)
- winDebug ("OS: Windows Vista\n");
- else
- winDebug ("OS: Windows Server 2008\n");
- fReturn = TRUE;
- }
- else if (osvi.dwMajorVersion == 5)
- {
- if (osvi.dwMinorVersion == 2)
- {
- winDebug ("OS: Windows 2003\n");
- fReturn = TRUE;
- }
- else if (osvi.dwMinorVersion == 1)
- {
- winDebug ("OS: Windows XP\n");
- fReturn = TRUE;
- }
- else if (osvi.dwMinorVersion == 0) winDebug ("OS: Windows 2000\n");
- }
- else if (osvi.dwMajorVersion <= 4) winDebug ("OS: Windows NT\n");
- break;
-
- case VER_PLATFORM_WIN32_WINDOWS:
- winDebug ("OS: Windows 95/98/Me\n");
- break;
- }
-
- return fReturn;
-}
diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c
index 0dd39703d..00b0fe8fd 100644
--- a/xorg-server/hw/xwin/winclipboardwndproc.c
+++ b/xorg-server/hw/xwin/winclipboardwndproc.c
@@ -53,7 +53,6 @@
*/
extern Bool g_fUseUnicode;
-extern Bool g_fUnicodeSupport;
extern void *g_pClipboardDisplay;
extern Window g_iClipboardWindow;
extern Atom g_atomLastOwnedSelection;
@@ -66,6 +65,7 @@ extern Bool g_fClipboardPrimary;
static int
+
winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
Bool fUseUnicode, int iTimeoutSec);
@@ -421,7 +421,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (message == WM_RENDERALLFORMATS)
fConvertToUnicode = FALSE;
else
- fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
+ fConvertToUnicode = (CF_UNICODETEXT == wParam);
/* Request the selection contents */
iReturn = XConvertSelection(pDisplay,
@@ -472,8 +472,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (WIN_XEVENTS_NOTIFY != iReturn) {
ErrorF("winClipboardWindowProc - winProcessXEventsTimeout should have returned WIN_XEVENTS_NOTIFY was %d\n",iReturn);
/* Paste no data, to satisfy required call to SetClipboardData */
- if (g_fUnicodeSupport)
- SetClipboardData(CF_UNICODETEXT, NULL);
+ SetClipboardData(CF_UNICODETEXT, NULL);
SetClipboardData(CF_TEXT, NULL);
ErrorF
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index 4005bf176..247c8ea43 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -59,7 +59,6 @@ DISPATCH_PROC(winProcSetSelectionOwner);
* References to external symbols
*/
-extern Bool g_fUnicodeSupport;
extern int g_iNumScreens;
extern unsigned int g_uiAuthDataLen;
extern char *g_pAuthData;
@@ -89,7 +88,8 @@ winProcEstablishConnection(ClientPtr client)
static unsigned long s_ulServerGeneration = 0;
#ifdef WINDBG
- if (s_iCallCount == 0) winDebug ("winProcEstablishConnection - Hello\n");
+ if (s_iCallCount == 0)
+ winDebug("winProcEstablishConnection - Hello\n");
#endif
/* Do nothing if clipboard is not enabled */
@@ -327,12 +327,8 @@ winProcSetSelectionOwner(ClientPtr client)
}
winDebug("winProcSetSelectionOwner - SetClipboardData NULL\n");
-
- /* Advertise Unicode if we support it */
- if (g_fUnicodeSupport)
- SetClipboardData(CF_UNICODETEXT, NULL);
-
- /* Always advertise regular text */
+ /* Advertise regular text and unicode */
+ SetClipboardData(CF_UNICODETEXT, NULL);
SetClipboardData(CF_TEXT, NULL);
/* Save handle to last owned selection */
diff --git a/xorg-server/hw/xwin/winclipboardxevents.c b/xorg-server/hw/xwin/winclipboardxevents.c
index 2be03b707..910e437c2 100644
--- a/xorg-server/hw/xwin/winclipboardxevents.c
+++ b/xorg-server/hw/xwin/winclipboardxevents.c
@@ -38,13 +38,7 @@
#include "winmsg.h"
#include <unistd.h>
/*
- * References to external symbols
- */
-
-extern Bool g_fUnicodeSupport;
extern Bool g_fClipboardPrimary;
-
-/*
* Process any pending X events
*/
@@ -235,10 +229,6 @@ winClipboardFlushXEvents(HWND hwnd,
else
xiccesStyle = XStringStyle;
- /*
- * FIXME: Can't pass CF_UNICODETEXT on Windows 95/98/Me
- */
-
/* Get a pointer to the clipboard text, in desired format */
if (fUseUnicode) {
/* Retrieve clipboard data */
@@ -709,10 +699,10 @@ winClipboardFlushXEvents(HWND hwnd,
free(pwszUnicodeStr);
if (hGlobal && pszGlobalData)
GlobalUnlock(hGlobal);
- if (fSetClipboardData && g_fUnicodeSupport)
+ if (fSetClipboardData) {
SetClipboardData(CF_UNICODETEXT, NULL);
- if (fSetClipboardData)
SetClipboardData(CF_TEXT, NULL);
+ }
return WIN_XEVENTS_NOTIFY;
/*
diff --git a/xorg-server/hw/xwin/wincreatewnd.c b/xorg-server/hw/xwin/wincreatewnd.c
index 0580421ae..597f6bc4e 100644
--- a/xorg-server/hw/xwin/wincreatewnd.c
+++ b/xorg-server/hw/xwin/wincreatewnd.c
@@ -42,7 +42,7 @@ static Bool
winGetWorkArea(RECT * prcWorkArea, winScreenInfo * pScreenInfo);
static Bool
- winAdjustForAutoHide (RECT *prcWorkArea, winScreenInfo *pScreenInfo);
+ winAdjustForAutoHide(RECT * prcWorkArea, winScreenInfo * pScreenInfo);
/*
* Create a full screen window
@@ -60,8 +60,8 @@ winCreateBoundingWindowFullScreen(ScreenPtr pScreen)
HWND *phwnd = &pScreenPriv->hwndScreen;
WNDCLASSEX wc;
char szTitle[256];
- char HostName[256];
- gethostname(HostName,256);
+ char HostName[256];
+ gethostname(HostName,256);
winDebug("winCreateBoundingWindowFullScreen\n");
@@ -93,11 +93,11 @@ winCreateBoundingWindowFullScreen(ScreenPtr pScreen)
WINDOW_TITLE_XDMCP,
g_pszQueryHost, HostName, display, (int) pScreenInfo->dwScreen);
else
- {
+ {
snprintf(szTitle,
sizeof(szTitle),
WINDOW_TITLE, HostName, display, (int) pScreenInfo->dwScreen);
- }
+ }
/* Create the window */
*phwnd = CreateWindowExA(0, /* Extended styles */
WINDOW_CLASS, /* Class name */
@@ -154,9 +154,9 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
DWORD dwWindowStyle;
BOOL fForceShowWindow = FALSE;
char szTitle[256];
- char HostName[256];
+ char HostName[256];
- gethostname(HostName,256);
+ gethostname(HostName,256);
winDebug("winCreateBoundingWindowWindowed - User w: %d h: %d\n",
(int) pScreenInfo->dwUserWidth, (int) pScreenInfo->dwUserHeight);
@@ -218,7 +218,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
winGetWorkArea(&rcWorkArea, pScreenInfo);
/* Adjust for auto-hide taskbars */
- winAdjustForAutoHide (&rcWorkArea, pScreenInfo);
+ winAdjustForAutoHide(&rcWorkArea, pScreenInfo);
/* Did the user specify a position? */
if (pScreenInfo->fUserGavePosition) {
@@ -489,33 +489,32 @@ winGetWorkArea(RECT * prcWorkArea, winScreenInfo * pScreenInfo)
int iLeft, iTop;
int iPrimaryNonWorkAreaWidth, iPrimaryNonWorkAreaHeight;
- /* Use GetMonitorInfo to get work area for monitor */
- if (!pScreenInfo->fMultipleMonitors)
- {
- MONITORINFO mi;
- mi.cbSize = sizeof(MONITORINFO);
- if (GetMonitorInfo(pScreenInfo->hMonitor, &mi))
- {
- *prcWorkArea = mi.rcWork;
-
- winDebug ("winGetWorkArea - Monitor %d WorkArea: %d %d %d %d\n",
- pScreenInfo->iMonitor,
- (int) prcWorkArea->top, (int) prcWorkArea->left,
- (int) prcWorkArea->bottom, (int) prcWorkArea->right);
- }
- else
- {
- ErrorF ("winGetWorkArea - GetMonitorInfo() failed for monitor %d\n", pScreenInfo->iMonitor);
- }
+ /* Use GetMonitorInfo to get work area for monitor */
+ if (!pScreenInfo->fMultipleMonitors) {
+ MONITORINFO mi;
- /* Bail out here if we aren't using multiple monitors */
+ mi.cbSize = sizeof(MONITORINFO);
+ if (GetMonitorInfo(pScreenInfo->hMonitor, &mi)) {
+ *prcWorkArea = mi.rcWork;
+
+ winDebug("winGetWorkArea - Monitor %d WorkArea: %d %d %d %d\n",
+ pScreenInfo->iMonitor,
+ (int) prcWorkArea->top, (int) prcWorkArea->left,
+ (int) prcWorkArea->bottom, (int) prcWorkArea->right);
+ }
+ else {
+ ErrorF("winGetWorkArea - GetMonitorInfo() failed for monitor %d\n",
+ pScreenInfo->iMonitor);
+ }
+
+ /* Bail out here if we aren't using multiple monitors */
return TRUE;
- }
+ }
- /* SPI_GETWORKAREA only gets the work area of the primary screen. */
- SystemParametersInfo (SPI_GETWORKAREA, 0, prcWorkArea, 0);
-
- winDebug ("winGetWorkArea - Primary Monitor WorkArea: %d %d %d %d\n",
+ /* SPI_GETWORKAREA only gets the work area of the primary screen. */
+ SystemParametersInfo(SPI_GETWORKAREA, 0, prcWorkArea, 0);
+
+ winDebug("winGetWorkArea - Primary Monitor WorkArea: %d %d %d %d\n",
(int) prcWorkArea->top, (int) prcWorkArea->left,
(int) prcWorkArea->bottom, (int) prcWorkArea->right);
@@ -564,34 +563,36 @@ winGetWorkArea(RECT * prcWorkArea, winScreenInfo * pScreenInfo)
}
static Bool
-winTaskbarOnScreenEdge(unsigned int uEdge, winScreenInfo *pScreenInfo)
+winTaskbarOnScreenEdge(unsigned int uEdge, winScreenInfo * pScreenInfo)
{
- APPBARDATA abd;
- HWND hwndAutoHide;
+ APPBARDATA abd;
+ HWND hwndAutoHide;
- ZeroMemory (&abd, sizeof (abd));
- abd.cbSize = sizeof (abd);
- abd.uEdge = uEdge;
+ ZeroMemory(&abd, sizeof(abd));
+ abd.cbSize = sizeof(abd);
+ abd.uEdge = uEdge;
- hwndAutoHide = (HWND) SHAppBarMessage (ABM_GETAUTOHIDEBAR, &abd);
- if (hwndAutoHide != NULL)
- {
- /*
- Found an autohide taskbar on that edge, but is it on the
- same monitor as the screen window?
- */
- if (pScreenInfo->fMultipleMonitors || (MonitorFromWindow(hwndAutoHide, MONITOR_DEFAULTTONULL) == pScreenInfo->hMonitor))
- return TRUE;
+ hwndAutoHide = (HWND) SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
+ if (hwndAutoHide != NULL) {
+ /*
+ Found an autohide taskbar on that edge, but is it on the
+ same monitor as the screen window?
+ */
+ if (pScreenInfo->fMultipleMonitors ||
+ (MonitorFromWindow(hwndAutoHide, MONITOR_DEFAULTTONULL) ==
+ pScreenInfo->hMonitor))
+ return TRUE;
}
- return FALSE;
+ return FALSE;
}
+
/*
* Adjust the client area so that any auto-hide toolbars
* will work correctly.
*/
static Bool
-winAdjustForAutoHide (RECT *prcWorkArea, winScreenInfo *pScreenInfo)
+winAdjustForAutoHide(RECT * prcWorkArea, winScreenInfo * pScreenInfo)
{
APPBARDATA abd;
@@ -605,31 +606,31 @@ winAdjustForAutoHide (RECT *prcWorkArea, winScreenInfo *pScreenInfo)
if (SHAppBarMessage(ABM_GETSTATE, &abd) & ABS_AUTOHIDE)
winDebug("winAdjustForAutoHide - Taskbar is auto hide\n");
- /*
- Despite the forgoing, we are checking for any AppBar
- hiding along a monitor edge, not just the Windows TaskBar.
- */
+ /*
+ Despite the forgoing, we are checking for any AppBar
+ hiding along a monitor edge, not just the Windows TaskBar.
+ */
/* Look for a TOP auto-hide taskbar */
- if (winTaskbarOnScreenEdge(ABE_TOP, pScreenInfo)) {
+ if (winTaskbarOnScreenEdge(ABE_TOP, pScreenInfo)) {
winDebug("winAdjustForAutoHide - Found TOP auto-hide taskbar\n");
prcWorkArea->top += 1;
}
/* Look for a LEFT auto-hide taskbar */
- if (winTaskbarOnScreenEdge(ABE_LEFT, pScreenInfo)) {
+ if (winTaskbarOnScreenEdge(ABE_LEFT, pScreenInfo)) {
winDebug("winAdjustForAutoHide - Found LEFT auto-hide taskbar\n");
prcWorkArea->left += 1;
}
/* Look for a BOTTOM auto-hide taskbar */
- if (winTaskbarOnScreenEdge(ABE_BOTTOM, pScreenInfo)) {
+ if (winTaskbarOnScreenEdge(ABE_BOTTOM, pScreenInfo)) {
winDebug("winAdjustForAutoHide - Found BOTTOM auto-hide taskbar\n");
prcWorkArea->bottom -= 1;
}
/* Look for a RIGHT auto-hide taskbar */
- if (winTaskbarOnScreenEdge(ABE_RIGHT, pScreenInfo)) {
+ if (winTaskbarOnScreenEdge(ABE_RIGHT, pScreenInfo)) {
winDebug("winAdjustForAutoHide - Found RIGHT auto-hide taskbar\n");
prcWorkArea->right -= 1;
}
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index bc6715066..7d7abcc25 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -490,7 +490,7 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
- ErrorF("winChangeDepthDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
+ winDebug("winChangeDepthDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
/*
* User dismissed the dialog, hide it until the
@@ -502,7 +502,7 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
break;
case WM_CLOSE:
- winDebug ("winChangeDepthDlgProc - WM_CLOSE\n");
+ winDebug("winChangeDepthDlgProc - WM_CLOSE\n");
DestroyWindow(g_hDlgAbout);
g_hDlgAbout = NULL;
@@ -603,7 +603,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
- winDebug ("winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
+ winDebug("winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
DestroyWindow(g_hDlgAbout);
g_hDlgAbout = NULL;
@@ -693,7 +693,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_CLOSE:
- ErrorF("winAboutDlgProc - WM_CLOSE\n");
+ winDebug("winAboutDlgProc - WM_CLOSE\n");
DestroyWindow(g_hDlgAbout);
g_hDlgAbout = NULL;
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c
index 9838fa085..d5f497fda 100644
--- a/xorg-server/hw/xwin/winerror.c
+++ b/xorg-server/hw/xwin/winerror.c
@@ -142,7 +142,7 @@ winMessageBoxF(const char *pszError, UINT uType, ...)
size = asprintf(&pszMsgBox, MESSAGEBOXF,
pszErrorF, XVENDORNAME,
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH,
- XORG_VERSION_SNAP,
+ XORG_VERSION_SNAP,
BUILDERADDR, BUILDERSTRING, g_pszCommandLine);
if (size == -1) {
diff --git a/xorg-server/hw/xwin/winkeyhook.c b/xorg-server/hw/xwin/winkeyhook.c
index 124150850..fe77b2190 100644
--- a/xorg-server/hw/xwin/winkeyhook.c
+++ b/xorg-server/hw/xwin/winkeyhook.c
@@ -133,24 +133,6 @@ winKeyboardMessageHookLL(int iCode, WPARAM wParam, LPARAM lParam)
Bool
winInstallKeyboardHookLL(void)
{
- OSVERSIONINFO osvi = { 0 };
-
- /* Get operating system version information */
- osvi.dwOSVersionInfoSize = sizeof(osvi);
- GetVersionEx(&osvi);
-
- /* Branch on platform ID */
- switch (osvi.dwPlatformId) {
- case VER_PLATFORM_WIN32_NT:
- /* Low-level is supported on NT 4.0 SP3+ only */
- /* TODO: Return FALSE on NT 4.0 with no SP, SP1, or SP2 */
- break;
-
- case VER_PLATFORM_WIN32_WINDOWS:
- /* Low-level hook is not supported on non-NT */
- return FALSE;
- }
-
/* Install the hook only once */
if (!g_hhookKeyboardLL)
g_hhookKeyboardLL = SetWindowsHookEx(WH_KEYBOARD_LL,
diff --git a/xorg-server/hw/xwin/winmonitors.c b/xorg-server/hw/xwin/winmonitors.c
index 31c7aeab0..ab8842a32 100644
--- a/xorg-server/hw/xwin/winmonitors.c
+++ b/xorg-server/hw/xwin/winmonitors.c
@@ -53,7 +53,7 @@ getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data)
data->monitorOffsetY = rect->top;
data->monitorHeight = rect->bottom - rect->top;
data->monitorWidth = rect->right - rect->left;
- data->monitorHandle = hMonitor;
+ data->monitorHandle = hMonitor;
return FALSE;
}
return TRUE;
diff --git a/xorg-server/hw/xwin/winmonitors.h b/xorg-server/hw/xwin/winmonitors.h
index 2e83b6c8e..8201e47f4 100644
--- a/xorg-server/hw/xwin/winmonitors.h
+++ b/xorg-server/hw/xwin/winmonitors.h
@@ -1,3 +1,31 @@
+/*
+
+Copyright 1993, 1998 The Open Group
+Copyright (C) Colin Harrison 2005-2008
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
/* data returned for monitor information */
struct GetMonitorInfoData {
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index c93d3efe9..31ddff8c6 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -354,8 +354,8 @@ InitQueue(WMMsgQueuePtr pQueue)
#ifdef _DEBUG
pQueue->nQueueSize = 0;
- winDebug ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
- QueueSize(pQueue));
+ winDebug("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
+ QueueSize(pQueue));
#endif
winDebug ("InitQueue - Calling pthread_mutex_init\n");
@@ -444,23 +444,23 @@ SendXMessage(Display * pDisplay, Window iWin, Atom atmType, long nData)
}
/*
- * Updates the name of a HWND according to its X WM_NAME property
+ * See if we can get the stored HWND for this window...
*/
-
-static void
-UpdateName(WMInfoPtr pWMInfo, Window iWindow)
+static HWND
+getHwnd(WMInfoPtr pWMInfo, Window iWindow)
{
- wchar_t *pszName;
Atom atmType;
int fmtRet;
unsigned long items, remain;
- HWND *retHwnd, hWnd;
- XWindowAttributes attr;
-
- hWnd = 0;
-
- /* See if we can get the cached HWND for this window... */
- if (XGetWindowProperty(pWMInfo->pDisplay, iWindow, pWMInfo->atmPrivMap, 0, 1, False, XA_INTEGER, //pWMInfo->atmPrivMap,
+ HWND *retHwnd, hWnd = NULL;
+
+ if (XGetWindowProperty(pWMInfo->pDisplay,
+ iWindow,
+ pWMInfo->atmPrivMap,
+ 0,
+ 1,
+ False,
+ XA_INTEGER,
&atmType,
&fmtRet,
&items,
@@ -473,8 +473,26 @@ UpdateName(WMInfoPtr pWMInfo, Window iWindow)
/* Some sanity checks */
if (!hWnd)
- return;
+ return NULL;
if (!IsWindow(hWnd))
+ return NULL;
+
+ return hWnd;
+}
+
+/*
+ * Updates the name of a HWND according to its X WM_NAME property
+ */
+
+static void
+UpdateName(WMInfoPtr pWMInfo, Window iWindow)
+{
+ wchar_t *pszName;
+ HWND hWnd;
+ XWindowAttributes attr;
+
+ hWnd = getHwnd(pWMInfo, iWindow);
+ if (!hWnd)
return;
/* Set the Windows window name */
@@ -499,27 +517,12 @@ UpdateName(WMInfoPtr pWMInfo, Window iWindow)
static void
PreserveWin32Stack(WMInfoPtr pWMInfo, Window iWindow, UINT direction)
{
- Atom atmType;
- int fmtRet;
- unsigned long items, remain;
- HWND hWnd, *retHwnd;
+ HWND hWnd;
DWORD myWinProcID, winProcID;
Window xWindow;
WINDOWPLACEMENT wndPlace;
- hWnd = NULL;
- /* See if we can get the cached HWND for this window... */
- if (XGetWindowProperty(pWMInfo->pDisplay, iWindow, pWMInfo->atmPrivMap, 0, 1, False, XA_INTEGER, //pWMInfo->atmPrivMap,
- &atmType,
- &fmtRet,
- &items,
- &remain, (unsigned char **) &retHwnd) == Success) {
- if (retHwnd) {
- hWnd = *retHwnd;
- XFree(retHwnd);
- }
- }
-
+ hWnd = getHwnd(pWMInfo, iWindow);
if (!hWnd)
return;
@@ -750,7 +753,7 @@ winMultiWindowXMsgProc(void *pArg)
pthread_cleanup_push(&winMultiWindowThreadExit, NULL);
- winDebug ("winMultiWindowXMsgProc - Hello\n");
+ winDebug("winMultiWindowXMsgProc - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL) {
@@ -1121,7 +1124,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
char pszDisplay[512];
int iReturn;
- winDebug ("winInitMultiWindowWM - Hello\n");
+ winDebug("winInitMultiWindowWM - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL) {
@@ -1431,9 +1434,9 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
Atom type, *pAtom = NULL;
int format;
unsigned long hint = 0, maxmin = 0, style, nitems = 0, left = 0;
- WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
+ WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
MwmHints *mwm_hint = NULL;
- WinXSizeHints SizeHints;
+ WinXSizeHints SizeHints;
if (!hWnd)
return;
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index c391dae7c..d246db82a 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -102,14 +102,15 @@ winInitializeScreenDefaults(void)
int dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
winDebug(
- "winInitializeDefaultScreens - native DPI x %d y %d\n",
+ "winInitializeScreenDefaults - native DPI x %d y %d\n",
dpiX, dpiY);
+
monitorResolution = dpiY;
ReleaseDC(NULL, hdc);
}
else {
winDebug(
- "winInitializeDefaultScreens - Failed to retrieve native DPI, falling back to default of %d DPI\n",
+ "winInitializeScreenDefaults - Failed to retrieve native DPI, falling back to default of %d DPI\n",
WIN_DEFAULT_DPI);
monitorResolution = WIN_DEFAULT_DPI;
}
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index d789e563f..bfc094fcf 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -423,7 +423,7 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv)
if (pScreen->a) { \
pScreenPriv->a = pScreen->a; \
} else { \
- ErrorF("null screen fn " #a "\n"); \
+ winDebug("winScreenInit - null screen fn " #a "\n"); \
pScreenPriv->a = NULL; \
}
@@ -457,7 +457,7 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv)
if (pScreen->a) { \
pScreenPriv->a = pScreen->a; \
} else { \
- ErrorF("null screen fn " #a "\n"); \
+ winDebug("null screen fn " #a "\n"); \
pScreenPriv->a = NULL; \
}
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 77a3a76ba..ea6679c66 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -137,7 +137,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
s_pScreenPriv->hwndScreen = hwnd;
- winInitNotifyIcon (s_pScreenPriv,FALSE);
+ winInitNotifyIcon(s_pScreenPriv,FALSE);
}
return 0;
@@ -328,14 +328,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
- case WM_SYSCOMMAND:
- if (wParam == SC_MAXIMIZE||wParam == SC_RESTORE)
- {
- winDebug("Posting WM_EXITSIZEMOVE message since windows does not send it when the maximised/restored button is clicked.\n");
- PostMessage(hwnd, WM_EXITSIZEMOVE, 0, 0);
- }
- break;
-
case WM_SIZE:
{
SCROLLINFO si;
@@ -442,6 +434,15 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
return 0;
+ case WM_SYSCOMMAND:
+ if ((wParam & 0xfff0) == SC_MAXIMIZE ||
+ (wParam & 0xfff0) == SC_RESTORE)
+ {
+ winDebug("Posting WM_EXITSIZEMOVE message since windows does not send it when the maximised/restored button is clicked.\n");
+ PostMessage(hwnd, WM_EXITSIZEMOVE, 0, 0);
+ }
+ break;
+
case WM_ENTERSIZEMOVE:
winDebug("winWindowProc - WM_ENTERSIZEMOVE\n");
break;
@@ -1161,7 +1162,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
#ifdef XWIN_CLIPBOARD
/* Make sure the clipboard chain is ok. */
- winFixClipboardChain (0);
+ winFixClipboardChain(0);
#endif
/* Call engine specific screen activation/deactivation function */
@@ -1213,7 +1214,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (s_pScreenInfo->fMultiWindow)
winDeinitMultiWindowWM();
#endif
- g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
+ g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
GiveUp(0);
return 0;
@@ -1232,7 +1233,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
#ifdef XWIN_MULTIWINDOWEXTWM
case WM_MANAGE:
- winDebug ("winWindowProc - WM_MANAGE\n");
+ winDebug("winWindowProc - WM_MANAGE\n");
s_pScreenInfo->fAnotherWMRunning = FALSE;
#ifdef XWIN_MULTIWINDOWINTWM
@@ -1244,7 +1245,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_UNMANAGE:
- winDebug ("winWindowProc - WM_UNMANAGE\n");
+ winDebug("winWindowProc - WM_UNMANAGE\n");
s_pScreenInfo->fAnotherWMRunning = TRUE;
#ifdef XWIN_MULTIWINDOWINTWM
@@ -1258,7 +1259,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
default:
if (message == s_uTaskbarRestart) {
- winInitNotifyIcon (s_pScreenPriv,FALSE);
+ winInitNotifyIcon(s_pScreenPriv,FALSE);
}
break;
}
diff --git a/xorg-server/include/extinit.h b/xorg-server/include/extinit.h
index 0a24db068..6c5337fc2 100644
--- a/xorg-server/include/extinit.h
+++ b/xorg-server/include/extinit.h
@@ -54,17 +54,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "extnsionst.h"
#ifdef COMPOSITE
-extern Bool noCompositeExtension;
+extern _X_EXPORT Bool noCompositeExtension;
extern void CompositeExtensionInit(void);
#endif
#ifdef DAMAGE
-extern Bool noDamageExtension;
+extern _X_EXPORT Bool noDamageExtension;
extern void DamageExtensionInit(void);
#endif
#if defined(DBE)
-extern Bool noDbeExtension;
+extern _X_EXPORT Bool noDbeExtension;
extern void DbeExtensionInit(void);
#endif
@@ -74,7 +74,7 @@ extern void DMXExtensionInit(void);
#if defined(DPMSExtension)
#include <X11/extensions/dpmsconst.h>
-extern Bool noDPMSExtension;
+extern _X_EXPORT Bool noDPMSExtension;
extern void DPMSExtensionInit(void);
#endif
@@ -88,12 +88,12 @@ extern void GlxExtensionInit(void);
#ifdef PANORAMIX
#include <X11/extensions/panoramiXproto.h>
-extern Bool noPanoramiXExtension;
+extern _X_EXPORT Bool noPanoramiXExtension;
extern void PanoramiXExtensionInit(void);
#endif
#ifdef RANDR
-extern Bool noRRExtension;
+extern _X_EXPORT Bool noRRExtension;
extern void RRExtensionInit(void);
#endif
@@ -101,18 +101,18 @@ extern void RRExtensionInit(void);
extern void RecordExtensionInit(void);
#endif
-extern Bool noRenderExtension;
+extern _X_EXPORT Bool noRenderExtension;
extern void RenderExtensionInit(void);
#if defined(RES)
#include <X11/extensions/XResproto.h>
-extern Bool noResExtension;
+extern _X_EXPORT Bool noResExtension;
extern void ResExtensionInit(void);
#endif
#if defined(SCREENSAVER)
#include <X11/extensions/saver.h>
-extern Bool noScreenSaverExtension;
+extern _X_EXPORT Bool noScreenSaverExtension;
extern void ScreenSaverExtensionInit(void);
#endif
@@ -122,7 +122,7 @@ extern void ShapeExtensionInit(void);
#ifdef MITSHM
#include <X11/extensions/shm.h>
#include <X11/extensions/shmproto.h>
-extern Bool noMITShmExtension;
+extern _X_EXPORT Bool noMITShmExtension;
extern void ShmExtensionInit(void);
#endif
@@ -133,20 +133,20 @@ extern void XCMiscExtensionInit(void);
#ifdef XCSECURITY
#include <X11/extensions/secur.h>
#include "securitysrv.h"
-extern Bool noSecurityExtension;
+extern _X_EXPORT Bool noSecurityExtension;
extern void SecurityExtensionInit(void);
#endif
#ifdef XF86BIGFONT
#include <X11/extensions/xf86bigfproto.h>
-extern Bool noXFree86BigfontExtension;
+extern _X_EXPORT Bool noXFree86BigfontExtension;
extern void XFree86BigfontExtensionInit(void);
#endif
extern void BigReqExtensionInit(void);
#ifdef XFIXES
-extern Bool noXFixesExtension;
+extern _X_EXPORT Bool noXFixesExtension;
extern void XFixesExtensionInit(void);
#endif
@@ -160,7 +160,7 @@ extern void XkbExtensionInit(void);
#if defined(XSELINUX)
#include "xselinux.h"
-extern Bool noSELinuxExtension;
+extern _X_EXPORT Bool noSELinuxExtension;
extern void SELinuxExtensionInit(void);
#endif
@@ -171,14 +171,14 @@ extern void XTestExtensionInit(void);
#endif
#ifdef INXQUARTZ
-extern Bool noPseudoramiXExtension;
+extern _X_EXPORT Bool noPseudoramiXExtension;
extern void PseudoramiXExtensionInit(void);
#endif
#if defined(XV)
#include <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
-extern Bool noXvExtension;
+extern _X_EXPORT Bool noXvExtension;
extern void XvExtensionInit(void);
extern void XvMCExtensionInit(void);
#endif
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index 2b5f26368..015800089 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -361,9 +361,13 @@ Fopen(const char *, const char *);
extern _X_EXPORT int
Fclose(pointer);
#else
-#define System(a) system(a)
-#define Popen(a,b) popen(a,b)
-#define Pclose(a) pclose(a)
+
+extern const char *
+Win32TempDir(void);
+
+extern int
+System(const char *cmdline);
+
#define Fopen(a,b) fopen(a,b)
#define Fclose(a) fclose(a)
#endif
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index 909c1f73e..b40f43fed 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -1622,6 +1622,79 @@ Fclose(pointer iop)
#endif /* !WIN32 */
+#ifdef WIN32
+
+#include <X11/Xwindows.h>
+
+const char *
+Win32TempDir()
+{
+ static char buffer[PATH_MAX];
+
+ if (GetTempPath(sizeof(buffer), buffer)) {
+ int len;
+
+ buffer[sizeof(buffer) - 1] = 0;
+ len = strlen(buffer);
+ if (len > 0)
+ if (buffer[len - 1] == '\\')
+ buffer[len - 1] = 0;
+ return buffer;
+ }
+ if (getenv("TEMP") != NULL)
+ return getenv("TEMP");
+ else if (getenv("TMP") != NULL)
+ return getenv("TEMP");
+ else
+ return "/tmp";
+}
+
+int
+System(const char *cmdline)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ DWORD dwExitCode;
+ char *cmd = strdup(cmdline);
+
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ ZeroMemory(&pi, sizeof(pi));
+
+ if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ LPVOID buffer;
+
+ if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) & buffer, 0, NULL)) {
+ ErrorF("[xkb] Starting '%s' failed!\n", cmdline);
+ }
+ else {
+ ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *) buffer);
+ LocalFree(buffer);
+ }
+
+ free(cmd);
+ return -1;
+ }
+ /* Wait until child process exits. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+
+ GetExitCodeProcess(pi.hProcess, &dwExitCode);
+
+ /* Close process and thread handles. */
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ free(cmd);
+
+ return dwExitCode;
+}
+#endif
+
/*
* CheckUserParameters: check for long command line arguments and long
* environment variables. By default, these checks are only done when
diff --git a/xorg-server/randr/rrprovider.c b/xorg-server/randr/rrprovider.c
index c4fe36980..c4ed515d6 100644
--- a/xorg-server/randr/rrprovider.c
+++ b/xorg-server/randr/rrprovider.c
@@ -86,23 +86,26 @@ ProcRRGetProviders (ClientPtr client)
}
pScrPriv = rrGetScrPriv(pScreen);
- rep.pad = 0;
if (!pScrPriv)
{
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.timestamp = currentTime.milliseconds;
- rep.nProviders = 0;
+ rep = (xRRGetProvidersReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .timestamp = currentTime.milliseconds,
+ .nProviders = 0
+ };
extra = NULL;
extraLen = 0;
} else {
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.timestamp = pScrPriv->lastSetTime.milliseconds;
- rep.nProviders = total_providers;
- rep.length = total_providers;
+ rep = (xRRGetProvidersReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .timestamp = pScrPriv->lastSetTime.milliseconds,
+ .nProviders = total_providers,
+ .length = total_providers
+ };
extraLen = rep.length << 2;
if (extraLen) {
extra = malloc(extraLen);
@@ -163,18 +166,20 @@ ProcRRGetProviderInfo (ClientPtr client)
pScreen = provider->pScreen;
pScrPriv = rrGetScrPriv(pScreen);
- rep.type = X_Reply;
- rep.status = RRSetConfigSuccess;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.capabilities = provider->capabilities;
- rep.nameLength = provider->nameLength;
- rep.timestamp = pScrPriv->lastSetTime.milliseconds;
- rep.nCrtcs = pScrPriv->numCrtcs;
- rep.nOutputs = pScrPriv->numOutputs;
+ rep = (xRRGetProviderInfoReply) {
+ .type = X_Reply,
+ .status = RRSetConfigSuccess,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .capabilities = provider->capabilities,
+ .nameLength = provider->nameLength,
+ .timestamp = pScrPriv->lastSetTime.milliseconds,
+ .nCrtcs = pScrPriv->numCrtcs,
+ .nOutputs = pScrPriv->numOutputs,
+ .nAssociatedProviders = 0
+ };
/* count associated providers */
- rep.nAssociatedProviders = 0;
if (provider->offload_sink)
rep.nAssociatedProviders++;
if (provider->output_source)
diff --git a/xorg-server/randr/rrproviderproperty.c b/xorg-server/randr/rrproviderproperty.c
index 5e04fab8f..e0a814ff8 100644
--- a/xorg-server/randr/rrproviderproperty.c
+++ b/xorg-server/randr/rrproviderproperty.c
@@ -65,14 +65,14 @@ RRDestroyProviderProperty(RRPropertyPtr prop)
static void
RRDeleteProperty(RRProviderRec * provider, RRPropertyRec * prop)
{
- xRRProviderPropertyNotifyEvent event;
-
- event.type = RREventBase + RRNotify;
- event.subCode = RRNotify_ProviderProperty;
- event.provider = provider->id;
- event.state = PropertyDelete;
- event.atom = prop->propertyName;
- event.timestamp = currentTime.milliseconds;
+ xRRProviderPropertyNotifyEvent event = {
+ .type = RREventBase + RRNotify,
+ .subCode = RRNotify_ProviderProperty,
+ .provider = provider->id,
+ .state = PropertyDelete,
+ .atom = prop->propertyName,
+ .timestamp = currentTime.milliseconds
+ };
RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event);
@@ -138,7 +138,6 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
pointer value, Bool sendevent, Bool pending)
{
RRPropertyPtr prop;
- xRRProviderPropertyNotifyEvent event;
rrScrPrivPtr pScrPriv = rrGetScrPriv(provider->pScreen);
int size_in_bytes;
int total_size;
@@ -237,12 +236,14 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
provider->pendingProperties = TRUE;
if (sendevent) {
- event.type = RREventBase + RRNotify;
- event.subCode = RRNotify_ProviderProperty;
- event.provider = provider->id;
- event.state = PropertyNewValue;
- event.atom = prop->propertyName;
- event.timestamp = currentTime.milliseconds;
+ xRRProviderPropertyNotifyEvent event = {
+ .type = RREventBase + RRNotify,
+ .subCode = RRNotify_ProviderProperty,
+ .provider = provider->id,
+ .state = PropertyNewValue,
+ .atom = prop->propertyName,
+ .timestamp = currentTime.milliseconds
+ };
RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event);
}
return Success;
@@ -394,10 +395,12 @@ ProcRRListProviderProperties(ClientPtr client)
if (!(pAtoms = (Atom *) malloc(numProps * sizeof(Atom))))
return BadAlloc;
- rep.type = X_Reply;
- rep.length = bytes_to_int32(numProps * sizeof(Atom));
- rep.sequenceNumber = client->sequence;
- rep.nAtoms = numProps;
+ rep = (xRRListProviderPropertiesReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = bytes_to_int32(numProps * sizeof(Atom)),
+ .nAtoms = numProps
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -438,12 +441,14 @@ ProcRRQueryProviderProperty(ClientPtr client)
if (!extra)
return BadAlloc;
}
- rep.type = X_Reply;
- rep.length = prop->num_valid;
- rep.sequenceNumber = client->sequence;
- rep.pending = prop->is_pending;
- rep.range = prop->range;
- rep.immutable = prop->immutable;
+ rep = (xRRQueryProviderPropertyReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = prop->num_valid,
+ .pending = prop->is_pending,
+ .range = prop->range,
+ .immutable = prop->immutable
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -568,7 +573,10 @@ ProcRRGetProviderProperty(ClientPtr client)
RRPropertyValuePtr prop_value;
unsigned long n, len, ind;
RRProviderPtr provider;
- xRRGetProviderPropertyReply reply;
+ xRRGetProviderPropertyReply reply = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence
+ };
char *extra = NULL;
REQUEST_SIZE_MATCH(xRRGetProviderPropertyReq);
@@ -594,8 +602,6 @@ ProcRRGetProviderProperty(ClientPtr client)
if (prop->propertyName == stuff->property)
break;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
if (!prop) {
reply.nItems = 0;
reply.length = 0;
@@ -672,14 +678,14 @@ ProcRRGetProviderProperty(ClientPtr client)
reply.propertyType = prop_value->type;
if (stuff->delete && (reply.bytesAfter == 0)) {
- xRRProviderPropertyNotifyEvent event;
-
- event.type = RREventBase + RRNotify;
- event.subCode = RRNotify_ProviderProperty;
- event.provider = provider->id;
- event.state = PropertyDelete;
- event.atom = prop->propertyName;
- event.timestamp = currentTime.milliseconds;
+ xRRProviderPropertyNotifyEvent event = {
+ .type = RREventBase + RRNotify,
+ .subCode = RRNotify_ProviderProperty,
+ .provider = provider->id,
+ .state = PropertyDelete,
+ .atom = prop->propertyName,
+ .timestamp = currentTime.milliseconds
+ };
RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event);
}
diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c
index 8d562108a..45c5139c9 100644
--- a/xorg-server/randr/rrscreen.c
+++ b/xorg-server/randr/rrscreen.c
@@ -395,16 +395,17 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
ErrorF("reporting %d %d %d %d\n", total_crtcs, total_outputs, total_modes, total_name_len);
pScrPriv = rrGetScrPriv(pScreen);
- rep.pad = 0;
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.timestamp = pScrPriv->lastSetTime.milliseconds;
- rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
- rep.nCrtcs = total_crtcs;
- rep.nOutputs = total_outputs;
- rep.nModes = total_modes;
- rep.nbytesNames = total_name_len;
+ rep = (xRRGetScreenResourcesReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .timestamp = pScrPriv->lastSetTime.milliseconds,
+ .configTimestamp = pScrPriv->lastConfigTime.milliseconds,
+ .nCrtcs = total_crtcs,
+ .nOutputs = total_outputs,
+ .nModes = total_modes,
+ .nbytesNames = total_name_len
+ };
rep.length = (total_crtcs + total_outputs + total_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) +
bytes_to_int32(rep.nbytesNames));
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index 9b69b2b82..79f46379c 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -44,12 +44,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef WIN32
/* from ddxLoad.c */
-extern const char *Win32TempDir(void);
-extern int Win32System(const char *cmdline);
-
-#undef System
-#define System Win32System
-
#define W32_tmparg " '%s'"
#define W32_tmpfile ,tmpname
#define W32_tmplen strlen(tmpname)+3
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index cb2dfc31c..d462957f4 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -68,81 +68,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PATHSEPARATOR "/"
#endif
-#ifdef WIN32
-
-#include <X11/Xwindows.h>
-const char *
-Win32TempDir()
-{
- static char buffer[PATH_MAX];
-
- if (GetTempPath(sizeof(buffer), buffer)) {
- int len;
-
- buffer[sizeof(buffer) - 1] = 0;
- len = strlen(buffer);
- if (len > 0)
- if (buffer[len - 1] == '\\')
- buffer[len - 1] = 0;
- return buffer;
- }
- if (getenv("TEMP") != NULL)
- return getenv("TEMP");
- else if (getenv("TMP") != NULL)
- return getenv("TEMP");
- else
- return "/tmp";
-}
-
-int
-Win32System(const char *cmdline)
-{
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- DWORD dwExitCode;
- char *cmd = strdup(cmdline);
-
- ZeroMemory(&si, sizeof(si));
- si.cb = sizeof(si);
- ZeroMemory(&pi, sizeof(pi));
-
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
- LPVOID buffer;
-
- if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) & buffer, 0, NULL)) {
- ErrorF("[xkb] Starting '%s' failed!\n", cmdline);
- }
- else {
- ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *) buffer);
- LocalFree(buffer);
- }
-
- free(cmd);
- return -1;
- }
- /* Wait until child process exits. */
- WaitForSingleObject(pi.hProcess, INFINITE);
-
- GetExitCodeProcess(pi.hProcess, &dwExitCode);
-
- /* Close process and thread handles. */
- CloseHandle(pi.hProcess);
- CloseHandle(pi.hThread);
- free(cmd);
-
- return dwExitCode;
-}
-
-#undef System
-#define System(x) Win32System(x)
-#endif
-
static void
OutputDirectory(char *outdir, size_t size)
{