[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'upstream-ubuntu'



 Xext/panoramiX.c                   |    5 -
 Xext/sync.c                        |    4 -
 Xext/xvmc.c                        |    8 +-
 configure.ac                       |    4 -
 dix/devices.c                      |   10 +-
 glx/glxdri2.c                      |   23 +++---
 glx/glxext.c                       |    3 
 glx/glxserver.h                    |    2 
 hw/xfree86/common/xf86.h           |    2 
 hw/xfree86/common/xf86AutoConfig.c |    1 
 hw/xfree86/common/xf86Extensions.h |    8 +-
 hw/xfree86/dri2/dri2.c             |   15 +++
 hw/xfree86/dri2/dri2.h             |    7 +
 hw/xfree86/dri2/dri2ext.c          |    9 +-
 hw/xfree86/modes/xf86Crtc.c        |    6 -
 hw/xfree86/modes/xf86Modes.c       |   15 +++
 hw/xfree86/modes/xf86RandR12.c     |    2 
 hw/xfree86/sdksyms.sh              |    2 
 hw/xquartz/pseudoramiX.c           |    4 -
 hw/xquartz/xpr/dri.h               |    3 
 hw/xwin/InitOutput.c               |   23 +++++-
 hw/xwin/Makefile.am                |    1 
 hw/xwin/README                     |  141 -------------------------------------
 hw/xwin/man/XWin.man               |   26 +++---
 hw/xwin/win.h                      |    2 
 hw/xwin/winblock.c                 |    2 
 hw/xwin/winclipboard.h             |    7 -
 hw/xwin/winclipboardinit.c         |    2 
 hw/xwin/winclipboardthread.c       |    8 --
 hw/xwin/winclipboardunicode.c      |   65 -----------------
 hw/xwin/winclipboardwndproc.c      |    7 -
 hw/xwin/winclipboardwrappers.c     |   10 --
 hw/xwin/winclipboardxevents.c      |   14 ---
 hw/xwin/wincreatewnd.c             |   93 +++++++++++++++---------
 hw/xwin/windialogs.c               |    8 +-
 hw/xwin/winerror.c                 |    4 -
 hw/xwin/winkeyhook.c               |   18 ----
 hw/xwin/winmonitors.c              |    5 +
 hw/xwin/winmonitors.h              |   29 +++++++
 hw/xwin/winmultiwindowwm.c         |   79 ++++++++++----------
 hw/xwin/winprocarg.c               |   18 ++--
 hw/xwin/winscrinit.c               |    4 -
 hw/xwin/winwndproc.c               |    7 +
 include/extinit.h                  |   32 ++++----
 include/os.h                       |   10 +-
 os/utils.c                         |   73 +++++++++++++++++++
 randr/rrprovider.c                 |   47 ++++++------
 randr/rrproviderproperty.c         |   78 +++++++++++---------
 randr/rrscreen.c                   |   21 ++---
 test/xtest.c                       |    3 
 xkb/ddxList.c                      |    6 -
 xkb/ddxLoad.c                      |   75 -------------------
 52 files changed, 475 insertions(+), 576 deletions(-)

New commits:
commit 77de2994774e7be24a0bad521180628feb1027c6
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Jul 17 15:47:39 2012 -0700

    Bump to version 1.12.99.902
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/configure.ac b/configure.ac
index 6456192..bf6868e 100644
--- a/configure.ac
+++ b/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

commit 75966a4186955f3a4625e93796145036c5986d2e
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Jul 13 14:36:25 2012 -0700

    xwin: Clean up os wrappers for System, Popen and Pclose on Windows
    
    Popen and Pclose are never used on Windows, so don't bother to even
    try to define them.
    
    System(s) was defined as system(s), but the two users of that
    function are in xkb, which carefully redefines that as
    Win32System. Move Win32System and Win32TempDir to os/utils.c, renaming
    Win32System to be just System, which simplifies the xkb code
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>

diff --git a/include/os.h b/include/os.h
index 7701c39..9e323f3 100644
--- a/include/os.h
+++ b/include/os.h
@@ -359,9 +359,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/os/utils.c b/os/utils.c
index a6f6ef5..d902523 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1561,6 +1561,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/xkb/ddxList.c b/xkb/ddxList.c
index 9b69b2b..79f4637 100644
--- a/xkb/ddxList.c
+++ b/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/xkb/ddxLoad.c b/xkb/ddxLoad.c
index cb2dfc3..d462957 100644
--- a/xkb/ddxLoad.c
+++ b/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)
 {

commit 6910280297ab610100dd8e7fbe5bb5cc08968f2f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jul 14 10:54:36 2012 -0700

    Use C99 designated initializers in DRI2GetParam replies
    
    DRI2GetParam was going through review in parallel with main batch of
    C99 initialization changes - sync up now that both have landed.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>

diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index eb6fd44..ee610c0 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/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))

commit a6c5b8d3ee053cadf685b0e4de96407ad6df4dd4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jul 14 10:50:41 2012 -0700

    Use C99 designated initializers in RandR 1.4 extension Events
    
    RandR 1.4 was going through review in parallel with main batch of
    C99 initialization changes - sync up now that both have landed.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>

diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
index 785f42c..e0a814f 100644
--- a/randr/rrproviderproperty.c
+++ b/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;
@@ -677,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);
     }
 

commit ada04ef0ca8a1213e865ba2c000ccd6ed6d0e371
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jul 14 10:45:29 2012 -0700

    Use C99 designated initializers in RandR 1.4 extension Replies
    
    RandR 1.4 was going through review in parallel with main batch of
    C99 initialization changes - sync up now that both have landed.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>

diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index c4fe369..c4ed515 100644
--- a/randr/rrprovider.c
+++ b/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/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
index 5e04fab..785f42c 100644
--- a/randr/rrproviderproperty.c
+++ b/randr/rrproviderproperty.c
@@ -394,10 +394,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 +440,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 +572,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 +601,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;
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 6a7a089..39340cc 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -396,16 +396,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));

commit fb73f7f40fa46458990038332017d4496caa0691
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jul 14 10:02:52 2012 -0700

    Fix two more C99 initialization mistakes using members of same struct
    
    Similar to 34cf559bcf99dad, use temporary variables instead of
    referencing members of the struct being initialized in the middle
    of the initialization.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 5653c08..1c7197d 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -1056,11 +1056,12 @@ int
 ProcXineramaQueryScreens(ClientPtr client)
 {
     /* REQUEST(xXineramaQueryScreensReq); */
+    CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
     xXineramaQueryScreensReply rep = {
         .type = X_Reply,
         .sequenceNumber = client->sequence,
-        .length = bytes_to_int32(rep.number * sz_XineramaScreenInfo),
-        .number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens
+        .length = bytes_to_int32(number * sz_XineramaScreenInfo),
+        .number = number
     };
 
     REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 8d93cc3..5f0123b 100644
--- a/Xext/xvmc.c
+++ b/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;

commit 5884e7dedecdd82ddbb037360cf9c85143e094b5
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon Jul 16 17:40:31 2012 -0700

    xf86: Re-export extension disable flags
    
    These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f,
    which moved the declarations around and lost the _X_EXPORT attributes in the
    process.  Since drivers need these and it's late in the release cycle, just
    re-export them for now.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Andy Ritger <aritger@nvidia.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/hw/xfree86/common/xf86Extensions.h b/hw/xfree86/common/xf86Extensions.h
index 9b8448d..cad86c8 100644
--- a/hw/xfree86/common/xf86Extensions.h
+++ b/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/include/extinit.h b/include/extinit.h
index 0a24db0..6c5337f 100644
--- a/include/extinit.h
+++ b/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

commit 357ec54f46d31ff77c441c15c322152e04f89a11
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Wed Mar 14 13:58:32 2012 +0000

    hw/xwin: Refer to xkeyboard-config man page for XKB configuration option values
    
    Also polish the keyboard configuration text a bit
    Include man section number in references to setxkbmap
    Consistently refer to 'manual page' rather using both that and 'man page'
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>

diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man
index d03a365..dbadad6 100644
--- a/hw/xwin/man/XWin.man
+++ b/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.
 

commit 5940580f8c12145c1ef4c3eee898676b48d95879
Author: Jörg Mensmann <joerg_ml@bitplanet.de>
Date:   Tue Apr 17 10:48:19 2012 +0100

    hw/xwin: Fix command line arguments for multiple monitors.
    
    Moving Xwin to a certain monitor using "-screen 0 @2" would fail,
    printing "ddxProcessArgument - screen - Querying monitors failed".
    
    This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8,
    because EnumDisplayMonitor() returns FALSE if its callback function
    returns FALSE (which is not clearly documented), and QueryMonitor()
    would then also return FALSE.
    
    Moving back to the old behaviour, where the return value of
    EnumDisplayMonitors() is ignored.
    
    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>

diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c
index 4732410..07532f6 100644
--- a/hw/xwin/winmonitors.c
+++ b/hw/xwin/winmonitors.c
@@ -64,5 +64,7 @@ QueryMonitor(int index, struct GetMonitorInfoData *data)
     data->requestedMonitor = index;
 
     /* query information */
-    return EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
+    EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
+
+    return TRUE;
 }

commit 18801f5e5a98d80f4811ade8c98df65175b1935a
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Fri Feb 10 09:27:16 2012 +0000

    hw/xwin: Remove unused WindowExposuresProcPtr storage in screen private
    
    We don't wrap the WindowExposures screen function
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>

diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 9096df2..38d6bde 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -579,7 +579,6 @@ typedef struct _winPrivScreenRec {
     UnrealizeWindowProcPtr UnrealizeWindow;
     ValidateTreeProcPtr ValidateTree;
     PostValidateTreeProcPtr PostValidateTree;
-    WindowExposuresProcPtr WindowExposures;
     CopyWindowProcPtr CopyWindow;
     ClearToBackgroundProcPtr ClearToBackground;
     ClipNotifyProcPtr ClipNotify;

commit 8fd30859c293035fe505da76d8d7e64131bd5bc0
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Fri Feb 10 13:25:32 2012 +0000


Reply to: