aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-24 08:28:39 +0200
committermarha <marha@users.sourceforge.net>2012-09-24 08:28:39 +0200
commit0ebcd32e91486caccc041c8ca23e39e160b24702 (patch)
tree50cd0bc17e8a587fdbecdf52be48fe8c59e222b9 /xorg-server
parent06d4ea68085558b94d8e9c937091e7b7fcc5d95a (diff)
downloadvcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.tar.gz
vcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.tar.bz2
vcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.zip
mesa pixman xserver git update 24 sep 2012
xserver: 7722bcbab2507d263c7685b15cccbfdd52fc3a24 pixman: c4b69e706e63e01fbc70e0026c2079007c89de14 mesa: c432c86e6aeebeb46c028af940224c59faa16e88
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/dix/devices.c3
-rw-r--r--xorg-server/dix/window.c129
-rw-r--r--xorg-server/exa/exa_priv.h1
-rw-r--r--xorg-server/fb/fb.h1
-rw-r--r--xorg-server/hw/dmx/doc/dmx.xml12
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h1
-rw-r--r--xorg-server/hw/vfb/InitInput.c1
-rw-r--r--xorg-server/hw/vfb/InitOutput.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.c15
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c27
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c27
-rw-r--r--xorg-server/hw/xfree86/common/xf86Priv.h1
-rw-r--r--xorg-server/hw/xfree86/doc/ddxDesign.xml20
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_video.c89
-rw-r--r--xorg-server/hw/xfree86/sdksyms.sh1
-rw-r--r--xorg-server/hw/xnest/Screen.c1
-rw-r--r--xorg-server/hw/xnest/Visual.c1
-rw-r--r--xorg-server/hw/xquartz/darwin.c1
-rw-r--r--xorg-server/hw/xquartz/xpr/dri.c6
-rw-r--r--xorg-server/hw/xquartz/xpr/xprFrame.c28
-rw-r--r--xorg-server/hw/xwin/win.h1
-rw-r--r--xorg-server/include/window.h3
-rw-r--r--xorg-server/mi/Makefile.am127
-rw-r--r--xorg-server/mi/mibstore.c43
-rw-r--r--xorg-server/mi/mibstore.h23
-rw-r--r--xorg-server/miext/damage/damage.c30
-rw-r--r--xorg-server/xkeyboard-config/symbols/lv17
28 files changed, 253 insertions, 358 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 9cf04ed3f..66d440683 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
/* unity matrix */
memset(transform, 0, sizeof(transform));
transform[0] = transform[4] = transform[8] = 1.0f;
+ dev->transform.m[0][0] = 1.0;
+ dev->transform.m[1][1] = 1.0;
+ dev->transform.m[2][2] = 1.0;
XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
XIGetKnownProperty(XATOM_FLOAT), 32,
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index cdd12dca6..e70531af6 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -1886,8 +1886,7 @@ AnyWindowOverlapsMe(WindowPtr pWin, WindowPtr pHead, BoxPtr box)
if (pSib->mapped) {
sbox = WindowExtents(pSib, &sboxrec);
if (BOXES_OVERLAP(sbox, box)
- && ShapeOverlap(pWin, box, pSib, sbox)
- )
+ && ShapeOverlap(pWin, box, pSib, sbox))
return TRUE;
}
}
@@ -1905,8 +1904,7 @@ IOverlapAnyWindow(WindowPtr pWin, BoxPtr box)
if (pSib->mapped) {
sbox = WindowExtents(pSib, &sboxrec);
if (BOXES_OVERLAP(sbox, box)
- && ShapeOverlap(pWin, box, pSib, sbox)
- )
+ && ShapeOverlap(pWin, box, pSib, sbox))
return TRUE;
}
}
@@ -2174,8 +2172,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
else
pSib = pWin->nextSib;
- if ((!pWin->overrideRedirect) && (RedirectSend(pParent)
- )) {
+ if ((!pWin->overrideRedirect) && (RedirectSend(pParent))) {
xEvent event = {
.u.configureRequest.window = pWin->drawable.id,
.u.configureRequest.sibling = (mask & CWSibling) ? sibwid : None,
@@ -2508,28 +2505,29 @@ RealizeTree(WindowPtr pWin)
}
}
-static WindowPtr windowDisableMapUnmapEvents;
-
-void
-DisableMapUnmapEvents(WindowPtr pWin)
-{
- assert(windowDisableMapUnmapEvents == NULL);
-
- windowDisableMapUnmapEvents = pWin;
-}
-
-void
-EnableMapUnmapEvents(WindowPtr pWin)
+static Bool
+MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client)
{
- assert(windowDisableMapUnmapEvents != NULL);
+ xEvent event = {
+ .u.mapRequest.window = pWin->drawable.id,
+ .u.mapRequest.parent = pParent->drawable.id
+ };
+ event.u.u.type = MapRequest;
- windowDisableMapUnmapEvents = NULL;
+ return MaybeDeliverEventsToClient(pParent, &event, 1,
+ SubstructureRedirectMask,
+ client) == 1;
}
-static Bool
-MapUnmapEventsEnabled(WindowPtr pWin)
+static void
+DeliverMapNotify(WindowPtr pWin)
{
- return pWin != windowDisableMapUnmapEvents;
+ xEvent event = {
+ .u.mapNotify.window = pWin->drawable.id,
+ .u.mapNotify.override = pWin->overrideRedirect,
+ };
+ event.u.u.type = MapNotify;
+ DeliverEvents(pWin, &event, 1, NullWindow);
}
/*****
@@ -2551,7 +2549,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
if (pWin->mapped)
return Success;
- /* general check for permission to map window */
+ /* general check for permission to map window */
if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW,
pWin, RT_NONE, NULL, DixShowAccess) != Success)
return Success;
@@ -2560,29 +2558,13 @@ MapWindow(WindowPtr pWin, ClientPtr client)
if ((pParent = pWin->parent)) {
Bool anyMarked;
- if ((!pWin->overrideRedirect) && (RedirectSend(pParent)
- )) {
- xEvent event = {
- .u.mapRequest.window = pWin->drawable.id,
- .u.mapRequest.parent = pParent->drawable.id
- };
- event.u.u.type = MapRequest;
-
- if (MaybeDeliverEventsToClient(pParent, &event, 1,
- SubstructureRedirectMask,
- client) == 1)
+ if ((!pWin->overrideRedirect) && (RedirectSend(pParent)))
+ if (MaybeDeliverMapRequest(pWin, pParent, client))
return Success;
- }
pWin->mapped = TRUE;
- if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) {
- xEvent event = {
- .u.mapNotify.window = pWin->drawable.id,
- .u.mapNotify.override = pWin->overrideRedirect,
- };
- event.u.u.type = MapNotify;
- DeliverEvents(pWin, &event, 1, NullWindow);
- }
+ if (SubStrSend(pWin, pParent))
+ DeliverMapNotify(pWin);
if (!pParent->realized)
return Success;
@@ -2644,28 +2626,13 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
anyMarked = FALSE;
for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib) {
if (!pWin->mapped) {
- if (parentRedirect && !pWin->overrideRedirect) {
- xEvent event = {
- .u.mapRequest.window = pWin->drawable.id,
- .u.mapRequest.parent = pParent->drawable.id
- };
- event.u.u.type = MapRequest;
-
- if (MaybeDeliverEventsToClient(pParent, &event, 1,
- SubstructureRedirectMask,
- client) == 1)
+ if (parentRedirect && !pWin->overrideRedirect)
+ if (MaybeDeliverMapRequest(pWin, pParent, client))
continue;
- }
pWin->mapped = TRUE;
- if (parentNotify || StrSend(pWin)) {
- xEvent event = {
- .u.mapNotify.window = pWin->drawable.id,
- .u.mapNotify.override = pWin->overrideRedirect
- };
- event.u.u.type = MapNotify;
- DeliverEvents(pWin, &event, 1, NullWindow);
- }
+ if (parentNotify || StrSend(pWin))
+ DeliverMapNotify(pWin);
if (!pFirstMapped)
pFirstMapped = pWin;
@@ -2726,8 +2693,7 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure)
}
#endif
(*Unrealize) (pChild);
- if (MapUnmapEventsEnabled(pWin))
- DeleteWindowFromAnyEvents(pChild, FALSE);
+ DeleteWindowFromAnyEvents(pChild, FALSE);
if (pChild->viewable) {
pChild->viewable = FALSE;
(*MarkUnrealizedWindow) (pChild, pWin, fromConfigure);
@@ -2746,6 +2712,17 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure)
}
}
+static void
+DeliverUnmapNotify(WindowPtr pWin, Bool fromConfigure)
+{
+ xEvent event = {
+ .u.unmapNotify.window = pWin->drawable.id,
+ .u.unmapNotify.fromConfigure = fromConfigure
+ };
+ event.u.u.type = UnmapNotify;
+ DeliverEvents(pWin, &event, 1, NullWindow);
+}
+
/*****
* UnmapWindow
* If the window is already unmapped, this request has no effect.
@@ -2764,14 +2741,8 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return Success;
- if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) {
- xEvent event = {
- .u.unmapNotify.window = pWin->drawable.id,
- .u.unmapNotify.fromConfigure = fromConfigure
- };
- event.u.u.type = UnmapNotify;
- DeliverEvents(pWin, &event, 1, NullWindow);
- }
+ if (SubStrSend(pWin, pParent))
+ DeliverUnmapNotify(pWin, fromConfigure);
if (wasViewable && !fromConfigure) {
pWin->valdata = UnmapValData;
(*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib, &pLayerWin);
@@ -2822,14 +2793,8 @@ UnmapSubwindows(WindowPtr pWin)
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) {
if (pChild->mapped) {
- if (parentNotify || StrSend(pChild)) {
- xEvent event = {
- .u.unmapNotify.window = pChild->drawable.id,
- .u.unmapNotify.fromConfigure = xFalse
- };
- event.u.u.type = UnmapNotify;
- DeliverEvents(pChild, &event, 1, NullWindow);
- }
+ if (parentNotify || StrSend(pChild))
+ DeliverUnmapNotify(pChild, xFalse);
if (pChild->viewable) {
pChild->valdata = UnmapValData;
anyMarked = TRUE;
@@ -2956,8 +2921,6 @@ SendVisibilityNotify(WindowPtr pWin)
xEvent event;
unsigned int visibility = pWin->visibility;
- if (!MapUnmapEventsEnabled(pWin))
- return;
#ifdef PANORAMIX
/* This is not quite correct yet, but it's close */
if (!noPanoramiXExtension) {
diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h
index ea7e7faff..70075786a 100644
--- a/xorg-server/exa/exa_priv.h
+++ b/xorg-server/exa/exa_priv.h
@@ -41,7 +41,6 @@
#include "pixmapstr.h"
#include "windowstr.h"
#include "servermd.h"
-#include "mibstore.h"
#include "colormapst.h"
#include "gcstruct.h"
#include "input.h"
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index 40a7e38db..75596c58e 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -39,7 +39,6 @@
#include "privates.h"
#include "mi.h"
#include "migc.h"
-#include "mibstore.h"
#include "picturestr.h"
#ifdef FB_ACCESS_WRAPPER
diff --git a/xorg-server/hw/dmx/doc/dmx.xml b/xorg-server/hw/dmx/doc/dmx.xml
index 793aacea0..6d7df4133 100644
--- a/xorg-server/hw/dmx/doc/dmx.xml
+++ b/xorg-server/hw/dmx/doc/dmx.xml
@@ -1215,14 +1215,6 @@ area. Common functions to wrap are CloseScreen() and SaveScreen().
</para></listitem></varlistentry>
<varlistentry>
-<term>miInitializeBackingStore()</term>
-<listitem>
-<para>This MI function initializes the
-screen's backing storage functions, which are used to save areas of
-windows that are currently covered by other windows.
-</para></listitem></varlistentry>
-
-<varlistentry>
<term>miDCInitialize()</term>
<listitem>
<para>This MI function initializes the MI cursor
@@ -1320,8 +1312,8 @@ initialize each of its screens.
<para>Xnest's ScreenInit() function is called
xnestOpenScreen(). This function initializes its screen's depth and
visual information, and then calls miScreenInit() to set up the default
-screen functions. It then calls miInitializeBackingStore() and
-miDCInitialize() to initialize backing store and the software cursor.
+screen functions. It then calls miDCInitialize() to initialize the
+software cursor.
Finally, it replaces many of the screen functions with its own
functions that repackage and send the requests to the real X server to
which Xnest is attached.
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index b37041f9b..4829e1a1b 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -32,7 +32,6 @@
#include "pixmapstr.h"
#include "windowstr.h"
#include "servermd.h"
-#include "mibstore.h"
#include "colormapst.h"
#include "gcstruct.h"
#include "input.h"
diff --git a/xorg-server/hw/vfb/InitInput.c b/xorg-server/hw/vfb/InitInput.c
index 9d0fd9866..52cde72f0 100644
--- a/xorg-server/hw/vfb/InitInput.c
+++ b/xorg-server/hw/vfb/InitInput.c
@@ -36,7 +36,6 @@ from The Open Group.
#include "scrnintstr.h"
#include "inputstr.h"
#include <X11/Xos.h>
-#include "mibstore.h"
#include "mipointer.h"
#include "xkbsrv.h"
#include <X11/keysym.h>
diff --git a/xorg-server/hw/vfb/InitOutput.c b/xorg-server/hw/vfb/InitOutput.c
index 955624f3d..07ea8ea93 100644
--- a/xorg-server/hw/vfb/InitOutput.c
+++ b/xorg-server/hw/vfb/InitOutput.c
@@ -41,7 +41,6 @@ from The Open Group.
#include "servermd.h"
#define PSZ 8
#include "fb.h"
-#include "mibstore.h"
#include "colormapst.h"
#include "gcstruct.h"
#include "input.h"
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index bb2903da0..179b87cf5 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -55,6 +55,7 @@
extern _X_EXPORT int xf86DoConfigure;
extern _X_EXPORT int xf86DoShowOptions;
extern _X_EXPORT Bool xf86DoConfigurePass1;
+extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c
index 4ffbf7e46..e1015379b 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.c
+++ b/xorg-server/hw/xfree86/common/xf86Bus.c
@@ -117,27 +117,12 @@ xf86BusConfig(void)
screenLayoutPtr layout;
int i, j;
- /* Enable full I/O access */
- if (xorgHWAccess)
- xorgHWAccess = xf86EnableIO();
-
/*
* Now call each of the Probe functions. Each successful probe will
* result in an extra entry added to the xf86Screens[] list for each
* instance of the hardware found.
*/
for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xorgHWAccess) {
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
xf86CallDriverProbe(xf86DriverList[i], FALSE);
}
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 6f69117d3..6c5e35919 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -545,41 +545,16 @@ DoConfigure(void)
free(vlist);
- for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags)) {
- xorgHWAccess = TRUE;
- break;
- }
- }
- /* Enable full I/O access */
- if (xorgHWAccess) {
- if (!xf86EnableIO())
- /* oops, we have failed */
- xorgHWAccess = FALSE;
- }
+ xorgHWAccess = xf86EnableIO();
/* Create XF86Config file structure */
xf86config = calloc(1, sizeof(XF86ConfigRec));
/* Call all of the probe functions, reporting the results. */
for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) {
- xorgHWFlags flags;
Bool found_screen;
DriverRec *const drv = xf86DriverList[CurrentDriver];
- if (!xorgHWAccess) {
- if (!drv->driverFunc
- || !drv->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
found_screen = xf86CallDriverProbe(drv, TRUE);
if (found_screen && drv->Identify) {
(*drv->Identify) (0);
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index e4a6b8613..1695dbf74 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -402,6 +402,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
Bool pix24Fail = FALSE;
Bool autoconfig = FALSE;
Bool sigio_blocked = FALSE;
+ Bool want_hw_access = FALSE;
GDevPtr configured_device;
xf86Initialising = TRUE;
@@ -530,23 +531,21 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
*/
for (i = 0; i < xf86NumDrivers; i++) {
+ xorgHWFlags flags = HW_IO;
+
if (xf86DriverList[i]->Identify != NULL)
xf86DriverList[i]->Identify(0);
- if (!xorgHWAccess || !xorgHWOpenConsole) {
- xorgHWFlags flags;
+ if (xf86DriverList[i]->driverFunc)
+ xf86DriverList[i]->driverFunc(NULL,
+ GET_REQUIRED_HW_INTERFACES,
+ &flags);
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags))
- flags = HW_IO;
+ if (NEED_IO_ENABLED(flags))
+ want_hw_access = TRUE;
- if (NEED_IO_ENABLED(flags))
- xorgHWAccess = TRUE;
- if (!(flags & HW_SKIP_CONSOLE))
- xorgHWOpenConsole = TRUE;
- }
+ if (!(flags & HW_SKIP_CONSOLE))
+ xorgHWOpenConsole = TRUE;
}
if (xorgHWOpenConsole)
@@ -554,6 +553,10 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
else
xf86Info.dontVTSwitch = TRUE;
+ /* Enable full I/O access */
+ if (want_hw_access)
+ xorgHWAccess = xf86EnableIO();
+
if (xf86BusConfig() == FALSE)
return;
diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h
index c9f2e7eb8..58cfe0a1a 100644
--- a/xorg-server/hw/xfree86/common/xf86Priv.h
+++ b/xorg-server/hw/xfree86/common/xf86Priv.h
@@ -91,7 +91,6 @@ extern _X_EXPORT int xf86NumScreens;
extern _X_EXPORT const char *xf86VisualNames[];
extern _X_EXPORT int xf86Verbose; /* verbosity level */
extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */
-extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
diff --git a/xorg-server/hw/xfree86/doc/ddxDesign.xml b/xorg-server/hw/xfree86/doc/ddxDesign.xml
index 4c2ca47da..7c2c20ff3 100644
--- a/xorg-server/hw/xfree86/doc/ddxDesign.xml
+++ b/xorg-server/hw/xfree86/doc/ddxDesign.xml
@@ -3561,13 +3561,6 @@ The following include files are typically required by video drivers:
</para>
<para>
- All drivers implementing backing store need this:
- <literallayout><filename>
- "mibstore.h"
- </filename></literallayout>
- </para>
-
- <para>
All drivers using the mi colourmap code need this:
<literallayout><filename>
"micmap.h"
@@ -8092,13 +8085,6 @@ visible symbols.
</para>
<para>
- All drivers implementing backing store need this:
- <literallayout><filename>
- "mibstore.h"
- </filename></literallayout>
- </para>
-
- <para>
All drivers using the mi colourmap code need this:
<literallayout><filename>
"micmap.h"
@@ -9103,12 +9089,6 @@ ZZZScreenInit(ScreenPtr pScreen, int argc, char **argv)
return FALSE;
/*
- * If backing store is to be supported (as is usually the case),
- * initialise it.
- */
- miInitializeBackingStore(pScreen);
-
- /*
* Set initial black &amp; white colourmap indices.
*/
xf86SetBlackWhitePixels(pScreen);
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
index 3526a21d4..d9a5da184 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
@@ -479,45 +479,39 @@ volatile unsigned char *ioBase = NULL;
#define __NR_pciconfig_iobase 200
#endif
-#endif
-
-Bool
-xf86EnableIO(void)
+static Bool
+hwEnableIO(void)
{
-#if defined(__powerpc__)
int fd;
- unsigned int ioBase_phys;
-#endif
-
- if (ExtendedEnabled)
- return TRUE;
-
-#if defined(__powerpc__)
- ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
+ unsigned int ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
fd = open("/dev/mem", O_RDWR);
if (ioBase == NULL) {
ioBase = (volatile unsigned char *) mmap(0, 0x20000,
PROT_READ | PROT_WRITE,
MAP_SHARED, fd, ioBase_phys);
-/* Should this be fatal or just a warning? */
-#if 0
- if (ioBase == MAP_FAILED) {
- xf86Msg(X_WARNING,
- "xf86EnableIOPorts: Failed to map iobase (%s)\n",
- strerror(errno));
- return FALSE;
- }
-#endif
}
close(fd);
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__)
+
+ return ioBase != MAP_FAILED;
+}
+
+static void
+hwDisableIO(void)
+{
+ munmap(ioBase, 0x20000);
+ ioBase = NULL;
+}
+
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \
+ defined(__alpha__)
+
+static Bool
+hwEnableIO(void)
+{
if (ioperm(0, 1024, 1) || iopl(3)) {
- if (errno == ENODEV)
- ErrorF("xf86EnableIOPorts: no I/O ports found\n");
- else
- FatalError("xf86EnableIOPorts: failed to set IOPL"
- " for I/O (%s)\n", strerror(errno));
+ ErrorF("xf86EnableIOPorts: failed to set IOPL for I/O (%s)\n",
+ strerror(errno));
return FALSE;
}
#if !defined(__alpha__)
@@ -526,27 +520,44 @@ xf86EnableIO(void)
ioperm(0x40, 4, 0); /* trap access to the timer chip */
ioperm(0x60, 4, 0); /* trap access to the keyboard controller */
#endif
-#endif
- ExtendedEnabled = TRUE;
return TRUE;
}
+static void
+hwDisableIO(void)
+{
+ iopl(0);
+ ioperm(0, 1024, 0);
+}
+
+#else /* non-IO architectures */
+
+#define hwEnableIO() TRUE
+#define hwDisableIO() do {} while (0)
+
+#endif
+
+Bool
+xf86EnableIO(void)
+{
+ if (ExtendedEnabled)
+ return TRUE;
+
+ ExtendedEnabled = hwEnableIO();
+
+ return ExtendedEnabled;
+}
+
void
xf86DisableIO(void)
{
if (!ExtendedEnabled)
return;
-#if defined(__powerpc__)
- munmap(ioBase, 0x20000);
- ioBase = NULL;
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__)
- iopl(0);
- ioperm(0, 1024, 0);
-#endif
- ExtendedEnabled = FALSE;
- return;
+ hwDisableIO();
+
+ ExtendedEnabled = FALSE;
}
#if defined (__alpha__)
diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh
index 07372ad1c..fa1989379 100644
--- a/xorg-server/hw/xfree86/sdksyms.sh
+++ b/xorg-server/hw/xfree86/sdksyms.sh
@@ -207,7 +207,6 @@ cat > sdksyms.c << EOF
#include "miline.h"
#include "mipointer.h"
#include "mi.h"
-#include "mibstore.h"
#include "migc.h"
#include "mipointrst.h"
#include "mizerarc.h"
diff --git a/xorg-server/hw/xnest/Screen.c b/xorg-server/hw/xnest/Screen.c
index 7b3c1b361..58b5a1199 100644
--- a/xorg-server/hw/xnest/Screen.c
+++ b/xorg-server/hw/xnest/Screen.c
@@ -21,7 +21,6 @@ is" without express or implied warranty.
#include "scrnintstr.h"
#include "dix.h"
#include "mi.h"
-#include "mibstore.h"
#include "micmap.h"
#include "colormapst.h"
#include "resource.h"
diff --git a/xorg-server/hw/xnest/Visual.c b/xorg-server/hw/xnest/Visual.c
index 63198ba4f..11673c44a 100644
--- a/xorg-server/hw/xnest/Visual.c
+++ b/xorg-server/hw/xnest/Visual.c
@@ -21,7 +21,6 @@ is" without express or implied warranty.
#include "scrnintstr.h"
#include "dix.h"
#include "mi.h"
-#include "mibstore.h"
#include "Xnest.h"
#include "Display.h"
diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c
index d26f18a12..bf511801d 100644
--- a/xorg-server/hw/xquartz/darwin.c
+++ b/xorg-server/hw/xquartz/darwin.c
@@ -38,7 +38,6 @@
#include "servermd.h"
#include "inputstr.h"
#include "scrnintstr.h"
-#include "mibstore.h" // mi backing store implementation
#include "mipointer.h" // mi software cursor
#include "micmap.h" // mi colormap code
#include "fb.h" // fb framebuffer code
diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c
index 03af163f7..adba69cca 100644
--- a/xorg-server/hw/xquartz/xpr/dri.c
+++ b/xorg-server/hw/xquartz/xpr/dri.c
@@ -64,6 +64,7 @@
#include "mi.h"
#include "mipointer.h"
#include "rootless.h"
+#include "rootlessCommon.h"
#include "x-hash.h"
#include "x-hook.h"
#include "driWrap.h"
@@ -380,6 +381,11 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
DRIDrawablePrivPtr pDRIDrawablePriv;
if (pDrawable->type == DRAWABLE_WINDOW) {
+ /* <rdar://problem/12338921>
+ * http://bugs.winehq.org/show_bug.cgi?id=31751
+ */
+ RootlessStopDrawing((WindowPtr)pDrawable, FALSE);
+
pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
(WindowPtr)pDrawable, &wid);
diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c
index 01f1def20..aad375b52 100644
--- a/xorg-server/hw/xquartz/xpr/xprFrame.c
+++ b/xorg-server/hw/xquartz/xpr/xprFrame.c
@@ -49,6 +49,10 @@
#include <pthread.h>
#endif
+#ifdef DEBUG_XP_LOCK_WINDOW
+#include <execinfo.h>
+#endif
+
#define DEFINE_ATOM_HELPER(func, atom_name) \
static Atom func(void) { \
static int generation; \
@@ -376,6 +380,18 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
unsigned int rowbytes[2];
xp_error err;
+#ifdef DEBUG_XP_LOCK_WINDOW
+ void* callstack[128];
+ int i, frames = backtrace(callstack, 128);
+ char** strs = backtrace_symbols(callstack, frames);
+
+ ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
+ for (i = 0; i < frames; ++i) {
+ ErrorF(" %s\n", strs[i]);
+ }
+ free(strs);
+#endif
+
err = xp_lock_window(x_cvt_vptr_to_uint(
wid), NULL, NULL, data, rowbytes, NULL);
if (err != Success)
@@ -395,6 +411,18 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
{
xp_error err;
+#ifdef DEBUG_XP_LOCK_WINDOW
+ void* callstack[128];
+ int i, frames = backtrace(callstack, 128);
+ char** strs = backtrace_symbols(callstack, frames);
+
+ ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
+ for (i = 0; i < frames; ++i) {
+ ErrorF(" %s\n", strs[i]);
+ }
+ free(strs);
+#endif
+
err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
/* This should be a FatalError, but we started tripping over it. Make it a
* FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index 89e2a38c9..08d0d3f92 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -169,7 +169,6 @@
#include "micmap.h"
#include "mifillarc.h"
#include "mifpoly.h"
-#include "mibstore.h"
#include "input.h"
#include "mipointer.h"
#include "X11/keysym.h"
diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h
index f8fc2a5fe..b6d61c339 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/include/window.h
@@ -221,9 +221,6 @@ extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
-extern _X_EXPORT void DisableMapUnmapEvents(WindowPtr /* pWin */ );
-extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
-
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);
diff --git a/xorg-server/mi/Makefile.am b/xorg-server/mi/Makefile.am
index daf272814..0cef7798f 100644
--- a/xorg-server/mi/Makefile.am
+++ b/xorg-server/mi/Makefile.am
@@ -1,64 +1,63 @@
-noinst_LTLIBRARIES = libmi.la
-
-if XORG
-sdk_HEADERS = micmap.h miline.h mipointer.h mi.h mibstore.h \
- migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \
- mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h
-endif
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-libmi_la_SOURCES = \
- mi.h \
- miarc.c \
- mibitblt.c \
- mibstore.h \
- micmap.c \
- micmap.h \
- micoord.h \
- micopy.c \
- micursor.c \
- midash.c \
- midispcur.c \
- mieq.c \
- miexpose.c \
- mifillarc.c \
- mifillarc.h \
- mifillrct.c \
- mifpolycon.c \
- mifpoly.h \
- migc.c \
- migc.h \
- miglblt.c \
- miline.h \
- mioverlay.c \
- mioverlay.h \
- mipointer.c \
- mipointer.h \
- mipointrst.h \
- mipoly.c \
- mipoly.h \
- mipolycon.c \
- mipolygen.c \
- mipolypnt.c \
- mipolyrect.c \
- mipolyseg.c \
- mipolytext.c \
- mipolyutil.c \
- mipushpxl.c \
- miscanfill.h \
- miscrinit.c \
- mispans.c \
- mispans.h \
- misprite.c \
- misprite.h \
- mistruct.h \
- mivaltree.c \
- mivalidate.h \
- miwideline.c \
- miwideline.h \
- miwindow.c \
- mizerarc.c \
- mizerarc.h \
- mizerclip.c \
- mizerline.c
+noinst_LTLIBRARIES = libmi.la
+
+if XORG
+sdk_HEADERS = micmap.h miline.h mipointer.h mi.h \
+ migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \
+ mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h
+endif
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+libmi_la_SOURCES = \
+ mi.h \
+ miarc.c \
+ mibitblt.c \
+ micmap.c \
+ micmap.h \
+ micoord.h \
+ micopy.c \
+ micursor.c \
+ midash.c \
+ midispcur.c \
+ mieq.c \
+ miexpose.c \
+ mifillarc.c \
+ mifillarc.h \
+ mifillrct.c \
+ mifpolycon.c \
+ mifpoly.h \
+ migc.c \
+ migc.h \
+ miglblt.c \
+ miline.h \
+ mioverlay.c \
+ mioverlay.h \
+ mipointer.c \
+ mipointer.h \
+ mipointrst.h \
+ mipoly.c \
+ mipoly.h \
+ mipolycon.c \
+ mipolygen.c \
+ mipolypnt.c \
+ mipolyrect.c \
+ mipolyseg.c \
+ mipolytext.c \
+ mipolyutil.c \
+ mipushpxl.c \
+ miscanfill.h \
+ miscrinit.c \
+ mispans.c \
+ mispans.h \
+ misprite.c \
+ misprite.h \
+ mistruct.h \
+ mivaltree.c \
+ mivalidate.h \
+ miwideline.c \
+ miwideline.h \
+ miwindow.c \
+ mizerarc.c \
+ mizerarc.h \
+ mizerclip.c \
+ mizerline.c
diff --git a/xorg-server/mi/mibstore.c b/xorg-server/mi/mibstore.c
deleted file mode 100644
index 6cadb2b8f..000000000
--- a/xorg-server/mi/mibstore.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2007 Red Hat, Inc.
- *
- * 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 (including the next
- * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-#include "scrnintstr.h"
-#include "mibstore.h"
-
-/*
- * There is no longer an mi implementation of backing store. This function
- * is only for source compatibility with old drivers.
- *
- * Note though that you do get backing store for free if your server has
- * Composite enabled, since the automatic redirection mechanism provides
- * essentially the same functionality. See compChangeWindowAttributes()
- * for the implementation.
- */
-
-void
-miInitializeBackingStore(ScreenPtr pScreen)
-{
-}
diff --git a/xorg-server/mi/mibstore.h b/xorg-server/mi/mibstore.h
deleted file mode 100644
index f8ed4446d..000000000
--- a/xorg-server/mi/mibstore.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*-
- * mibstore.h --
- * Header file for users of the MI backing-store scheme.
- *
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
-#ifndef _MIBSTORE_H
-#define _MIBSTORE_H
-
-#include "screenint.h"
-
-#define miInitializeBackingStore(x) do {} while (0)
-
-#endif /* _MIBSTORE_H */
diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c
index 2d2b4228f..a98c20ec0 100644
--- a/xorg-server/miext/damage/damage.c
+++ b/xorg-server/miext/damage/damage.c
@@ -436,9 +436,13 @@ damageCreateGC(GCPtr pGC)
static void
damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
+ drawableDamage(pDrawable);
DAMAGE_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
- pGCPriv->ops = pGC->ops; /* just so it's not NULL */
+ if (pDamage)
+ pGCPriv->ops = pGC->ops; /* so it's not NULL, so FUNC_EPILOGUE does work */
+ else
+ pGCPriv->ops = NULL;
DAMAGE_GC_FUNC_EPILOGUE(pGC);
}
@@ -1663,14 +1667,38 @@ miDamageCreate(DamagePtr pDamage)
{
}
+/*
+ * We only wrap into the GC when there's a registered listener. For windows,
+ * damage includes damage to children. So if there's a GC validated against
+ * a subwindow and we then register a damage on the parent, we need to bump
+ * the serial numbers of the children to re-trigger validation.
+ *
+ * Since we can't know if a GC has been validated against one of the affected
+ * children, just bump them all to be safe.
+ */
+static int
+damageRegisterVisit(WindowPtr pWin, void *data)
+{
+ pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ return WT_WALKCHILDREN;
+}
+
void
miDamageRegister(DrawablePtr pDrawable, DamagePtr pDamage)
{
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ TraverseTree((WindowPtr)pDrawable, damageRegisterVisit, NULL);
+ else
+ pDrawable->serialNumber = NEXT_SERIAL_NUMBER;
}
void
miDamageUnregister(DrawablePtr pDrawable, DamagePtr pDamage)
{
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ TraverseTree((WindowPtr)pDrawable, damageRegisterVisit, NULL);
+ else
+ pDrawable->serialNumber = NEXT_SERIAL_NUMBER;
}
void
diff --git a/xorg-server/xkeyboard-config/symbols/lv b/xorg-server/xkeyboard-config/symbols/lv
index 6bd15e60d..567caa658 100644
--- a/xorg-server/xkeyboard-config/symbols/lv
+++ b/xorg-server/xkeyboard-config/symbols/lv
@@ -1,3 +1,4 @@
+// $XKeyboardConfig$
// Latvian keymap version 1.1
// Copyright (C) Dmitry Golubev <lastguru@mail.ru>, 2003-2004
//
@@ -279,10 +280,10 @@ xkb_symbols "modern" {
key <AD01> {[ emacron, Emacron, emacron, Emacron ]};
key <AD02> {[ o, O, omacron, Omacron ]};
key <AD03> {[ amacron, Amacron, amacron, Amacron ]};
- key <AD04> {[ p, P, p, P ]};
- key <AD05> {[ b, B, b, B ]};
- key <AD06> {[ j, J, j, J ]};
- key <AD07> {[ d, D, d, D ]};
+ key <AD04> {[ p, P, question, P ]};
+ key <AD05> {[ b, B, exclam, B ]};
+ key <AD06> {[ j, J, emdash, J ]};
+ key <AD07> {[ d, D, endash, D ]};
key <AD08> {[ imacron, Imacron, imacron, Imacron ]};
key <AD09> {[ l, L, lcedilla, Lcedilla ]};
key <AD10> {[ g, G, gcedilla, Gcedilla ]};
@@ -306,10 +307,10 @@ xkb_symbols "modern" {
key <AB01> {[ x, X, q, Q ]};
key <AB02> {[ z, Z, zcaron, Zcaron ]};
key <AB03> {[ c, C, ccaron, Ccaron ]};
- key <AB04> {[ v, V, period, V ]};
- key <AB05> {[ w, W, slash, W ]};
- key <AB06> {[ f, F, bar, F ]};
- key <AB07> {[ y, Y, backslash, Y ]};
+ key <AB04> {[ v, V, bar, V ]};
+ key <AB05> {[ w, W, backslash, W ]};
+ key <AB06> {[ f, F, period, F ]};
+ key <AB07> {[ y, Y, slash, Y ]};
key <AB08> {[ h, H, U263A, U2639 ]};
key <AB09> {[ comma, semicolon, less, multiply ]};
key <AB10> {[ period, colon, greater, division ]};