summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-08-31 15:09:02 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-08-31 15:09:02 +0100
commit8724bb25c325f4a03f36389d553b00f87930ced9 (patch)
treed2b505c5966f0a0d01732a56bb07f940548e0d99 /hw
parentcad2feacb52c7e38236db39df06c3fc11ba3aae1 (diff)
parentdfc03ef3fda3572db590c2096272c990d434163e (diff)
Merge tag 'xorg-server-1.12.4' into cygwin-release-1.12xserver-cygwin-1.12.4-1cygwin-release-1.12
xorg-server-1.12.4 Conflicts: glx/glxcmds.c hw/xfree86/modes/xf86Crtc.c os/utils.c pseudoramiX/pseudoramiX.c
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/ephyr/ephyr.c80
-rw-r--r--hw/kdrive/ephyr/hostx.c36
-rw-r--r--hw/kdrive/ephyr/hostx.h10
-rw-r--r--hw/kdrive/src/kdrive.c20
-rw-r--r--hw/kdrive/src/kinput.c2
-rw-r--r--hw/xfree86/Makefile.am2
-rw-r--r--hw/xfree86/common/xf86Module.h2
-rw-r--r--hw/xfree86/dixmods/extmod/modinit.h2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga2.c81
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c14
-rw-r--r--hw/xfree86/dri2/dri2.c15
-rw-r--r--hw/xfree86/dri2/dri2.h7
-rw-r--r--hw/xfree86/loader/loader.c19
-rw-r--r--hw/xfree86/loader/loader.h1
-rw-r--r--hw/xfree86/loader/loadmod.c2
-rw-r--r--hw/xfree86/modes/xf86Crtc.c14
-rw-r--r--hw/xfree86/modes/xf86DisplayIDModes.c171
-rw-r--r--hw/xfree86/modes/xf86EdidModes.c122
-rw-r--r--hw/xfree86/os-support/bsd/bsd_apm.c26
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kqueue_apm.c26
-rw-r--r--hw/xfree86/os-support/bus/Sbus.c20
-rw-r--r--hw/xfree86/os-support/linux/lnx_apm.c31
-rw-r--r--hw/xfree86/os-support/solaris/sun_apm.c26
-rw-r--r--hw/xfree86/parser/Device.c2
-rw-r--r--hw/xfree86/parser/Files.c2
-rw-r--r--hw/xfree86/parser/Flags.c2
-rw-r--r--hw/xfree86/parser/Input.c2
-rw-r--r--hw/xfree86/parser/InputClass.c2
-rw-r--r--hw/xfree86/parser/Layout.c2
-rw-r--r--hw/xfree86/parser/Module.c2
-rw-r--r--hw/xfree86/parser/Monitor.c2
-rw-r--r--hw/xfree86/parser/Pointer.c2
-rw-r--r--hw/xfree86/parser/Screen.c2
-rw-r--r--hw/xfree86/parser/Vendor.c2
-rw-r--r--hw/xfree86/parser/Video.c2
-rw-r--r--hw/xfree86/parser/read.c2
-rw-r--r--hw/xfree86/parser/scan.c2
-rw-r--r--hw/xfree86/parser/write.c2
-rw-r--r--hw/xfree86/ramdac/xf86Cursor.c31
-rw-r--r--hw/xquartz/bundle/Info.plist.cpp4
-rw-r--r--hw/xquartz/console_redirect.c28
-rw-r--r--hw/xquartz/xpr/xprEvent.c22
-rw-r--r--hw/xwin/InitOutput.c2
43 files changed, 462 insertions, 384 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 8eda539aa..33bf4085b 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -419,23 +419,22 @@ ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations)
struct {
int width, height;
} sizes[] = {
- {
- 1600, 1200}, {
- 1400, 1050}, {
- 1280, 960}, {
- 1280, 1024}, {
- 1152, 864}, {
- 1024, 768}, {
- 832, 624}, {
- 800, 600}, {
- 720, 400}, {
- 480, 640}, {
- 640, 480}, {
- 640, 400}, {
- 320, 240}, {
- 240, 320}, {
- 160, 160}, {
- 0, 0}
+ {1600, 1200},
+ {1400, 1050},
+ {1280, 960},
+ {1280, 1024},
+ {1152, 864},
+ {1024, 768},
+ {832, 624},
+ {800, 600},
+ {720, 400},
+ {480, 640},
+ {640, 480},
+ {640, 400},
+ {320, 240},
+ {240, 320},
+ {160, 160},
+ {0, 0}
};
EPHYR_LOG("mark");
@@ -562,6 +561,8 @@ ephyrRandRSetConfig(ScreenPtr pScreen,
if (wasEnabled)
KdEnableScreen(pScreen);
+ RRScreenSizeNotify(pScreen);
+
return TRUE;
bail4:
@@ -594,6 +595,43 @@ ephyrRandRInit(ScreenPtr pScreen)
pScrPriv->rrSetConfig = ephyrRandRSetConfig;
return TRUE;
}
+
+static Bool
+ephyrResizeScreen (ScreenPtr pScreen,
+ int newwidth,
+ int newheight)
+{
+ KdScreenPriv(pScreen);
+ KdScreenInfo *screen = pScreenPriv->screen;
+ RRScreenSize size = {0};
+ Bool ret;
+ int t;
+
+ if (screen->randr & (RR_Rotate_90|RR_Rotate_270)) {
+ t = newwidth;
+ newwidth = newheight;
+ newheight = t;
+ }
+
+ if (newwidth == screen->width && newheight == screen->height) {
+ return FALSE;
+ }
+
+ size.width = newwidth;
+ size.height = newheight;
+
+ ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size);
+ if (ret) {
+ RROutputPtr output;
+
+ output = RRFirstOutput(pScreen);
+ if (!output)
+ return FALSE;
+ RROutputSetModes(output, NULL, 0, 0);
+ }
+
+ return ret;
+}
#endif
Bool
@@ -963,6 +1001,14 @@ ephyrPoll(void)
break;
#endif /* XF86DRI */
+#ifdef RANDR
+ case EPHYR_EV_CONFIGURE:
+ ephyrResizeScreen(screenInfo.screens[ev.data.configure.screen],
+ ev.data.configure.width,
+ ev.data.configure.height);
+ break;
+#endif /* RANDR */
+
default:
break;
}
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 6988f1625..02729d6f6 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -345,7 +345,11 @@ hostx_init(void)
attr.event_mask =
ButtonPressMask
| ButtonReleaseMask
- | PointerMotionMask | KeyPressMask | KeyReleaseMask | ExposureMask;
+ | PointerMotionMask
+ | KeyPressMask
+ | KeyReleaseMask
+ | ExposureMask
+ | StructureNotifyMask;
EPHYR_DBG("mark");
@@ -693,12 +697,14 @@ hostx_screen_init(EphyrScreenInfo screen,
XResizeWindow(HostX.dpy, host_screen->win, width, height);
/* Ask the WM to keep our size static */
- size_hints = XAllocSizeHints();
- size_hints->max_width = size_hints->min_width = width;
- size_hints->max_height = size_hints->min_height = height;
- size_hints->flags = PMinSize | PMaxSize;
- XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
- XFree(size_hints);
+ if (host_screen->win_pre_existing == None) {
+ size_hints = XAllocSizeHints();
+ size_hints->max_width = size_hints->min_width = width;
+ size_hints->max_height = size_hints->min_height = height;
+ size_hints->flags = PMinSize | PMaxSize;
+ XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
+ XFree(size_hints);
+ }
XMapWindow(HostX.dpy, host_screen->win);
@@ -1001,6 +1007,22 @@ hostx_get_event(EphyrHostXEvent * ev)
ev->data.key_up.scancode = xev.xkey.keycode;
return 1;
+ case ConfigureNotify:
+ {
+ struct EphyrHostScreen *host_screen =
+ host_screen_from_window(xev.xconfigure.window);
+
+ if (host_screen && host_screen->win_pre_existing != None) {
+ ev->type = EPHYR_EV_CONFIGURE;
+ ev->data.configure.width = xev.xconfigure.width;
+ ev->data.configure.height = xev.xconfigure.height;
+ ev->data.configure.window = xev.xconfigure.window;
+ ev->data.configure.screen = host_screen->mynum;
+ return 1;
+ }
+
+ return 0;
+ }
default:
break;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index d6217119a..31c4053aa 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -47,7 +47,8 @@ typedef enum EphyrHostXEventType {
EPHYR_EV_MOUSE_RELEASE,
EPHYR_EV_KEY_PRESS,
EPHYR_EV_KEY_RELEASE,
- EPHYR_EV_EXPOSE
+ EPHYR_EV_EXPOSE,
+ EPHYR_EV_CONFIGURE,
} EphyrHostXEventType;
/* I can't believe it's not a KeySymsRec. */
@@ -89,6 +90,13 @@ struct EphyrHostXEvent {
int window;
} expose;
+ struct configure {
+ int width;
+ int height;
+ int screen;
+ int window;
+ } configure;
+
} data;
int key_state;
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index f65ab96bc..716f18ef1 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -730,22 +730,22 @@ KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr)
int subpixel_order;
Rotation direction;
} orders[] = {
- {
- SubPixelHorizontalRGB, RR_Rotate_0}, {
- SubPixelHorizontalBGR, RR_Rotate_180}, {
- SubPixelVerticalRGB, RR_Rotate_270}, {
- SubPixelVerticalBGR, RR_Rotate_90},};
+ {SubPixelHorizontalRGB, RR_Rotate_0},
+ {SubPixelHorizontalBGR, RR_Rotate_180},
+ {SubPixelVerticalRGB, RR_Rotate_270},
+ {SubPixelVerticalBGR, RR_Rotate_90},
+ };
static struct {
int bit;
int normal;
int reflect;
} reflects[] = {
- {
- RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR}, {
- RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB}, {
- RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR}, {
- RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},};
+ {RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR},
+ {RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB},
+ {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR},
+ {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},
+ };
/* map subpixel to direction */
for (i = 0; i < 4; i++)
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 692e511a8..eabee6d41 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1055,7 +1055,7 @@ KdGetOptions(InputOption **options, char *string)
if (strchr(string, '=')) {
tam_key = (strchr(string, '=') - string);
- key = strndup(string, tam_key);
+ key = strndup(string, tam_key + 1);
if (!key)
goto out;
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 7f6b7fe8d..045f1eb97 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -54,8 +54,8 @@ LOCAL_LIBS = \
ramdac/libramdac.la \
ddc/libddc.la \
i2c/libi2c.la \
- dixmods/libxorgxkb.la \
$(XORG_LIBS) \
+ dixmods/libxorgxkb.la \
$(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la
Xorg_LDADD = \
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 894b93f59..0036c5935 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -82,7 +82,7 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 0)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 1)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(16, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(6, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 9753fe0fd..e7c744859 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -85,7 +85,7 @@ extern void SecurityExtensionInit(INITARGS);
#endif
#if 1
-extern void PanoramiXExtensionInit(int argc, char *argv[]);
+extern void PanoramiXExtensionInit(INITARGS);
#endif
#if 1
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 6b33941ef..4b3238fd2 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -96,13 +96,14 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
char *deviceName;
int nameSize;
+ REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (!DGAAvailable(stuff->screen))
return DGAErrorBase + XF86DGANoDirectVideoMode;
- REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -129,14 +130,14 @@ ProcXDGACloseFramebuffer(ClientPtr client)
{
REQUEST(xXDGACloseFramebufferReq);
+ REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (!DGAAvailable(stuff->screen))
return DGAErrorBase + XF86DGANoDirectVideoMode;
- REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq);
-
DGACloseFramebuffer(stuff->screen);
return Success;
@@ -152,10 +153,11 @@ ProcXDGAQueryModes(ClientPtr client)
xXDGAModeInfo info;
XDGAModePtr mode;
+ REQUEST_SIZE_MATCH(xXDGAQueryModesReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXDGAQueryModesReq);
rep.type = X_Reply;
rep.length = 0;
rep.number = 0;
@@ -267,11 +269,12 @@ ProcXDGASetMode(ClientPtr client)
ClientPtr owner;
int size;
+ REQUEST_SIZE_MATCH(xXDGASetModeReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
owner = DGA_GETCLIENT(stuff->screen);
- REQUEST_SIZE_MATCH(xXDGASetModeReq);
rep.type = X_Reply;
rep.length = 0;
rep.offset = 0;
@@ -357,14 +360,14 @@ ProcXDGASetViewport(ClientPtr client)
{
REQUEST(xXDGASetViewportReq);
+ REQUEST_SIZE_MATCH(xXDGASetViewportReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGASetViewportReq);
-
DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags);
return Success;
@@ -378,14 +381,14 @@ ProcXDGAInstallColormap(ClientPtr client)
REQUEST(xXDGAInstallColormapReq);
+ REQUEST_SIZE_MATCH(xXDGAInstallColormapReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGAInstallColormapReq);
-
rc = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, RT_COLORMAP,
client, DixInstallAccess);
if (rc != Success)
@@ -399,14 +402,14 @@ ProcXDGASelectInput(ClientPtr client)
{
REQUEST(xXDGASelectInputReq);
+ REQUEST_SIZE_MATCH(xXDGASelectInputReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGASelectInputReq);
-
if (DGA_GETCLIENT(stuff->screen) == client)
DGASelectInput(stuff->screen, client, stuff->mask);
@@ -418,14 +421,14 @@ ProcXDGAFillRectangle(ClientPtr client)
{
REQUEST(xXDGAFillRectangleReq);
+ REQUEST_SIZE_MATCH(xXDGAFillRectangleReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGAFillRectangleReq);
-
if (Success != DGAFillRect(stuff->screen, stuff->x, stuff->y,
stuff->width, stuff->height, stuff->color))
return BadMatch;
@@ -438,14 +441,14 @@ ProcXDGACopyArea(ClientPtr client)
{
REQUEST(xXDGACopyAreaReq);
+ REQUEST_SIZE_MATCH(xXDGACopyAreaReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGACopyAreaReq);
-
if (Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy,
stuff->width, stuff->height, stuff->dstx,
stuff->dsty))
@@ -459,14 +462,14 @@ ProcXDGACopyTransparentArea(ClientPtr client)
{
REQUEST(xXDGACopyTransparentAreaReq);
+ REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq);
-
if (Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy,
stuff->width, stuff->height, stuff->dstx,
stuff->dsty, stuff->key))
@@ -481,13 +484,14 @@ ProcXDGAGetViewportStatus(ClientPtr client)
REQUEST(xXDGAGetViewportStatusReq);
xXDGAGetViewportStatusReply rep;
+ REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -504,13 +508,14 @@ ProcXDGASync(ClientPtr client)
REQUEST(xXDGASyncReq);
xXDGASyncReply rep;
+ REQUEST_SIZE_MATCH(xXDGASyncReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGASyncReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -549,13 +554,14 @@ ProcXDGAChangePixmapMode(ClientPtr client)
xXDGAChangePixmapModeReply rep;
int x, y;
+ REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -579,14 +585,14 @@ ProcXDGACreateColormap(ClientPtr client)
REQUEST(xXDGACreateColormapReq);
int result;
+ REQUEST_SIZE_MATCH(xXDGACreateColormapReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXDGACreateColormapReq);
-
if (!stuff->mode)
return BadValue;
@@ -615,10 +621,11 @@ ProcXF86DGAGetVideoLL(ClientPtr client)
int num, offset, flags;
char *name;
+ REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -655,9 +662,10 @@ ProcXF86DGADirectVideo(ClientPtr client)
REQUEST(xXF86DGADirectVideoReq);
+ REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
if (!DGAAvailable(stuff->screen))
return DGAErrorBase + XF86DGANoDirectVideoMode;
@@ -713,10 +721,11 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
REQUEST(xXF86DGAGetViewPortSizeReq);
xXF86DGAGetViewPortSizeReply rep;
+ REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -741,14 +750,14 @@ ProcXF86DGASetViewPort(ClientPtr client)
{
REQUEST(xXF86DGASetViewPortReq);
+ REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
-
if (!DGAAvailable(stuff->screen))
return DGAErrorBase + XF86DGANoDirectVideoMode;
@@ -768,10 +777,11 @@ ProcXF86DGAGetVidPage(ClientPtr client)
REQUEST(xXF86DGAGetVidPageReq);
xXF86DGAGetVidPageReply rep;
+ REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -786,11 +796,11 @@ ProcXF86DGASetVidPage(ClientPtr client)
{
REQUEST(xXF86DGASetVidPageReq);
+ REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq);
-
/* silently fail */
return Success;
@@ -804,14 +814,14 @@ ProcXF86DGAInstallColormap(ClientPtr client)
REQUEST(xXF86DGAInstallColormapReq);
+ REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq);
-
if (!DGAActive(stuff->screen))
return DGAErrorBase + XF86DGADirectNotActivated;
@@ -832,10 +842,11 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client)
REQUEST(xXF86DGAQueryDirectVideoReq);
xXF86DGAQueryDirectVideoReply rep;
+ REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -854,14 +865,14 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
REQUEST(xXF86DGAViewPortChangedReq);
xXF86DGAViewPortChangedReply rep;
+ REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (DGA_GETCLIENT(stuff->screen) != client)
return DGAErrorBase + XF86DGADirectNotActivated;
- REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq);
-
if (!DGAActive(stuff->screen))
return DGAErrorBase + XF86DGADirectNotActivated;
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 68c4b583f..ac3bee08f 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -1362,7 +1362,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
rep.flags = 0;
if (!ClockProg) {
- Clocks = malloc(numClocks * sizeof(int));
+ Clocks = calloc(numClocks, sizeof(int));
if (!Clocks)
return BadValue;
if (!VidModeGetClocks(stuff->screen, Clocks)) {
@@ -1489,14 +1489,14 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
REQUEST(xXF86VidModeGetGammaRampReq);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
if (stuff->size != VidModeGetGammaRampSize(stuff->screen))
return BadValue;
- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
-
length = (stuff->size + 1) & ~1;
if (stuff->size) {
@@ -1537,11 +1537,11 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client)
REQUEST(xXF86VidModeGetGammaRampSizeReq);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
-
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -1564,11 +1564,11 @@ ProcXF86VidModeGetPermissions(ClientPtr client)
REQUEST(xXF86VidModeGetPermissionsReq);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
+
if (stuff->screen >= screenInfo.numScreens)
return BadValue;
- REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
-
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 591ff3ace..156d4986e 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -280,8 +280,9 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id,
}
int
-DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
- DRI2InvalidateProcPtr invalidate, void *priv)
+DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv,
+ XID *dri2_id_out)
{
DRI2DrawablePtr pPriv;
XID dri2_id;
@@ -298,9 +299,19 @@ DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
if (rc != Success)
return rc;
+ if (dri2_id_out)
+ *dri2_id_out = dri2_id;
+
return Success;
}
+int
+DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv)
+{
+ return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL);
+}
+
static int
DRI2DrawableGone(pointer p, XID id)
{
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 00b3668cc..06546bb54 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -235,7 +235,12 @@ extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
DRI2InvalidateProcPtr invalidate,
void *priv);
-extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw);
+extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client,
+ DrawablePtr pDraw,
+ XID id,
+ DRI2InvalidateProcPtr invalidate,
+ void *priv,
+ XID *dri2_id_out);
extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw,
int *width,
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index b72b8b89d..dc289c5f1 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -160,6 +160,12 @@ LoaderSymbol(const char *name)
return NULL;
}
+void *
+LoaderSymbolFromModule(void *handle, const char *name)
+{
+ return dlsym(handle, name);
+}
+
void
LoaderUnload(const char *name, void *handle)
{
@@ -189,13 +195,12 @@ LoaderGetABIVersion(const char *abiclass)
const char *name;
int version;
} classes[] = {
- {
- ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, {
- ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, {
- ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, {
- ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, {
- ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, {
- NULL, 0}
+ {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion},
+ {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion},
+ {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion},
+ {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion},
+ {ABI_CLASS_FONT, LoaderVersionInfo.fontVersion},
+ {NULL, 0}
};
int i;
diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h
index 5cadd5ad6..c89c6410a 100644
--- a/hw/xfree86/loader/loader.h
+++ b/hw/xfree86/loader/loader.h
@@ -72,5 +72,6 @@ extern unsigned long LoaderOptions;
/* Internal Functions */
void *LoaderOpen(const char *, int *, int *);
+void *LoaderSymbolFromModule(void *, const char *);
#endif /* _LOADER_H */
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index a3002920f..98fe321fd 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -956,7 +956,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
*errmin = 0;
goto LoadModule_fail;
}
- initdata = LoaderSymbol(p);
+ initdata = LoaderSymbolFromModule(ret->handle, p);
if (initdata) {
ModuleSetupProc setup;
ModuleTearDownProc teardown;
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index af20c6338..a22dbcbb3 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2056,12 +2056,13 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
/*
* If there's no preferred mode, but only one monitor, pick the
- * biggest mode for its aspect ratio, assuming one exists.
+ * biggest mode for its aspect ratio or 4:3, assuming one exists.
*/
if (!ret)
do {
- int i = 0;
- float aspect = 0.0;
+ int i = 0;
+ float aspect = 0.0;
+ DisplayModePtr a = NULL, b = NULL;
/* count the number of enabled outputs */
for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ;
@@ -2075,8 +2076,11 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
aspect = (float)config->output[p]->mm_width /
(float)config->output[p]->mm_height;
- if (aspect)
- preferred_match[p] = bestModeForAspect(config, enabled, aspect);
+ a = bestModeForAspect(config, enabled, 4.0/3.0);
+ if (aspect)
+ b = bestModeForAspect(config, enabled, aspect);
+
+ preferred_match[p] = biggestMode(a, b);
if (preferred_match[p])
ret = TRUE;
diff --git a/hw/xfree86/modes/xf86DisplayIDModes.c b/hw/xfree86/modes/xf86DisplayIDModes.c
index 781c806bc..bead1265a 100644
--- a/hw/xfree86/modes/xf86DisplayIDModes.c
+++ b/hw/xfree86/modes/xf86DisplayIDModes.c
@@ -184,105 +184,96 @@ static const struct did_dmt {
short w, h, r, f;
} did_dmt[] = {
/* byte 3 */
- {
- 640, 350, 85, 0}, {
- 640, 400, 85, 0}, {
- 720, 400, 85, 0}, {
- 640, 480, 60, 0}, {
- 640, 480, 72, 0}, {
- 640, 480, 75, 0}, {
- 640, 480, 85, 0}, {
- 800, 600, 56, 0},
+ {640, 350, 85, 0},
+ {640, 400, 85, 0},
+ {720, 400, 85, 0},
+ {640, 480, 60, 0},
+ {640, 480, 72, 0},
+ {640, 480, 75, 0},
+ {640, 480, 85, 0},
+ {800, 600, 56, 0},
/* byte 4 */
- {
- 800, 600, 60, 0}, {
- 800, 600, 72, 0}, {
- 800, 600, 75, 0}, {
- 800, 600, 85, 0}, {
- 800, 600, 120, RB}, {
- 848, 480, 60, 0}, {
- 1024, 768, 43, INT}, {
- 1024, 768, 60, 0},
+ {800, 600, 60, 0},
+ {800, 600, 72, 0},
+ {800, 600, 75, 0},
+ {800, 600, 85, 0},
+ {800, 600, 120, RB},
+ {848, 480, 60, 0},
+ {1024, 768, 43, INT},
+ {1024, 768, 60, 0},
/* byte 5 */
- {
- 1024, 768, 70, 0}, {
- 1024, 768, 75, 0}, {
- 1024, 768, 85, 0}, {
- 1024, 768, 120, RB}, {
- 1152, 864, 75, 0}, {
- 1280, 768, 60, RB}, {
- 1280, 768, 60, 0}, {
- 1280, 768, 75, 0},
+ {1024, 768, 70, 0},
+ {1024, 768, 75, 0},
+ {1024, 768, 85, 0},
+ {1024, 768, 120, RB},
+ {1152, 864, 75, 0},
+ {1280, 768, 60, RB},
+ {1280, 768, 60, 0},
+ {1280, 768, 75, 0},
/* byte 6 */
- {
- 1280, 768, 85, 0}, {
- 1280, 768, 120, RB}, {
- 1280, 800, 60, RB}, {
- 1280, 800, 60, 0}, {
- 1280, 800, 75, 0}, {
- 1280, 800, 85, 0}, {
- 1280, 800, 120, RB}, {
- 1280, 960, 60, 0},
+ {1280, 768, 85, 0},
+ {1280, 768, 120, RB},
+ {1280, 800, 60, RB},
+ {1280, 800, 60, 0},
+ {1280, 800, 75, 0},
+ {1280, 800, 85, 0},
+ {1280, 800, 120, RB},
+ {1280, 960, 60, 0},
/* byte 7 */
- {
- 1280, 960, 85, 0}, {
- 1280, 960, 120, RB}, {
- 1280, 1024, 60, 0}, {
- 1280, 1024, 75, 0}, {
- 1280, 1024, 85, 0}, {
- 1280, 1024, 120, RB}, {
- 1360, 768, 60, 0}, {
- 1360, 768, 120, RB},
+ {1280, 960, 85, 0},
+ {1280, 960, 120, RB},
+ {1280, 1024, 60, 0},
+ {1280, 1024, 75, 0},
+ {1280, 1024, 85, 0},
+ {1280, 1024, 120, RB},
+ {1360, 768, 60, 0},
+ {1360, 768, 120, RB},
/* byte 8 */
- {
- 1400, 1050, 60, RB}, {
- 1400, 1050, 60, 0}, {
- 1400, 1050, 75, 0}, {
- 1400, 1050, 85, 0}, {
- 1400, 1050, 120, RB}, {
- 1440, 900, 60, RB}, {
- 1440, 900, 60, 0}, {
- 1440, 900, 75, 0},
+ {1400, 1050, 60, RB},
+ {1400, 1050, 60, 0},
+ {1400, 1050, 75, 0},
+ {1400, 1050, 85, 0},
+ {1400, 1050, 120, RB},
+ {1440, 900, 60, RB},
+ {1440, 900, 60, 0},
+ {1440, 900, 75, 0},
/* byte 9 */
- {
- 1440, 900, 85, 0}, {
- 1440, 900, 120, RB}, {
- 1600, 1200, 60, 0}, {
- 1600, 1200, 65, 0}, {
- 1600, 1200, 70, 0}, {
- 1600, 1200, 75, 0}, {
- 1600, 1200, 85, 0}, {
- 1600, 1200, 120, RB},
+ {1440, 900, 85, 0},
+ {1440, 900, 120, RB},
+ {1600, 1200, 60, 0},
+ {1600, 1200, 65, 0},
+ {1600, 1200, 70, 0},
+ {1600, 1200, 75, 0},
+ {1600, 1200, 85, 0},
+ {1600, 1200, 120, RB},
/* byte a */
- {
- 1680, 1050, 60, RB}, {
- 1680, 1050, 60, 0}, {
- 1680, 1050, 75, 0}, {
- 1680, 1050, 85, 0}, {
- 1680, 1050, 120, RB}, {
- 1792, 1344, 60, 0}, {
- 1792, 1344, 75, 0}, {
- 1792, 1344, 120, RB},
+ {1680, 1050, 60, RB},
+ {1680, 1050, 60, 0},
+ {1680, 1050, 75, 0},
+ {1680, 1050, 85, 0},
+ {1680, 1050, 120, RB},
+ {1792, 1344, 60, 0},
+ {1792, 1344, 75, 0},
+ {1792, 1344, 120, RB},
/* byte b */
- {
- 1856, 1392, 60, 0}, {
- 1856, 1392, 75, 0}, {
- 1856, 1392, 120, RB}, {
- 1920, 1200, 60, RB}, {
- 1920, 1200, 60, 0}, {
- 1920, 1200, 75, 0}, {
- 1920, 1200, 85, 0}, {
- 1920, 1200, 120, RB},
+ {1856, 1392, 60, 0},
+ {1856, 1392, 75, 0},
+ {1856, 1392, 120, RB},
+ {1920, 1200, 60, RB},
+ {1920, 1200, 60, 0},
+ {1920, 1200, 75, 0},
+ {1920, 1200, 85, 0},
+ {1920, 1200, 120, RB},
/* byte c */
- {
- 1920, 1440, 60, 0}, {
- 1920, 1440, 75, 0}, {
- 1920, 1440, 120, RB}, {
- 2560, 1600, 60, RB}, {
- 2560, 1600, 60, 0}, {
- 2560, 1600, 75, 0}, {
- 2560, 1600, 85, 0}, {
-2560, 1600, 120, RB},};
+ {1920, 1440, 60, 0},
+ {1920, 1440, 75, 0},
+ {1920, 1440, 120, RB},
+ {2560, 1600, 60, RB},
+ {2560, 1600, 60, 0},
+ {2560, 1600, 75, 0},
+ {2560, 1600, 85, 0},
+ {2560, 1600, 120, RB},
+};
static void
didVesaTiming(int scrn, unsigned char *x, MonPtr mon)
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 258ada5b4..4ee862da0 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -513,14 +513,14 @@ DDCModeDoInterlaceQuirks(DisplayModePtr mode)
static const struct {
int w, h;
} cea_interlaced[] = {
- {
- 1920, 1080}, {
- 720, 480}, {
- 1440, 480}, {
- 2880, 480}, {
- 720, 576}, {
- 1440, 576}, {
- 2880, 576},};
+ {1920, 1080},
+ {720, 480},
+ {1440, 480},
+ {2880, 480},
+ {720, 576},
+ {1440, 576},
+ {2880, 576},
+ };
static const int n_modes =
sizeof(cea_interlaced) / sizeof(cea_interlaced[0]);
int i;
@@ -668,68 +668,62 @@ static const struct {
short r;
short rb;
} EstIIIModes[] = {
- /* byte 6 */
- {
- 640, 350, 85, 0}, {
- 640, 400, 85, 0}, {
- 720, 400, 85, 0}, {
- 640, 480, 85, 0}, {
- 848, 480, 60, 0}, {
- 800, 600, 85, 0}, {
- 1024, 768, 85, 0}, {
- 1152, 864, 75, 0},
+ /* byte 6 */
+ {640, 350, 85, 0},
+ {640, 400, 85, 0},
+ {720, 400, 85, 0},
+ {640, 480, 85, 0},
+ {848, 480, 60, 0},
+ {800, 600, 85, 0},
+ {1024, 768, 85, 0},
+ {1152, 864, 75, 0},
/* byte 7 */
- {
- 1280, 768, 60, 1}, {
- 1280, 768, 60, 0}, {
- 1280, 768, 75, 0}, {
- 1280, 768, 85, 0}, {
- 1280, 960, 60, 0}, {
- 1280, 960, 85, 0}, {
- 1280, 1024, 60, 0}, {
- 1280, 1024, 85, 0},
+ {1280, 768, 60, 1},
+ {1280, 768, 60, 0},
+ {1280, 768, 75, 0},
+ {1280, 768, 85, 0},
+ {1280, 960, 60, 0},
+ {1280, 960, 85, 0},
+ {1280, 1024, 60, 0},
+ {1280, 1024, 85, 0},
/* byte 8 */
- {
- 1360, 768, 60, 0}, {
- 1440, 900, 60, 1}, {
- 1440, 900, 60, 0}, {
- 1440, 900, 75, 0}, {
- 1440, 900, 85, 0}, {
- 1400, 1050, 60, 1}, {
- 1400, 1050, 60, 0}, {
- 1400, 1050, 75, 0},
+ {1360, 768, 60, 0},
+ {1440, 900, 60, 1},
+ {1440, 900, 60, 0},
+ {1440, 900, 75, 0},
+ {1440, 900, 85, 0},
+ {1400, 1050, 60, 1},
+ {1400, 1050, 60, 0},
+ {1400, 1050, 75, 0},
/* byte 9 */
- {
- 1400, 1050, 85, 0}, {
- 1680, 1050, 60, 1}, {
- 1680, 1050, 60, 0}, {
- 1680, 1050, 75, 0}, {
- 1680, 1050, 85, 0}, {
- 1600, 1200, 60, 0}, {
- 1600, 1200, 65, 0}, {
- 1600, 1200, 70, 0},
+ {1400, 1050, 85, 0},
+ {1680, 1050, 60, 1},
+ {1680, 1050, 60, 0},
+ {1680, 1050, 75, 0},
+ {1680, 1050, 85, 0},
+ {1600, 1200, 60, 0},
+ {1600, 1200, 65, 0},
+ {1600, 1200, 70, 0},
/* byte 10 */
- {
- 1600, 1200, 75, 0}, {
- 1600, 1200, 85, 0}, {
- 1792, 1344, 60, 0}, {
- 1792, 1344, 85, 0}, {
- 1856, 1392, 60, 0}, {
- 1856, 1392, 75, 0}, {
- 1920, 1200, 60, 1}, {
- 1920, 1200, 60, 0},
+ {1600, 1200, 75, 0},
+ {1600, 1200, 85, 0},
+ {1792, 1344, 60, 0},
+ {1792, 1344, 85, 0},
+ {1856, 1392, 60, 0},
+ {1856, 1392, 75, 0},
+ {1920, 1200, 60, 1},
+ {1920, 1200, 60, 0},
/* byte 11 */
- {
- 1920, 1200, 75, 0}, {
- 1920, 1200, 85, 0}, {
- 1920, 1440, 60, 0}, {
- 1920, 1440, 75, 0},
+ {1920, 1200, 75, 0},
+ {1920, 1200, 85, 0},
+ {1920, 1440, 60, 0},
+ {1920, 1440, 75, 0},
/* fill up last byte */
- {
- 0,0,0,0}, {
- 0,0,0,0}, {
- 0,0,0,0}, {
- 0,0,0,0}, };
+ {0,0,0,0},
+ {0,0,0,0},
+ {0,0,0,0},
+ {0,0,0,0},
+};
static DisplayModePtr
DDCModesFromEstIII(unsigned char *est)
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
index a8a4164e0..b1938cf0d 100644
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -21,21 +21,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} bsdToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 10251f38e..22943855b 100644
--- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -54,21 +54,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} bsdToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index b75308aa1..826000712 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -403,16 +403,16 @@ sparcPromAssignNodes(void)
int devId;
char *prefix;
} procFbPrefixes[] = {
- {
- SBUS_DEVICE_BW2, "BWtwo"}, {
- SBUS_DEVICE_CG14, "CGfourteen"}, {
- SBUS_DEVICE_CG6, "CGsix"}, {
- SBUS_DEVICE_CG3, "CGthree"}, {
- SBUS_DEVICE_FFB, "Creator"}, {
- SBUS_DEVICE_FFB, "Elite 3D"}, {
- SBUS_DEVICE_LEO, "Leo"}, {
- SBUS_DEVICE_TCX, "TCX"}, {
- 0, NULL},};
+ {SBUS_DEVICE_BW2, "BWtwo"},
+ {SBUS_DEVICE_CG14, "CGfourteen"},
+ {SBUS_DEVICE_CG6, "CGsix"},
+ {SBUS_DEVICE_CG3, "CGthree"},
+ {SBUS_DEVICE_FFB, "Creator"},
+ {SBUS_DEVICE_FFB, "Elite 3D"},
+ {SBUS_DEVICE_LEO, "Leo"},
+ {SBUS_DEVICE_TCX, "TCX"},
+ {0, NULL},
+ };
while (fscanf(f, "%d %63s\n", &fbNum, buffer) == 2) {
for (i = 0; procFbPrefixes[i].devId; i++)
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index a37331e52..387934099 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -42,26 +42,23 @@ static struct {
apm_event_t apmLinux;
pmEvent xf86;
} LinuxToXF86[] = {
- {
- APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, {
- APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, {
- APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, {
- APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_SYS_STANDBY, XF86_APM_SYS_STANDBY},
+ {APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_LOW_BATTERY, XF86_APM_LOW_BATTERY},
+ {APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND, XF86_APM_USER_SUSPEND},
+ {APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#if defined(APM_CAPABILITY_CHANGED)
- {
- APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
#endif
#if 0
- {
- APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, {
- APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
+ {APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED},
+ {APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
#endif
};
diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c
index 4ff64649a..b6a1432f6 100644
--- a/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/hw/xfree86/os-support/solaris/sun_apm.c
@@ -97,21 +97,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} sunToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c
index f27b56fef..bb1ba88fb 100644
--- a/hw/xfree86/parser/Device.c
+++ b/hw/xfree86/parser/Device.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index d8152c008..0d3e47ac5 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -51,8 +51,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 29a60a2e1..2461476d1 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -51,8 +51,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Input.c b/hw/xfree86/parser/Input.c
index 6e0073437..ff2b9acbc 100644
--- a/hw/xfree86/parser/Input.c
+++ b/hw/xfree86/parser/Input.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c
index 8493685cd..de6a816ea 100644
--- a/hw/xfree86/parser/InputClass.c
+++ b/hw/xfree86/parser/InputClass.c
@@ -23,8 +23,6 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c
index bd33d6dfc..cbd8d247a 100644
--- a/hw/xfree86/parser/Layout.c
+++ b/hw/xfree86/parser/Layout.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Module.c b/hw/xfree86/parser/Module.c
index 1c458ae6c..87ddfc635 100644
--- a/hw/xfree86/parser/Module.c
+++ b/hw/xfree86/parser/Module.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index b237dfb32..36b4ebe35 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Pointer.c b/hw/xfree86/parser/Pointer.c
index cdbc09c1a..ff748d99a 100644
--- a/hw/xfree86/parser/Pointer.c
+++ b/hw/xfree86/parser/Pointer.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index 71778d88d..f294ec490 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Vendor.c b/hw/xfree86/parser/Vendor.c
index b4e2165b0..9b7695c8e 100644
--- a/hw/xfree86/parser/Vendor.c
+++ b/hw/xfree86/parser/Vendor.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/Video.c b/hw/xfree86/parser/Video.c
index fc1f1e544..68d611ae7 100644
--- a/hw/xfree86/parser/Video.c
+++ b/hw/xfree86/parser/Video.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index eef873e89..6545bcdae 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -52,8 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 795da615f..f852b83ec 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -51,8 +51,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index c001c3d51..9c706a062 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -51,8 +51,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-/* View/edit this file with tab stops set to 4 */
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index 678d2be5c..4a4def5c5 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -336,28 +336,19 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
if (!infoPtr->pScrn->vtSema)
ScreenPriv->SavedCursor = pCurs;
- if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || ((
+ if (infoPtr->pScrn->vtSema &&
+ (ScreenPriv->ForceHWCursorCount ||
+ ((
#ifdef ARGB_CURSOR
- pCurs->
- bits->
- argb
- &&
- infoPtr->
- UseHWCursorARGB
- &&
- (*infoPtr->
- UseHWCursorARGB)
- (pScreen,
- pCurs))
- ||
- (pCurs->
- bits->
- argb
- == 0
- &&
+ pCurs->bits->argb &&
+ infoPtr->UseHWCursorARGB &&
+ (*infoPtr->UseHWCursorARGB)(pScreen, pCurs)) ||
+ (pCurs->bits->argb == 0 &&
#endif
- (pCurs->bits->height <= infoPtr->MaxHeight) && (pCurs->bits->width <= infoPtr->MaxWidth) && (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor) (pScreen, pCurs)))))) {
-
+ (pCurs->bits->height <= infoPtr->MaxHeight) &&
+ (pCurs->bits->width <= infoPtr->MaxWidth) &&
+ (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor) (pScreen, pCurs)))))) {
+
if (ScreenPriv->SWCursor) /* remove the SW cursor */
(*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen,
NullCursor, x, y);
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 4b6d9d182..460047cc2 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.7.2</string>
+ <string>2.7.3</string>
<key>CFBundleVersion</key>
- <string>2.7.2</string>
+ <string>2.7.3</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c
index 91d693b67..8fdce4699 100644
--- a/hw/xquartz/console_redirect.c
+++ b/hw/xquartz/console_redirect.c
@@ -110,27 +110,33 @@ _read_redirect(int fd, int flush)
/* Increment our returned number read */
total_read += nbytes;
- nbytes += (aslr->w - aslr->buf);
- aslr->buf[nbytes] = '\0';
+ /* Increment our write location */
+ aslr->w += nbytes;
+ aslr->w[0] = '\0';
/* One line at a time */
- for (p = aslr->buf; *p && (p - aslr->buf) < nbytes; p = s + 1) {
+ for (p = aslr->buf; p < aslr->w; p = s + 1) {
// Find null or \n
for (s = p; *s && *s != '\n'; s++) ;
if (*s == '\n') {
*s = '\0';
+ }
+
+ if (s < aslr->w || aslr->buf == p) {
+ /* Either the first of multiple messages or one message which is larger than our buffer */
asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
}
- else if (aslr->buf != p) {
+ else {
+ /* We reached the end of the buffer, move this chunk to the start. */
memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
aslr->w = aslr->buf + (s - p);
break;
}
- else if (nbytes == BUF_SIZE - 1) {
- asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
- aslr->w = aslr->buf;
- break;
- }
+ }
+
+ if (p == aslr->w) {
+ /* Start writing at the beginning in the case where we flushed */
+ aslr->w = aslr->buf;
}
}
@@ -359,8 +365,8 @@ xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
BLOCK_DONE;
}
redirect_fds = new_array;
- memset(redirect_fds + n_redirect_fds, 0, new_n -
- n_redirect_fds);
+ memset(redirect_fds + n_redirect_fds, 0, (new_n -
+ n_redirect_fds) * sizeof(*redirect_fds));
n_redirect_fds = new_n;
}
diff --git a/hw/xquartz/xpr/xprEvent.c b/hw/xquartz/xpr/xprEvent.c
index 106a91931..398177ca8 100644
--- a/hw/xquartz/xpr/xprEvent.c
+++ b/hw/xquartz/xpr/xprEvent.c
@@ -52,6 +52,10 @@
#include <sys/uio.h>
#include <unistd.h>
+#ifdef HAVE_LIBDISPATCH
+#include <dispatch/dispatch.h>
+#endif
+
#include "rootlessWindow.h"
#include "xprEvent.h"
@@ -72,7 +76,25 @@ QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
case kXquartzBringAllToFront:
DEBUG_LOG("kXquartzBringAllToFront\n");
+ /* There's no need to do xp_window_bring_all_to_front on Leopard,
+ * and we don't care about the result, so just do it async.
+ */
+#if defined(HAVE_LIBDISPATCH) && defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6
+# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
+ if (&xp_window_bring_all_to_front) {
+# endif
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ xp_window_bring_all_to_front();
+ });
+# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
+ } else {
+ RootlessOrderAllWindows(e->data[0]);
+ }
+# endif
+#else
RootlessOrderAllWindows(e->data[0]);
+#endif
+
return TRUE;
default:
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 1bb0107dc..2fe01b1c6 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -1025,7 +1025,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
noRRXineramaExtension = TRUE;
- PseudoramiXExtensionInit(argc, argv);
+ PseudoramiXExtensionInit();
/* Add primary monitor on pass 0, other monitors on pass 1, to ensure
the primary monitor is first in XINERAMA list */