summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-11-05 19:08:36 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-11-05 19:08:36 -0500
commita52c9b2a59f27266557ff9d5d2c08492e04135a6 (patch)
tree705f11c54e8a31a07dde9ab6835032e2849e132b /hw
parentc7e18beb3c87eb1ada9b21c4ffacd11c1939c087 (diff)
parent58332894c061ae96d6a457f65266660f5f65e88b (diff)
Merge branch 'master' into XACE-SELINUX
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
Diffstat (limited to 'hw')
-rw-r--r--hw/darwin/XDarwin.man2
-rw-r--r--hw/darwin/apple/X11.icnsbin28104 -> 65908 bytes
-rw-r--r--hw/darwin/apple/X11Application.h2
-rw-r--r--hw/darwin/apple/X11Application.m3
-rw-r--r--hw/darwin/apple/X11Controller.m20
-rw-r--r--hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp1
-rw-r--r--hw/darwin/bundle/English.lproj/Localizable.strings1
-rw-r--r--hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp2
-rw-r--r--hw/darwin/bundle/startXClients.cpp2
-rw-r--r--hw/darwin/darwin.c2
-rw-r--r--hw/darwin/darwin.h1
-rw-r--r--hw/darwin/quartz/Preferences.m1
-rw-r--r--hw/darwin/quartz/XApplication.m3
-rw-r--r--hw/darwin/quartz/XDarwinStartup.man1
-rw-r--r--hw/darwin/quartz/XServer.m1
-rw-r--r--hw/darwin/quartz/applewm.c2
-rw-r--r--hw/darwin/quartz/cr/XView.m1
-rw-r--r--hw/darwin/quartz/cr/crAppleWM.m4
-rw-r--r--hw/darwin/quartz/cr/crFrame.m4
-rw-r--r--hw/darwin/quartz/cr/crScreen.m5
-rw-r--r--hw/darwin/quartz/fullscreen/quartzCursor.h3
-rw-r--r--hw/darwin/quartz/keysym2ucs.c3
-rw-r--r--hw/darwin/quartz/quartz.c23
-rw-r--r--hw/darwin/quartz/quartz.h3
-rw-r--r--hw/darwin/quartz/quartzCocoa.m13
-rw-r--r--hw/darwin/quartz/quartzCursor.h3
-rw-r--r--hw/darwin/quartz/quartzKeyboard.c62
-rw-r--r--hw/darwin/quartz/xpr/dri.c2
-rw-r--r--hw/darwin/quartz/xpr/xprCursor.c13
-rw-r--r--hw/darwin/quartz/xpr/xprFrame.c5
-rw-r--r--hw/darwin/quartz/xpr/xprScreen.c31
-rw-r--r--hw/dmx/dmx-config.h2
-rw-r--r--hw/dmx/dmx.c48
-rw-r--r--hw/dmx/dmxextension.c12
-rw-r--r--hw/dmx/dmxpict.c10
-rw-r--r--hw/dmx/dmxpixmap.c3
-rw-r--r--hw/dmx/dmxpixmap.h3
-rw-r--r--hw/kdrive/ephyr/XF86dri.c11
-rw-r--r--hw/kdrive/epson/epson13806.c4
-rw-r--r--hw/kdrive/fbdev/fbdev.c4
-rw-r--r--hw/kdrive/igs/igsdraw.c12
-rw-r--r--hw/kdrive/nvidia/nvidiavideo.c4
-rw-r--r--hw/kdrive/savage/s3draw.c32
-rw-r--r--hw/kdrive/sis530/sisdraw.c16
-rw-r--r--hw/kdrive/smi/smivideo.c4
-rw-r--r--hw/kdrive/src/kaa.c2
-rw-r--r--hw/kdrive/src/kxv.c4
-rw-r--r--hw/vfb/InitOutput.c12
-rw-r--r--hw/xfree86/Makefile.am5
-rw-r--r--hw/xfree86/common/xf86Config.c17
-rw-r--r--hw/xfree86/common/xf86Configure.c4
-rw-r--r--hw/xfree86/common/xf86Cursor.c8
-rw-r--r--hw/xfree86/common/xf86DGA.c2
-rw-r--r--hw/xfree86/common/xf86Events.c2
-rw-r--r--hw/xfree86/common/xf86MiscExt.c20
-rw-r--r--hw/xfree86/common/xf86VidMode.c46
-rw-r--r--hw/xfree86/common/xf86Xinput.c5
-rw-r--r--hw/xfree86/common/xf86sbusBus.c4
-rw-r--r--hw/xfree86/common/xf86xv.c4
-rw-r--r--hw/xfree86/dixmods/extmod/Makefile.am14
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c16
-rw-r--r--hw/xfree86/dixmods/glxmodule.c2
-rw-r--r--hw/xfree86/doc/man/xorg.conf.man.pre15
-rw-r--r--hw/xfree86/dri/xf86dri.c2
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.c2
-rw-r--r--hw/xfree86/modes/xf86Crtc.h5
-rw-r--r--hw/xfree86/modes/xf86Modes.c3
-rw-r--r--hw/xfree86/modes/xf86RandR12.c26
-rw-r--r--hw/xfree86/os-support/linux/lnx_mouse.c32
-rw-r--r--hw/xfree86/os-support/shared/sigio.c6
-rw-r--r--hw/xfree86/parser/Files.c9
-rw-r--r--hw/xfree86/parser/Flags.c2
-rw-r--r--hw/xfree86/parser/Monitor.c2
-rw-r--r--hw/xfree86/parser/scan.c2
-rw-r--r--hw/xfree86/parser/xf86Parser.h1
-rw-r--r--hw/xfree86/parser/xf86tokens.h1
-rw-r--r--hw/xfree86/rac/xf86RAC.c7
-rw-r--r--hw/xfree86/shadowfb/shadow.c6
-rw-r--r--hw/xfree86/utils/xorgcfg/expert.c18
-rw-r--r--hw/xfree86/utils/xorgcfg/interface.c6
-rw-r--r--hw/xfree86/utils/xorgcfg/startx.c3
-rw-r--r--hw/xfree86/utils/xorgcfg/xorgcfg.man.pre4
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c13
-rw-r--r--hw/xfree86/vbe/vbeModes.c28
-rw-r--r--hw/xfree86/vgahw/vgaCmap.c12
-rw-r--r--hw/xfree86/xaa/xaaBitBlt.c4
-rw-r--r--hw/xfree86/xaa/xaaCpyArea.c26
-rw-r--r--hw/xfree86/xaa/xaaCpyWin.c4
-rw-r--r--hw/xfree86/xaa/xaaInit.c12
-rw-r--r--hw/xfree86/xaa/xaaNonTEText.c4
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c4
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c8
-rw-r--r--hw/xfree86/xaa/xaaPCache.c16
-rw-r--r--hw/xfree86/xaa/xaaPict.c4
-rw-r--r--hw/xfree86/xaa/xaaTEGlyph.c8
-rw-r--r--hw/xfree86/xf4bpp/mfbimggblt.c4
-rw-r--r--hw/xfree86/xf4bpp/ppcCpArea.c30
-rw-r--r--hw/xfree86/xf4bpp/ppcFillRct.c4
-rw-r--r--hw/xfree86/xf4bpp/ppcIO.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcImg.c7
-rw-r--r--hw/xfree86/xf4bpp/ppcPixFS.c22
-rw-r--r--hw/xfree86/xf4bpp/ppcPixmap.c5
-rw-r--r--hw/xfree86/xf4bpp/ppcWinFS.c22
-rw-r--r--hw/xfree86/xf4bpp/ppcWindow.c6
-rw-r--r--hw/xfree86/xf4bpp/xf4bpp.h3
-rw-r--r--hw/xfree86/xf8_32bpp/cfbcpyarea.c26
-rw-r--r--hw/xfree86/xf8_32bpp/cfbwindow.c4
-rw-r--r--hw/xfree86/xf8_32bpp/xf86overlay.c9
-rw-r--r--hw/xfree86/xorgconf.cpp6
-rw-r--r--hw/xgl/xgl.h3
-rw-r--r--hw/xgl/xglglyph.c3
-rw-r--r--hw/xgl/xglpict.c2
-rw-r--r--hw/xgl/xglpixmap.c3
-rw-r--r--hw/xgl/xglscreen.c2
-rw-r--r--hw/xgl/xglshm.c3
-rw-r--r--hw/xgl/xgltrap.c3
-rw-r--r--hw/xgl/xglxv.c2
-rw-r--r--hw/xnest/Pixmap.c3
-rw-r--r--hw/xnest/XNPixmap.h2
-rw-r--r--hw/xprint/pcl/PclArea.c3
-rw-r--r--hw/xprint/pcl/PclGC.c3
-rw-r--r--hw/xprint/ps/Ps.h2
-rw-r--r--hw/xprint/ps/PsPixmap.c3
-rw-r--r--hw/xprint/ps/PsText.c4
-rw-r--r--hw/xwin/InitOutput.c18
-rw-r--r--hw/xwin/win.h3
-rw-r--r--hw/xwin/winconfig.c23
-rw-r--r--hw/xwin/winconfig.h1
-rw-r--r--hw/xwin/winpixmap.c6
-rwxr-xr-xhw/xwin/winprocarg.c10
-rw-r--r--hw/xwin/winwindow.c4
138 files changed, 452 insertions, 664 deletions
diff --git a/hw/darwin/XDarwin.man b/hw/darwin/XDarwin.man
index eb1b9dcb8..6fc9aec0f 100644
--- a/hw/darwin/XDarwin.man
+++ b/hw/darwin/XDarwin.man
@@ -1,5 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.3 2001/09/23 23:02:37 torrey Exp $
-.\"
.TH XDARWIN 1 __vendorversion__
.SH NAME
XDarwin \- X window system server for Darwin operating system
diff --git a/hw/darwin/apple/X11.icns b/hw/darwin/apple/X11.icns
index 4c4717726..d770e617d 100644
--- a/hw/darwin/apple/X11.icns
+++ b/hw/darwin/apple/X11.icns
Binary files differ
diff --git a/hw/darwin/apple/X11Application.h b/hw/darwin/apple/X11Application.h
index eb205a1cd..861565798 100644
--- a/hw/darwin/apple/X11Application.h
+++ b/hw/darwin/apple/X11Application.h
@@ -79,7 +79,7 @@ extern void X11ApplicationMain (int argc, const char *argv[],
extern int X11EnableKeyEquivalents;
extern int quartzHasRoot, quartzEnableRootless;
-#define APP_PREFS "org.x.x11"
+#define APP_PREFS "org.x.X11"
#define PREFS_APPSMENU "apps_menu"
#define PREFS_FAKEBUTTONS "enable_fake_buttons"
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 41cf425c6..6b235ad0b 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -45,7 +45,7 @@
#include <unistd.h>
#include <pthread.h>
-#define DEFAULTS_FILE "/usr/X11/lib/X11xserver/Xquartz.plist"
+#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
int X11EnableKeyEquivalents = TRUE;
int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
@@ -311,6 +311,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
[NSApp activateIgnoringOtherApps:YES];
if ([self modalWindow] == nil) [self activateX:YES];
+ QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
}
- (void) set_can_quit:(NSNumber *)state {
diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/apple/X11Controller.m
index acac313f4..fbc9c7402 100644
--- a/hw/darwin/apple/X11Controller.m
+++ b/hw/darwin/apple/X11Controller.m
@@ -1,5 +1,4 @@
/* X11Controller.m -- connect the IB ui, also the NSApp delegate
- $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $
Copyright (c) 2002-2007 Apple Inc. All rights reserved.
@@ -294,26 +293,17 @@
- (void) launch_client:(NSString *)filename
{
const char *command = [filename UTF8String];
- const char *shell;
- const char *argv[5];
+ const char *argv[7];
int child1, child2 = 0;
int status;
- /* this old code doesn't work with csh ...
- shell = getenv("SHELL");
- if (shell == NULL) shell = "/bin/bash";
-
- argv[0] = shell;
- argv[1] = "-l";
- argv[2] = "-c";
- argv[3] = command;
- argv[4] = NULL;
- ... but the new code doesn't work with spaces in a command :(
- */
-
argv[0] = "/usr/bin/login";
argv[1] = "-fp";
argv[2] = getlogin();
+ argv[3] = "/bin/sh";
+ argv[4] = "-c";
+ argv[5] = command;
+ argv[6] = NULL;
/* Do the fork-twice trick to avoid having to reap zombies */
diff --git a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
index 1113b8ae6..4b8e6f5cb 100644
--- a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
index aeb210342..268b80091 100644
--- a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
+++ b/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
@@ -1,5 +1,4 @@
/* English versions of the Info.plist keys; used by most localizations. */
/* Most of these are set in the target application settings. */
-/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.3 2002/07/17 01:24:55 torrey Exp $ */
NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__;
diff --git a/hw/darwin/bundle/English.lproj/Localizable.strings b/hw/darwin/bundle/English.lproj/Localizable.strings
index 2c25c1dc3..6f6487902 100644
--- a/hw/darwin/bundle/English.lproj/Localizable.strings
+++ b/hw/darwin/bundle/English.lproj/Localizable.strings
@@ -1,5 +1,4 @@
/* English localized versions of strings used by the Mac OS X front end. */
-/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.3 2002/01/30 06:50:46 torrey Exp $ */
/* Title of alert panel */
"Quit X server?" = "Quit X server?";
diff --git a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
index 5996285ae..db33670d9 100644
--- a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
index 2a14793db..512416b1b 100644
--- a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
-
<html>
<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
index 5996285ae..db33670d9 100644
--- a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
index 7ef1ba5d8..6800171d9 100644
--- a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ --><html><body>
-
<head>
<title>XDarwin Help</title>
</head>
diff --git a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
index 5cd27862d..a79e6f95f 100644
--- a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Ayuda</title>
diff --git a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
index 4210878c0..ab940ec3d 100644
--- a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
index 5996285ae..db33670d9 100644
--- a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
+++ b/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
@@ -1,5 +1,3 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
-
<html>
<head>
<title>XDarwin Help</title>
diff --git a/hw/darwin/bundle/startXClients.cpp b/hw/darwin/bundle/startXClients.cpp
index 51cdb5c9e..f812dbfd8 100644
--- a/hw/darwin/bundle/startXClients.cpp
+++ b/hw/darwin/bundle/startXClients.cpp
@@ -2,8 +2,6 @@ XCOMM!/bin/sh
XCOMM This script is used by XDarwin to start X clients when XDarwin is
XCOMM launched from the Finder.
-XCOMM
-XCOMM $XFree86: $
userclientrc=$HOME/.xinitrc
sysclientrc=XINITDIR/xinitrc
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index 1c18cd2ac..c32cd5461 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -3,8 +3,6 @@
* Shared code for the Darwin X Server
* running with Quartz or IOKit display mode
*
- **************************************************************/
-/*
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
* Copyright (c) 2007 Apple Inc.
*
diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h
index 20f45be93..77657460c 100644
--- a/hw/darwin/darwin.h
+++ b/hw/darwin/darwin.h
@@ -141,6 +141,7 @@ enum {
kXDarwinQuit, // kill the X server and release the display
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
+ kXDarwinBringAllToFront, // bring all X windows to front
/*
* AppleWM events
*/
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
index 6fca3b655..0425392ae 100644
--- a/hw/darwin/quartz/Preferences.m
+++ b/hw/darwin/quartz/Preferences.m
@@ -30,7 +30,6 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
#include <dix-config.h>
diff --git a/hw/darwin/quartz/XApplication.m b/hw/darwin/quartz/XApplication.m
index e0ee8d9c6..c18d9a570 100644
--- a/hw/darwin/quartz/XApplication.m
+++ b/hw/darwin/quartz/XApplication.m
@@ -2,7 +2,7 @@
// XApplication.m
//
// Created by Andreas Monitzer on January 6, 2001.
-//
+
/*
* Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
*
@@ -30,7 +30,6 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: $ */
#import "XApplication.h"
diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man
index 9bf7dfabd..1ad3bbced 100644
--- a/hw/darwin/quartz/XDarwinStartup.man
+++ b/hw/darwin/quartz/XDarwinStartup.man
@@ -1,4 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $
.TH XDarwinStartup 1
.SH NAME
XDarwinStartup - Startup program for the XDarwin X window server
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
index 14776f888..f8173cb7f 100644
--- a/hw/darwin/quartz/XServer.m
+++ b/hw/darwin/quartz/XServer.m
@@ -34,7 +34,6 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
#include <dix-config.h>
#include "quartzCommon.h"
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index 8b9f1ee81..fecafe8fb 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
+Copyright (c) 2002-2007 Apple Inc. All Rights Reserved.
Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m
index 0cea250bb..8379f9476 100644
--- a/hw/darwin/quartz/cr/XView.m
+++ b/hw/darwin/quartz/cr/XView.m
@@ -29,7 +29,6 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */
#include <dix-config.h>
diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m
index a583581dc..a0259c3f8 100644
--- a/hw/darwin/quartz/cr/crAppleWM.m
+++ b/hw/darwin/quartz/cr/crAppleWM.m
@@ -1,7 +1,6 @@
/*
* Cocoa rootless implementation functions for AppleWM extension
- */
-/*
+ *
* Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,7 +25,6 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */
#include <dix-config.h>
diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m
index 3c1f0bb28..79697fbac 100644
--- a/hw/darwin/quartz/cr/crFrame.m
+++ b/hw/darwin/quartz/cr/crFrame.m
@@ -1,7 +1,6 @@
/*
* Cocoa rootless implementation frame functions
- */
-/*
+ *
* Copyright (c) 2001 Greg Parker. All Rights Reserved.
* Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
*
@@ -27,7 +26,6 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */
#include <dix-config.h>
diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m
index 8c0966578..504e7b37a 100644
--- a/hw/darwin/quartz/cr/crScreen.m
+++ b/hw/darwin/quartz/cr/crScreen.m
@@ -1,8 +1,6 @@
-/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.4 2004/08/12 20:24:36 torrey Exp $ */
/*
* Cocoa rootless implementation initialization
- */
-/*
+ *
* Copyright (c) 2001 Greg Parker. All Rights Reserved.
* Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
*
@@ -28,7 +26,6 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
#include <dix-config.h>
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h
index 57fac68a5..56a02098d 100644
--- a/hw/darwin/quartz/fullscreen/quartzCursor.h
+++ b/hw/darwin/quartz/fullscreen/quartzCursor.h
@@ -2,8 +2,7 @@
* quartzCursor.h
*
* External interface for Quartz hardware cursor
- */
-/*
+ *
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/keysym2ucs.c b/hw/darwin/quartz/keysym2ucs.c
index 3be59df33..8626ebc4e 100644
--- a/hw/darwin/quartz/keysym2ucs.c
+++ b/hw/darwin/quartz/keysym2ucs.c
@@ -1,4 +1,5 @@
-/*
+/*
+ *
* This module converts keysym values into the corresponding ISO 10646
* (UCS, Unicode) values.
*
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index 2899bc2ca..61a752026 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -1,9 +1,7 @@
-/**************************************************************
+/*
*
* Quartz-specific support for the Darwin X Server
*
- **************************************************************/
-/*
* Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
* All Rights Reserved.
*
@@ -64,7 +62,7 @@ int quartzServerVisible = TRUE;
int quartzServerQuitting = FALSE;
DevPrivateKey quartzScreenKey = &quartzScreenKey;
int aquaMenuBarHeight = 0;
-int noPseudoramiXExtension = TRUE;
+int noPseudoramiXExtension = FALSE;
QuartzModeProcsPtr quartzProcs = NULL;
const char *quartzOpenGLBundle = NULL;
@@ -389,11 +387,22 @@ void DarwinModeProcessEvent(
QuartzUpdateScreens();
break;
- case kXDarwinWindowState:
- case kXDarwinWindowMoved:
- // FIXME: Not implemented yet
+ case kXDarwinBringAllToFront:
+ RootlessOrderAllWindows();
break;
+ case kXDarwinWindowState:
+ ErrorF("kXDarwinWindowState\n");
+ break;
+ case kXDarwinWindowMoved: {
+ WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
+ short x = xe->u.clientMessage.u.l.longs1,
+ y = xe->u.clientMessage.u.l.longs2;
+ ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
+ RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
+ }
+ break;
+
default:
ErrorF("Unknown application defined event type %d.\n",
xe->u.u.type);
diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h
index f1b36b6b1..fa7499df1 100644
--- a/hw/darwin/quartz/quartz.h
+++ b/hw/darwin/quartz/quartz.h
@@ -3,8 +3,7 @@
*
* External interface of the Quartz display modes seen by the generic, mode
* independent parts of the Darwin X server.
- */
-/*
+ *
* Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index 5bc1501a6..3987cd2c2 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -1,4 +1,3 @@
-/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.2 2004/04/23 19:15:17 eich Exp $ */
/**************************************************************
*
* Quartz-specific support for the Darwin X Server
@@ -7,8 +6,6 @@
* This file is separate from the parts of Quartz support
* that use X include files to avoid symbol collisions.
*
- **************************************************************/
-/*
* Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
@@ -34,7 +31,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
+
#include <dix-config.h>
#include "quartzCommon.h"
@@ -45,14 +42,16 @@
#include <Cocoa/Cocoa.h>
+#ifndef INXQUARTZ
#import "Preferences.h"
+#endif
#include "pseudoramiX.h"
extern void FatalError(const char *, ...);
extern char *display;
extern int noPanoramiXExtension;
-
+#ifndef INXQUARTZ
/*
* QuartzReadPreferences
* Read the user preferences from the Cocoa front end.
@@ -98,7 +97,7 @@ void QuartzReadPreferences(void)
darwinDesiredDepth = [Preferences depth] - 1;
}
-
+#endif
/*
* QuartzWriteCocoaPasteboard
@@ -163,6 +162,7 @@ char *QuartzReadCocoaPasteboard(void)
int QuartzFSUseQDCursor(
int depth) // screen depth
{
+#ifndef INXQUARTZ
switch ([Preferences useQDCursor]) {
case qdCursor_Always:
return TRUE;
@@ -174,6 +174,7 @@ int QuartzFSUseQDCursor(
else
return FALSE;
}
+#endif
return TRUE;
}
diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h
index 57fac68a5..56a02098d 100644
--- a/hw/darwin/quartz/quartzCursor.h
+++ b/hw/darwin/quartz/quartzCursor.h
@@ -2,8 +2,7 @@
* quartzCursor.h
*
* External interface for Quartz hardware cursor
- */
-/*
+ *
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index f81ef0abc..b580a8e84 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -217,42 +217,41 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES;
UInt32 keyboard_type = 0;
- int is_uchr, i, j;
+ int is_uchr = 1, i, j;
OSStatus err;
KeySym *k;
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
- if (currentKeyLayoutRef)
- {
- CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
- if (currentKeyLayoutDataRef)
- chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
- }
-
- if (chr_data != NULL)
- {
- KLGetCurrentKeyboardLayout (&key_layout);
- KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
-
- if (chr_data != NULL)
+ if (currentKeyLayoutRef)
{
- is_uchr = 1;
- keyboard_type = LMGetKbdType ();
+ CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
+ if (currentKeyLayoutDataRef)
+ chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+ }
+
+ if(chr_data == NULL) {
+ KLGetCurrentKeyboardLayout (&key_layout);
+ KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+
+ if (chr_data != NULL)
+ {
+ is_uchr = 1;
+ keyboard_type = LMGetKbdType ();
+ }
+ else
+ {
+ KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+
+ if (chr_data == NULL)
+ {
+ ErrorF ( "Couldn't get uchr or kchr resource\n");
+ return FALSE;
+ }
+
+ is_uchr = 0;
+ num_keycodes = 128;
+ }
}
- else
- {
- KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
-
- if (chr_data == NULL)
- {
- ErrorF ( "Couldn't get uchr or kchr resource\n");
- return FALSE;
- }
-
- is_uchr = 0;
- num_keycodes = 128;
- }
- }
/* Scan the keycode range for the Unicode character that each
key produces in the four shift states. Then convert that to
@@ -376,8 +375,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
}
}
}
-
- if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
+ if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
return TRUE;
}
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index 22dc21850..379d3c0e9 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -229,7 +229,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify;
pScreen->ClipNotify = DRIClipNotify;
- ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
+ // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
return TRUE;
}
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c
index 776dc005d..e3ae9e977 100644
--- a/hw/darwin/quartz/xpr/xprCursor.c
+++ b/hw/darwin/quartz/xpr/xprCursor.c
@@ -2,8 +2,6 @@
*
* Xplugin cursor support
*
- **************************************************************/
-/*
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* Copyright (c) 2002 Apple Computer, Inc.
* All Rights Reserved.
@@ -83,8 +81,17 @@ load_cursor(CursorPtr src, int screen)
#ifdef ARGB_CURSOR
if (src->bits->argb != NULL)
{
- rowbytes = src->bits->width * sizeof(CARD32);
+#if BITMAP_BIT_ORDER == MSBFirst
+ rowbytes = src->bits->width * sizeof (CARD32);
data = (uint32_t *) src->bits->argb;
+#else
+ const uint32_t *be_data=(uint32_t *) src->bits->argb;
+ unsigned i;
+ rowbytes = src->bits->width * sizeof (CARD32);
+ data=alloca (rowbytes * src->bits->height);
+ for(i=0;i<(src->bits->width*src->bits->height);i++)
+ data[i]=ntohl(be_data[i]);
+#endif
}
else
#endif
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index c5b84f08b..0d12bf9ef 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -1,7 +1,6 @@
/*
* Xplugin rootless implementation frame functions
- */
-/*
+ *
* Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
* Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
*
@@ -411,7 +410,7 @@ xprInit(ScreenPtr pScreen)
* Given the id of a physical window, try to find the top-level (or root)
* X window that it represents.
*/
-static WindowPtr
+WindowPtr
xprGetXWindow(xp_window_id wid)
{
RootlessWindowRec *winRec;
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index b0ddece3f..709e6e8cc 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -1,7 +1,6 @@
/*
* Xplugin rootless implementation screen functions
- */
-/*
+ *
* Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
* Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved.
*
@@ -46,6 +45,10 @@
# include "damage.h"
#endif
+/* 10.4's deferred update makes X slower.. have to live with the tearing
+ for now.. */
+#define XP_NO_DEFERRED_UPDATES 8
+
// Name of GLX bundle for native OpenGL
static const char *xprOpenGLBundle = "glxCGL.bundle";
@@ -60,10 +63,12 @@ eventHandler(unsigned int type, const void *arg,
switch (type)
{
case XP_EVENT_DISPLAY_CHANGED:
+ // ErrorF("XP_EVENT_DISPLAY_MOVED\n");
QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
break;
case XP_EVENT_WINDOW_STATE_CHANGED:
+ // ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n");
if (arg_size >= sizeof(xp_window_state_event))
{
const xp_window_state_event *ws_arg = arg;
@@ -74,16 +79,24 @@ eventHandler(unsigned int type, const void *arg,
break;
case XP_EVENT_WINDOW_MOVED:
+ // ErrorF("XP_EVENT_WINDOW_MOVED\n");
if (arg_size == sizeof(xp_window_id))
{
xp_window_id id = * (xp_window_id *) arg;
-
- QuartzMessageServerThread(kXDarwinWindowMoved, 1, id);
+ WindowPtr pWin = xprGetXWindow(id);
+ BoxRec box;
+ xp_error retval = xp_get_window_bounds(id, &box);
+ if (retval != Success) {
+ ErrorF("Unable to find new bounds for window\n");
+ break;
+ }
+ QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1);
}
break;
case XP_EVENT_SURFACE_DESTROYED:
case XP_EVENT_SURFACE_CHANGED:
+ // ErrorF("XP_EVENT_SURFACE_MOVED\n");
if (arg_size == sizeof(xp_surface_id))
{
int kind;
@@ -177,15 +190,15 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
frame = displayScreenBounds(dpy);
- ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
+ /* ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
(int)frame.size.width, (int)frame.size.height,
- (int)frame.origin.x, (int)frame.origin.y);
+ (int)frame.origin.x, (int)frame.origin.y); */
frame.origin.x -= unionRect.origin.x;
frame.origin.y -= unionRect.origin.y;
- ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
- i, (int)frame.origin.x, (int)frame.origin.y);
+ /* ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
+ i, (int)frame.origin.x, (int)frame.origin.y); */
PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height);
@@ -203,7 +216,7 @@ xprDisplayInit(void)
{
CGDisplayCount displayCount;
- ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
+ // ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
CGGetActiveDisplayList(0, NULL, &displayCount);
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 18a05356b..343fdabf5 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -83,9 +83,7 @@
#undef XF86MISC
#undef XFreeXDGA
#undef XF86DRI
-#undef MITSHM
#undef TOGCUP
-#undef DPSEXT
#undef MITMISC
#undef SCREENSAVER
#undef RANDR
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index a4d6beb08..840356f02 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -464,7 +464,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
if (!_DMXXineramaActive()) goto noxinerama;
- if (!(attribs = ALLOCATE_LOCAL(stuff->screenCount * sizeof(*attribs))))
+ if (!(attribs = xalloc(stuff->screenCount * sizeof(*attribs))))
return BadAlloc;
for (i = 0; i < stuff->screenCount; i++) {
@@ -483,7 +483,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
&errorScreen);
#endif
- DEALLOCATE_LOCAL(attribs);
+ xfree(attribs);
if (status == BadValue) return status;
@@ -529,7 +529,7 @@ static int ProcDMXAddScreen(ClientPtr client)
value_list = (CARD32 *)(stuff + 1);
count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list);
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
+ if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0';
@@ -537,7 +537,7 @@ static int ProcDMXAddScreen(ClientPtr client)
status = dmxAttachScreen(stuff->physicalScreen, &attr);
- DEALLOCATE_LOCAL(name);
+ xfree(name);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
@@ -657,30 +657,30 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
- if (!(screens = ALLOCATE_LOCAL(count * sizeof(*screens))))
+ if (!(screens = xalloc(count * sizeof(*screens))))
return BadAlloc;
- if (!(windows = ALLOCATE_LOCAL(count * sizeof(*windows)))) {
- DEALLOCATE_LOCAL(screens);
+ if (!(windows = xalloc(count * sizeof(*windows)))) {
+ xfree(screens);
return BadAlloc;
}
- if (!(pos = ALLOCATE_LOCAL(count * sizeof(*pos)))) {
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ if (!(pos = xalloc(count * sizeof(*pos)))) {
+ xfree(windows);
+ xfree(screens);
return BadAlloc;
}
- if (!(vis = ALLOCATE_LOCAL(count * sizeof(*vis)))) {
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ if (!(vis = xalloc(count * sizeof(*vis)))) {
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return BadAlloc;
}
if ((count = dmxPopulate(client, stuff->window, screens, windows,
pos, vis)) < 0) {
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ xfree(vis);
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return BadWindow;
}
@@ -718,10 +718,10 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
WriteToClient(client, count * sizeof(*vis), (char *)vis);
}
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ xfree(vis);
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return client->noClientException;
}
@@ -882,7 +882,7 @@ static int ProcDMXAddInput(ClientPtr client)
value_list = (CARD32 *)(stuff + 1);
count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list);
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
+ if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0';
@@ -890,7 +890,7 @@ static int ProcDMXAddInput(ClientPtr client)
status = dmxAddInput(&attr, &id);
- DEALLOCATE_LOCAL(name);
+ xfree(name);
if (status) return status;
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index 103364446..560468c4b 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -1121,9 +1121,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
}
/* Now allocate the memory we need */
- images = ALLOCATE_LOCAL(len_images*sizeof(char));
- gids = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(Glyph));
- glyphs = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
+ images = xalloc(len_images*sizeof(char));
+ gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph));
+ glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
memset(images, 0, len_images * sizeof(char));
pos = images;
@@ -1159,9 +1159,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
len_images);
/* Clean up */
- DEALLOCATE_LOCAL(len_images);
- DEALLOCATE_LOCAL(gids);
- DEALLOCATE_LOCAL(glyphs);
+ xfree(len_images);
+ xfree(gids);
+ xfree(glyphs);
}
#endif
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index f2110b534..37dfa10ac 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -530,13 +530,13 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
/* The following only works for Render version > 0.2 */
/* All of the XGlyphElt* structure sizes are identical */
- elts = ALLOCATE_LOCAL(nelt * sizeof(XGlyphElt8));
+ elts = xalloc(nelt * sizeof(XGlyphElt8));
if (!elts)
return BadAlloc;
- glyphs = ALLOCATE_LOCAL(nglyph * size);
+ glyphs = xalloc(nglyph * size);
if (!glyphs) {
- DEALLOCATE_LOCAL(elts);
+ xfree(elts);
return BadAlloc;
}
@@ -604,8 +604,8 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
dmxSync(dmxScreen, FALSE);
- DEALLOCATE_LOCAL(elts);
- DEALLOCATE_LOCAL(glyphs);
+ xfree(elts);
+ xfree(glyphs);
}
return ret;
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index f8d012630..d24988204 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -81,7 +81,8 @@ void dmxBECreatePixmap(PixmapPtr pPixmap)
/** Create a pixmap for \a pScreen with the specified \a width, \a
* height, and \a depth. */
-PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
+PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
PixmapPtr pPixmap;
diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h
index 3cfd99e6d..64418340c 100644
--- a/hw/dmx/dmxpixmap.h
+++ b/hw/dmx/dmxpixmap.h
@@ -49,7 +49,8 @@ typedef struct _dmxPixPriv {
extern Bool dmxInitPixmap(ScreenPtr pScreen);
extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
- int width, int height, int depth);
+ int width, int height, int depth,
+ unsigned usage_hint);
extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c
index ae2ec890f..c11da0634 100644
--- a/hw/kdrive/ephyr/XF86dri.c
+++ b/hw/kdrive/ephyr/XF86dri.c
@@ -57,6 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <GL/glx.h>
#include <X11/dri/xf86dri.h>
#include <X11/dri/xf86dristr.h>
+#include "GL/internal/dri_interface.h"
static XExtensionInfo _xf86dri_info_data;
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
@@ -384,8 +385,7 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
context, hHWContext );
}
-GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen,
- __DRIid context )
+Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context)
{
Display * const dpy = (Display *) ndpy;
XExtDisplayInfo *info = find_display (dpy);
@@ -406,8 +406,9 @@ GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen,
return True;
}
-GLboolean XF86DRICreateDrawable( __DRInativeDisplay * ndpy, int screen,
- __DRIid drawable, drm_drawable_t * hHWDrawable )
+Bool
+XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
+ __DRIid drawable, drm_drawable_t * hHWDrawable)
{
Display * const dpy = (Display *) ndpy;
XExtDisplayInfo *info = find_display (dpy);
@@ -436,7 +437,7 @@ GLboolean XF86DRICreateDrawable( __DRInativeDisplay * ndpy, int screen,
return True;
}
-GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
+Bool XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable )
{
Display * const dpy = (Display *) ndpy;
diff --git a/hw/kdrive/epson/epson13806.c b/hw/kdrive/epson/epson13806.c
index cb00890a7..6cf8c9ad9 100644
--- a/hw/kdrive/epson/epson13806.c
+++ b/hw/kdrive/epson/epson13806.c
@@ -331,7 +331,7 @@ epsonCreateColormap (ColormapPtr pmap)
case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries;
- pdefs = ALLOCATE_LOCAL (nent * sizeof (xColorItem));
+ pdefs = xalloc (nent * sizeof (xColorItem));
if (!pdefs)
return FALSE;
for (i = 0; i < nent; i++)
@@ -343,7 +343,7 @@ epsonCreateColormap (ColormapPtr pmap)
pmap->red[i].co.local.green = pdefs[i].green;
pmap->red[i].co.local.blue = pdefs[i].blue;
}
- DEALLOCATE_LOCAL (pdefs);
+ xfree (pdefs);
return TRUE;
default:
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 6e8b3ff5e..177be0bdc 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -598,7 +598,7 @@ fbdevCreateColormap (ColormapPtr pmap)
case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries;
- pdefs = ALLOCATE_LOCAL (nent * sizeof (xColorItem));
+ pdefs = xalloc (nent * sizeof (xColorItem));
if (!pdefs)
return FALSE;
for (i = 0; i < nent; i++)
@@ -610,7 +610,7 @@ fbdevCreateColormap (ColormapPtr pmap)
pmap->red[i].co.local.green = pdefs[i].green;
pmap->red[i].co.local.blue = pdefs[i].blue;
}
- DEALLOCATE_LOCAL (pdefs);
+ xfree (pdefs);
return TRUE;
default:
return fbInitializeColormap (pmap);
diff --git a/hw/kdrive/igs/igsdraw.c b/hw/kdrive/igs/igsdraw.c
index e1ff2befc..677436be5 100644
--- a/hw/kdrive/igs/igsdraw.c
+++ b/hw/kdrive/igs/igsdraw.c
@@ -553,12 +553,12 @@ igsFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
return;
}
nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC));
- pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int));
- pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec));
+ pwidthFree = (int *)xalloc(nTmp * sizeof(int));
+ pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree)
{
- if (pptFree) DEALLOCATE_LOCAL(pptFree);
- if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree);
+ if (pptFree) xfree(pptFree);
+ if (pwidthFree) xfree(pwidthFree);
return;
}
n = miClipSpans(fbGetCompositeClip(pGC),
@@ -607,8 +607,8 @@ igsFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
_igsPatRect(cop,x,y,width,1,cmd);
}
}
- DEALLOCATE_LOCAL(pptFree);
- DEALLOCATE_LOCAL(pwidthFree);
+ xfree(pptFree);
+ xfree(pwidthFree);
KdMarkSync (pDrawable->pScreen);
}
diff --git a/hw/kdrive/nvidia/nvidiavideo.c b/hw/kdrive/nvidia/nvidiavideo.c
index ad7147dd1..2ab41edfd 100644
--- a/hw/kdrive/nvidia/nvidiavideo.c
+++ b/hw/kdrive/nvidia/nvidiavideo.c
@@ -343,7 +343,7 @@ nvidiaPaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn);
- rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle));
+ rects = xalloc (nBox * sizeof (xRectangle));
if (!rects)
goto bail0;
r = rects;
@@ -372,7 +372,7 @@ nvidiaPaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC);
bail1:
- DEALLOCATE_LOCAL (rects);
+ xfree (rects);
bail0:
;
}
diff --git a/hw/kdrive/savage/s3draw.c b/hw/kdrive/savage/s3draw.c
index 311a7dc01..da0d6849f 100644
--- a/hw/kdrive/savage/s3draw.c
+++ b/hw/kdrive/savage/s3draw.c
@@ -518,7 +518,7 @@ s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS)
{
- pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec));
+ pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase)
return;
}
@@ -636,7 +636,7 @@ s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
pboxClippedBase);
}
if (pboxClippedBase != stackRects)
- DEALLOCATE_LOCAL(pboxClippedBase);
+ xfree(pboxClippedBase);
}
void
@@ -770,12 +770,12 @@ s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
else
{
nTmp = n * miFindMaxBand(pClip);
- pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int));
- pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec));
+ pwidthFree = (int *)xalloc(nTmp * sizeof(int));
+ pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree)
{
- if (pptFree) DEALLOCATE_LOCAL(pptFree);
- if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree);
+ if (pptFree) xfree(pptFree);
+ if (pwidthFree) xfree(pwidthFree);
return;
}
n = miClipSpans(fbGetCompositeClip(pGC),
@@ -819,8 +819,8 @@ s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
{
_s3FillSpanLargeStipple (pDrawable, pGC, n, ppt, pwidth);
}
- DEALLOCATE_LOCAL(pptFree);
- DEALLOCATE_LOCAL(pwidthFree);
+ xfree(pptFree);
+ xfree(pwidthFree);
}
MarkSyncS3 (pDrawable->pScreen);
}
@@ -2448,12 +2448,12 @@ s3_24FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
else
{
nTmp = n * miFindMaxBand(pClip);
- pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int));
- pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec));
+ pwidthFree = (int *)xalloc(nTmp * sizeof(int));
+ pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree)
{
- if (pptFree) DEALLOCATE_LOCAL(pptFree);
- if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree);
+ if (pptFree) xfree(pptFree);
+ if (pwidthFree) xfree(pwidthFree);
return;
}
n = miClipSpans(fbGetCompositeClip(pGC),
@@ -2473,8 +2473,8 @@ s3_24FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
_s3SolidRect(s3,x*3,y,width*3,1);
}
}
- DEALLOCATE_LOCAL(pptFree);
- DEALLOCATE_LOCAL(pwidthFree);
+ xfree(pptFree);
+ xfree(pwidthFree);
}
MarkSyncS3 (pDrawable->pScreen);
}
@@ -2609,7 +2609,7 @@ s3_24PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS)
{
- pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec));
+ pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase)
return;
}
@@ -2717,7 +2717,7 @@ s3_24PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
pGC->fgPixel, pGC->alu, pGC->planemask);
}
if (pboxClippedBase != stackRects)
- DEALLOCATE_LOCAL(pboxClippedBase);
+ xfree(pboxClippedBase);
}
void
diff --git a/hw/kdrive/sis530/sisdraw.c b/hw/kdrive/sis530/sisdraw.c
index f2b39a477..595544348 100644
--- a/hw/kdrive/sis530/sisdraw.c
+++ b/hw/kdrive/sis530/sisdraw.c
@@ -1234,12 +1234,12 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
return;
}
nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC));
- pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int));
- pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec));
+ pwidthFree = (int *)xalloc(nTmp * sizeof(int));
+ pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree)
{
- if (pptFree) DEALLOCATE_LOCAL(pptFree);
- if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree);
+ if (pptFree) xfree(pptFree);
+ if (pwidthFree) xfree(pwidthFree);
return;
}
n = miClipSpans(fbGetCompositeClip(pGC),
@@ -1273,8 +1273,8 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
}
}
KdMarkSync (pDrawable->pScreen);
- DEALLOCATE_LOCAL(pptFree);
- DEALLOCATE_LOCAL(pwidthFree);
+ xfree(pptFree);
+ xfree(pwidthFree);
}
#define NUM_STACK_RECTS 1024
@@ -1323,7 +1323,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS)
{
- pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec));
+ pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase)
return;
}
@@ -1448,7 +1448,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
}
}
if (pboxClippedBase != stackRects)
- DEALLOCATE_LOCAL(pboxClippedBase);
+ xfree(pboxClippedBase);
}
static const GCOps sisOps = {
diff --git a/hw/kdrive/smi/smivideo.c b/hw/kdrive/smi/smivideo.c
index 46593a0ee..f372498c0 100644
--- a/hw/kdrive/smi/smivideo.c
+++ b/hw/kdrive/smi/smivideo.c
@@ -342,7 +342,7 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn);
- rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle));
+ rects = xalloc (nBox * sizeof (xRectangle));
if (!rects)
goto bail0;
r = rects;
@@ -371,7 +371,7 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC);
bail1:
- DEALLOCATE_LOCAL (rects);
+ xfree (rects);
bail0:
;
}
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index 486967783..88873513a 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -293,7 +293,7 @@ kaaDestroyPixmap (PixmapPtr pPixmap)
}
static PixmapPtr
-kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
+kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
{
PixmapPtr pPixmap;
KaaPixmapPrivPtr pKaaPixmap;
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index fa506861c..b6ff4f831 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -1915,7 +1915,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn);
- rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle));
+ rects = xalloc (nBox * sizeof (xRectangle));
if (!rects)
goto bail0;
r = rects;
@@ -1944,7 +1944,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC);
bail1:
- DEALLOCATE_LOCAL (rects);
+ xfree (rects);
bail0:
;
}
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 812326a50..0d4ca57fe 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -482,9 +482,9 @@ vfbInstallColormap(ColormapPtr pmap)
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);
- ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel));
- prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb));
- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
+ ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
+ prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
+ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
@@ -499,9 +499,9 @@ vfbInstallColormap(ColormapPtr pmap)
}
(*pmap->pScreen->StoreColors)(pmap, entries, defs);
- DEALLOCATE_LOCAL(ppix);
- DEALLOCATE_LOCAL(prgb);
- DEALLOCATE_LOCAL(defs);
+ xfree(ppix);
+ xfree(prgb);
+ xfree(defs);
}
}
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 9be022010..4afc3a4e5 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -13,14 +13,14 @@ MFB_SUBDIR = xf1bpp xf4bpp
endif
if CFB
-CFB_SUBDIR = xf8_16bpp xf8_32bpp
+CFB_SUBDIR = xf8_32bpp
endif
DOC_SUBDIR = doc
SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \
ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \
- loader dixmods exa modes \
+ xf8_16bpp loader dixmods exa modes \
$(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
@@ -100,7 +100,6 @@ optionsdir = $(libdir)/X11
dist_options_DATA = Options
CPP_FILES_FLAGS = \
- -DRGBPATH=\"$(RGB_DB)\" \
-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 35b62a244..638027432 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -699,21 +699,6 @@ configFiles(XF86ConfFilesPtr fileconf)
}
- /* RgbPath */
-
- pathFrom = X_DEFAULT;
-
- if (xf86coFlag)
- pathFrom = X_CMDLINE;
- else if (fileconf) {
- if (fileconf->file_rgbpath) {
- rgbPath = fileconf->file_rgbpath;
- pathFrom = X_CONFIG;
- }
- }
-
- xf86Msg(pathFrom, "RgbPath set to \"%s\"\n", rgbPath);
-
if (fileconf && fileconf->file_inputdevs) {
xf86InputDeviceList = fileconf->file_inputdevs;
xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n",
@@ -1094,7 +1079,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
}
#ifdef GLXEXT
- xf86Info.glxVisuals = XF86_GlxVisualsAll;
+ xf86Info.glxVisuals = XF86_GlxVisualsTypical;
xf86Info.glxVisualsFrom = X_DEFAULT;
if ((s = xf86GetOptValString(FlagOptions, FLAG_GLX_VISUALS))) {
if (!xf86NameCmp(s, "minimal")) {
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 4c980a291..0cf445cdb 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -605,8 +605,6 @@ configureFilesSection (void)
ptr->file_modulepath = strdup(xf86ModulePath);
if (defaultFontPath)
ptr->file_fontpath = strdup(defaultFontPath);
- if (rgbPath)
- ptr->file_rgbpath = strdup(rgbPath);
return ptr;
}
@@ -823,7 +821,7 @@ DoConfigure()
homebuf[PATH_MAX-1] = '\0';
home = homebuf;
if (!(filename =
- (char *)ALLOCATE_LOCAL(strlen(home) +
+ (char *)xalloc(strlen(home) +
strlen(configfile) + 3)))
if (home[0] == '/' && home[1] == '\0')
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 9e6e62216..3ea1b4d91 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -558,6 +558,14 @@ xf86InitOrigins(void)
screen = &xf86ConfigLayout.screens[i];
+ if (screen->refscreen != NULL &&
+ screen->refscreen->screennum >= xf86NumScreens) {
+ screensLeft &= ~(1 << i);
+ xf86Msg(X_WARNING, "Not including screen \"%s\" in origins calculation.\n",
+ screen->screen->id);
+ continue;
+ }
+
switch(screen->where) {
case PosObsolete:
OldStyleConfig = TRUE;
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 68f538fae..0daf1de44 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -427,7 +427,7 @@ xf86SetDGAMode(
}
if(pMode->flags & DGA_PIXMAP_AVAILABLE) {
- if((pPix = (*pScreen->CreatePixmap)(pScreen, 0, 0, pMode->depth))) {
+ if((pPix = (*pScreen->CreatePixmap)(pScreen, 0, 0, pMode->depth, 0))) {
(*pScreen->ModifyPixmapHeader)(pPix,
pMode->pixmapWidth, pMode->pixmapHeight,
pMode->depth, pMode->bitsPerPixel,
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 574602f43..bc2fe0912 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -510,12 +510,14 @@ static void
xf86SigioReadInput(int fd,
void *closure)
{
+ int errno_save = errno;
int sigstate = xf86BlockSIGIO();
InputInfoPtr pInfo = (InputInfoPtr) closure;
pInfo->read_input(pInfo);
xf86UnblockSIGIO(sigstate);
+ errno = errno_save;
}
/*
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index 655304e8b..c1b9c60fc 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -152,8 +152,6 @@ MiscExtGetMouseSettings(pointer *mouse, char **devname)
{
mseParamsPtr mseptr;
- DEBUG_P("MiscExtGetMouseSettings");
-
mseptr = MiscExtCreateStruct(MISC_POINTER);
if (!mseptr)
return FALSE;
@@ -184,8 +182,6 @@ MiscExtGetMouseValue(pointer mouse, MiscExtMseValType valtype)
{
mseParamsPtr mse = mouse;
- DEBUG_P("MiscExtGetMouseValue");
-
switch (valtype) {
case MISC_MSE_PROTO: return mse->type;
case MISC_MSE_BAUDRATE: return mse->baudrate;
@@ -205,8 +201,6 @@ MiscExtSetMouseValue(pointer mouse, MiscExtMseValType valtype, int value)
{
mseParamsPtr mse = mouse;
- DEBUG_P("MiscExtSetMouseValue");
-
switch (valtype) {
case MISC_MSE_PROTO:
mse->type = value;
@@ -251,8 +245,6 @@ MiscExtSetMouseDevice(pointer mouse, char* device)
_X_EXPORT Bool
MiscExtGetKbdSettings(pointer *kbd)
{
- DEBUG_P("MiscExtGetKbdSettings");
-
return FALSE;
}
@@ -290,8 +282,6 @@ MiscExtClientStateCallback(CallbackListPtr *callbacks,
_X_EXPORT int
MiscExtSetGrabKeysState(ClientPtr client, int state)
{
- DEBUG_P("MiscExtSetGrabKeysState");
-
if (xf86Info.grabInfo.override == NULL ||
xf86Info.grabInfo.override == client) {
if (state == 0 && xf86Info.grabInfo.disabled == 0) {
@@ -318,8 +308,6 @@ MiscExtSetGrabKeysState(ClientPtr client, int state)
_X_EXPORT pointer
MiscExtCreateStruct(MiscExtStructType mse_or_kbd)
{
- DEBUG_P("MiscExtCreateStruct");
-
switch (mse_or_kbd) {
case MISC_POINTER:
{
@@ -348,8 +336,6 @@ MiscExtCreateStruct(MiscExtStructType mse_or_kbd)
_X_EXPORT void
MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd)
{
- DEBUG_P("MiscExtDestroyStruct");
-
switch (mse_or_kbd) {
case MISC_POINTER:
case MISC_KEYBOARD:
@@ -410,8 +396,6 @@ MiscExtAuthorizeDevice(InputInfoPtr pInfo, char *device)
_X_EXPORT MiscExtReturn
MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
{
- DEBUG_P("MiscExtApply");
-
if (mse_or_kbd == MISC_POINTER) {
Bool protoChanged = FALSE;
int oldflags;
@@ -551,8 +535,6 @@ _X_EXPORT Bool
MiscExtGetFilePaths(const char **configfile, const char **modulepath,
const char **logfile)
{
- DEBUG_P("MiscExtGetFilePaths");
-
*configfile = xf86ConfigFile;
*modulepath = xf86ModulePath;
*logfile = xf86LogFile;
@@ -566,8 +548,6 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval,
{
ScrnInfoPtr pScr = xf86Screens[scrnIndex];
- DEBUG_P("MiscExtPassMessage");
-
if (*pScr->HandleMessage == NULL)
return BadImplementation;
return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr);
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 763e5c540..38d605c88 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -67,8 +67,6 @@ VidModeExtensionInit(ScreenPtr pScreen)
#ifdef XF86VIDMODE
VidModePtr pVidMode;
- DEBUG_P("VidModeExtensionInit");
-
if (!xf86GetVidModeEnabled()) {
DEBUG_P("!xf86GetVidModeEnabled()");
return FALSE;
@@ -103,8 +101,6 @@ VidModeClose(int i, ScreenPtr pScreen)
{
VidModePtr pVidMode = VMPTR(pScreen);
- DEBUG_P("VidModeClose");
-
/* This shouldn't happen */
if (!pVidMode)
return FALSE;
@@ -125,8 +121,6 @@ VidModeAvailable(int scrnIndex)
ScrnInfoPtr pScrn;
VidModePtr pVidMode;
- DEBUG_P("VidModeAvailable");
-
if (VidModeKey == NULL) {
DEBUG_P("VidModeKey == NULL");
return FALSE;
@@ -152,8 +146,6 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetCurrentModeline");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -169,8 +161,6 @@ VidModeGetDotClock(int scrnIndex, int Clock)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetDotClock");
-
if (!VidModeAvailable(scrnIndex))
return 0;
@@ -186,8 +176,6 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetNumOfClocks");
-
if (!VidModeAvailable(scrnIndex))
return 0;
@@ -207,8 +195,6 @@ VidModeGetClocks(int scrnIndex, int *Clocks)
ScrnInfoPtr pScrn;
int i;
- DEBUG_P("VidModeGetClocks");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -230,8 +216,6 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
ScrnInfoPtr pScrn;
VidModePtr pVidMode;
- DEBUG_P("VidModeGetFirstModeline");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -256,8 +240,6 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
VidModePtr pVidMode;
DisplayModePtr p;
- DEBUG_P("VidModeGetNextModeline");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -281,8 +263,6 @@ VidModeDeleteModeline(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeDeleteModeline");
-
if ((mode == NULL) || (!VidModeAvailable(scrnIndex)))
return FALSE;
@@ -296,8 +276,6 @@ VidModeZoomViewport(int scrnIndex, int zoom)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeZoomViewPort");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -311,8 +289,6 @@ VidModeSetViewPort(int scrnIndex, int x, int y)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeSetViewPort");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -334,8 +310,6 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetViewPort");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -352,8 +326,6 @@ VidModeSwitchMode(int scrnIndex, pointer mode)
DisplayModePtr pTmpMode;
Bool retval;
- DEBUG_P("VidModeSwitchMode");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -374,8 +346,6 @@ VidModeLockZoom(int scrnIndex, Bool lock)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeLockZoom");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -393,8 +363,6 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetMonitor");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -409,8 +377,6 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeCheckModeForMonitor");
-
if ((mode == NULL) || (!VidModeAvailable(scrnIndex)))
return MODE_ERROR;
@@ -424,8 +390,6 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeCheckModeForDriver");
-
if ((mode == NULL) || (!VidModeAvailable(scrnIndex)))
return MODE_ERROR;
@@ -440,8 +404,6 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode)
ScrnInfoPtr pScrn;
DisplayModePtr ScreenModes;
- DEBUG_P("VidModeSetCrtcForMode");
-
if ((mode == NULL) || (!VidModeAvailable(scrnIndex)))
return;
@@ -460,8 +422,6 @@ VidModeAddModeline(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeAddModeline");
-
if ((mode == NULL) || (!VidModeAvailable(scrnIndex)))
return FALSE;
@@ -484,8 +444,6 @@ VidModeGetNumOfModes(int scrnIndex)
pointer mode = NULL;
int dotClock= 0, nummodes = 0;
- DEBUG_P("VidModeGetNumOfModes");
-
if (!VidModeGetFirstModeline(scrnIndex, &mode, &dotClock))
return nummodes;
@@ -502,8 +460,6 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue)
ScrnInfoPtr pScrn;
Gamma gamma;
- DEBUG_P("VidModeSetGamma");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
@@ -522,8 +478,6 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue)
{
ScrnInfoPtr pScrn;
- DEBUG_P("VidModeGetGamma");
-
if (!VidModeAvailable(scrnIndex))
return FALSE;
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index b694b7303..cd0c30ac1 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -164,6 +164,11 @@ xf86ActivateDevice(LocalDevicePtr local)
dev->coreEvents = local->flags & XI86_ALWAYS_CORE;
RegisterOtherDevice(dev);
+#ifdef XKB
+ if (!noXkbExtension)
+ XkbSetExtension(dev, ProcessKeyboardEvent);
+#endif
+
if (serverGeneration == 1)
xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n",
local->name, local->type_name);
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index 4ec099a19..63d1cb31c 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -622,7 +622,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
int i, index;
sbusCmapPtr cmap;
struct fbcmap fbcmap;
- unsigned char *data = ALLOCATE_LOCAL(numColors*3);
+ unsigned char *data = xalloc(numColors*3);
cmap = SBUSCMAPPTR(pScrn->pScreen);
if (!cmap) return;
@@ -643,7 +643,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
fbcmap.blue[fbcmap.count++] = colors[index].blue;
}
ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
- DEALLOCATE_LOCAL(data);
+ xfree(data);
}
static Bool
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index f972b1f18..7483e20d2 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1847,7 +1847,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y);
- rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle));
+ rects = xalloc(nbox * sizeof(xRectangle));
for(i = 0; i < nbox; i++, pbox++) {
rects[i].x = pbox->x1;
@@ -1860,7 +1860,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
if (!pPriv) FreeGC(pGC, 0);
- DEALLOCATE_LOCAL(rects);
+ xfree(rects);
}
_X_EXPORT void
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
index 9f6c4081b..f90e144ea 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -11,6 +11,14 @@ if XV
XV_SRCS = xvmod.c xvmodproc.h
endif
+if XF86MISC
+XF86MISC_SRCS = xf86misc.c xf86miscproc.h
+endif
+
+if XF86VIDMODE
+XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h
+endif
+
AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@
INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/afb \
@@ -24,9 +32,7 @@ libextmod_la_LDFLAGS = -avoid-version
libextmod_la_SOURCES = modinit.c \
modinit.h \
$(DGA_SRCS) \
- xf86misc.c \
- xf86miscproc.h \
- xf86vmode.c \
- vidmodeproc.h \
+ $(XF86MISC_SRCS) \
+ $(XF86VMODE_SRCS) \
$(XV_SRCS)
libextmod_la_LIBADD = $(top_builddir)/Xext/libXextmodule.la
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 2ad681c90..17ba44aba 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -1373,14 +1373,14 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.nhsync = nHsync;
rep.nvsync = nVrefresh;
- hsyncdata = ALLOCATE_LOCAL(nHsync * sizeof(CARD32));
+ hsyncdata = xalloc(nHsync * sizeof(CARD32));
if (!hsyncdata) {
return BadAlloc;
}
- vsyncdata = ALLOCATE_LOCAL(nVrefresh * sizeof(CARD32));
+ vsyncdata = xalloc(nVrefresh * sizeof(CARD32));
if (!vsyncdata) {
- DEALLOCATE_LOCAL(hsyncdata);
+ xfree(hsyncdata);
return BadAlloc;
}
@@ -1413,8 +1413,8 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
if (rep.modelLength)
WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr);
- DEALLOCATE_LOCAL(hsyncdata);
- DEALLOCATE_LOCAL(vsyncdata);
+ xfree(hsyncdata);
+ xfree(vsyncdata);
return (client->noClientException);
}
@@ -1498,11 +1498,11 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
rep.flags = 0;
if (!ClockProg) {
- Clocks = ALLOCATE_LOCAL(numClocks * sizeof(int));
+ Clocks = xalloc(numClocks * sizeof(int));
if (!Clocks)
return BadValue;
if (!VidModeGetClocks(stuff->screen, Clocks)) {
- DEALLOCATE_LOCAL(Clocks);
+ xfree(Clocks);
return BadValue;
}
}
@@ -1529,7 +1529,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
}
}
- DEALLOCATE_LOCAL(Clocks);
+ xfree(Clocks);
return (client->noClientException);
}
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index 847f0d4a2..0ff867de0 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -45,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static MODULESETUPPROTO(glxSetup);
-static const char *initdeps[] = { "DOUBLE-BUFFER", NULL };
+static const char *initdeps[] = { "DOUBLE-BUFFER", "COMPOSITE", NULL };
static ExtensionModule GLXExt =
{
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 4064ef6d8..3c657d0f0 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -373,7 +373,6 @@ The recommended font path contains the following font path elements:
.I __projectroot__/lib/X11/fonts/75dpi/:unscaled
.I __projectroot__/lib/X11/fonts/100dpi/:unscaled
.I __projectroot__/lib/X11/fonts/Type1/
-.I __projectroot__/lib/X11/fonts/Speedo/
.I __projectroot__/lib/X11/fonts/75dpi/
.I __projectroot__/lib/X11/fonts/100dpi/
.fi
@@ -383,20 +382,6 @@ Font path elements that are found to be invalid are removed from the
font path when the server starts up.
.RE
.TP 7
-.BI "RGBPath \*q" path \*q
-sets the path name for the RGB color database.
-When this entry is not specified in the config file, the server falls back
-to the compiled\-in default RGB path, which is:
-.PP
-.RS 11
-.I __projectroot__/share/X11/rgb
-.RE
-.PP
-Note that an implicit
-.I .txt
-is added to this path if the server was compiled to use text rather than
-binary format RGB color databases.
-.TP 7
.BI "ModulePath \*q" path \*q
sets the search path for loadable __xservername__ server modules.
This path is a comma separated list of directories which the __xservername__ server
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index e01d6d9be..d16910f33 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -358,8 +358,6 @@ ProcXF86DRICreateContext(
{
xXF86DRICreateContextReply rep;
ScreenPtr pScreen;
- VisualPtr visual;
- int i;
REQUEST(xXF86DRICreateContextReq);
REQUEST_SIZE_MATCH(xXF86DRICreateContextReq);
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 837d2b12b..13be7858f 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -258,7 +258,7 @@ fbdev_modes_equal(struct fb_var_screeninfo *set, struct fb_var_screeninfo *req)
static void
fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
{
- mode->Clock = var->pixclock ? 1000000000/var->pixclock : 28000000;
+ mode->Clock = var->pixclock ? 1000000000/var->pixclock : 0;
mode->HDisplay = var->xres;
mode->HSyncStart = mode->HDisplay+var->right_margin;
mode->HSyncEnd = mode->HSyncStart+var->hsync_len;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 4c843cd83..f312b30cb 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -29,6 +29,7 @@
#endif
#include "xf86Modes.h"
#include "xf86Cursor.h"
+#include "xf86i2c.h"
#include "damage.h"
#include "picturestr.h"
@@ -60,13 +61,13 @@ typedef enum _xf86ConnectorType {
XF86ConnectorSvideo,
XF86ConnectorComponent,
XF86ConnectorLFP,
- XF86ConnectorProprietary,
+ XF86ConnectorProprietary
} xf86ConnectorType;
typedef enum _xf86OutputStatus {
XF86OutputStatusConnected,
XF86OutputStatusDisconnected,
- XF86OutputStatusUnknown,
+ XF86OutputStatusUnknown
} xf86OutputStatus;
typedef struct _xf86CrtcFuncs {
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 99817898a..3879b9103 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -196,9 +196,8 @@ xf86DuplicateMode(DisplayModePtr pMode)
pNew->prev = NULL;
if (pNew->name == NULL) {
xf86SetModeDefaultName(pMode);
- } else {
- pNew->name = xnfstrdup(pMode->name);
}
+ pNew->name = xnfstrdup(pMode->name);
return pNew;
}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 2c0dc3120..d4a88f736 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -633,7 +633,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
DisplayModePtr mode = &crtc->mode;
Bool ret;
- randr_outputs = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr));
+ randr_outputs = xalloc(config->num_output * sizeof (RROutputPtr));
if (!randr_outputs)
return FALSE;
x = crtc->x;
@@ -668,7 +668,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
}
ret = RRCrtcNotify (randr_crtc, randr_mode, x, y,
rotation, numOutputs, randr_outputs);
- DEALLOCATE_LOCAL(randr_outputs);
+ xfree(randr_outputs);
return ret;
}
@@ -723,7 +723,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86CrtcPtr *save_crtcs;
Bool save_enabled = crtc->enabled;
- save_crtcs = ALLOCATE_LOCAL(config->num_output * sizeof (xf86CrtcPtr));
+ save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
if ((randr_mode != NULL) != crtc->enabled)
changed = TRUE;
else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode))
@@ -779,7 +779,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86OutputPtr output = config->output[o];
output->crtc = save_crtcs[o];
}
- DEALLOCATE_LOCAL(save_crtcs);
+ xfree(save_crtcs);
return FALSE;
}
/*
@@ -792,7 +792,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
}
xf86DisableUnusedFunctions (pScrn);
}
- DEALLOCATE_LOCAL(save_crtcs);
+ xfree(save_crtcs);
return xf86RandR12CrtcNotify (randr_crtc);
}
@@ -935,8 +935,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
RRCrtcPtr randr_crtc;
int nclone;
- clones = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr));
- crtcs = ALLOCATE_LOCAL (config->num_crtc * sizeof (RRCrtcPtr));
+ clones = xalloc(config->num_output * sizeof (RROutputPtr));
+ crtcs = xalloc (config->num_crtc * sizeof (RRCrtcPtr));
for (o = 0; o < config->num_output; o++)
{
xf86OutputPtr output = config->output[o];
@@ -953,8 +953,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc))
{
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return FALSE;
}
@@ -990,13 +990,13 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
}
if (!RROutputSetClones (output->randr_output, clones, nclone))
{
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return FALSE;
}
}
- DEALLOCATE_LOCAL (crtcs);
- DEALLOCATE_LOCAL (clones);
+ xfree (crtcs);
+ xfree (clones);
return TRUE;
}
diff --git a/hw/xfree86/os-support/linux/lnx_mouse.c b/hw/xfree86/os-support/linux/lnx_mouse.c
index 150547ea4..d2822153f 100644
--- a/hw/xfree86/os-support/linux/lnx_mouse.c
+++ b/hw/xfree86/os-support/linux/lnx_mouse.c
@@ -45,7 +45,8 @@ typedef enum {
MOUSE_PROTO_SERIAL,
MOUSE_PROTO_PS2,
MOUSE_PROTO_MSC,
- MOUSE_PROTO_GPM
+ MOUSE_PROTO_GPM,
+ MOUSE_PROTO_EXPPS2,
} protocolTypes;
static struct {
@@ -55,7 +56,8 @@ static struct {
{ MOUSE_PROTO_UNKNOWN, NULL },
{ MOUSE_PROTO_PS2, "PS/2" },
{ MOUSE_PROTO_MSC, "MouseSystems" },
- { MOUSE_PROTO_GPM, "GPM" }
+ { MOUSE_PROTO_GPM, "GPM" },
+ { MOUSE_PROTO_EXPPS2, "ExplorerPS/2" },
};
static const char *
@@ -87,7 +89,7 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
}
static const char *
-GuessProtocol(InputInfoPtr pInfo, int flags)
+lnxMouseMagic(InputInfoPtr pInfo)
{
int fd = -1;
const char *dev;
@@ -137,8 +139,10 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
}
}
- if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
- proto = MOUSE_PROTO_PS2;
+ if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0)
+ proto = MOUSE_PROTO_EXPPS2;
+ else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
+ proto = MOUSE_PROTO_EXPPS2;
else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
proto = MOUSE_PROTO_MSC;
else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
@@ -171,15 +175,14 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
close(fd);
}
if (proto == MOUSE_PROTO_UNKNOWN) {
- xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
+ xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n",
pInfo->name);
return NULL;
} else {
for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
if (devproto[i].proto == proto) {
xf86Msg(X_INFO,
- "%s: GuessProtocol: "
- "setting mouse protocol to \"%s\"\n",
+ "%s: Setting mouse protocol to \"%s\"\n",
pInfo->name, devproto[i].name);
return devproto[i].name;
}
@@ -188,6 +191,18 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
return NULL;
}
+static const char *
+GuessProtocol(InputInfoPtr pInfo, int flags)
+{
+ return lnxMouseMagic(pInfo);
+}
+
+static const char *
+SetupAuto(InputInfoPtr pInfo, int *protoPara)
+{
+ return lnxMouseMagic(pInfo);
+}
+
_X_EXPORT OSMouseInfoPtr
xf86OSMouseInit(int flags)
{
@@ -200,6 +215,7 @@ xf86OSMouseInit(int flags)
p->DefaultProtocol = DefaultProtocol;
p->FindDevice = FindDevice;
p->GuessProtocol = GuessProtocol;
+ p->SetupAuto = SetupAuto;
return p;
}
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index f6c15c28f..c97f50302 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -243,9 +243,6 @@ xf86BlockSIGIO (void)
sigaddset (&set, SIGIO);
sigprocmask (SIG_BLOCK, &set, &old);
ret = sigismember (&old, SIGIO);
-#ifdef DEBUG
- ErrorF("%i = xf86BlockSIGIO()\n",ret);
-#endif
return ret;
}
@@ -253,9 +250,6 @@ _X_EXPORT void
xf86UnblockSIGIO (int wasset)
{
sigset_t set;
-#ifdef DEBUG
- ErrorF("xf86UnblockSIGIO(%i)\n",wasset);
-#endif
if (!wasset)
{
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index 8cec2a91a..3777432b1 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -69,7 +69,6 @@ static xf86ConfigSymTabRec FilesTab[] =
{
{ENDSECTION, "endsection"},
{FONTPATH, "fontpath"},
- {RGBPATH, "rgbpath"},
{MODULEPATH, "modulepath"},
{INPUTDEVICES, "inputdevices"},
{LOGFILEPATH, "logfile"},
@@ -122,11 +121,6 @@ xf86parseFilesSection (void)
strcat (ptr->file_fontpath, str);
xf86conffree (val.str);
break;
- case RGBPATH:
- if (xf86getSubToken (&(ptr->file_comment)) != STRING)
- Error (QUOTE_MSG, "RGBPath");
- ptr->file_rgbpath = val.str;
- break;
case MODULEPATH:
if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "ModulePath");
@@ -216,8 +210,6 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr)
fprintf (cf, "%s", ptr->file_comment);
if (ptr->file_logfile)
fprintf (cf, "\tLogFile \"%s\"\n", ptr->file_logfile);
- if (ptr->file_rgbpath)
- fprintf (cf, "\tRgbPath \"%s\"\n", ptr->file_rgbpath);
if (ptr->file_modulepath)
{
s = ptr->file_modulepath;
@@ -272,7 +264,6 @@ xf86freeFiles (XF86ConfFilesPtr p)
return;
TestFree (p->file_logfile);
- TestFree (p->file_rgbpath);
TestFree (p->file_modulepath);
TestFree (p->file_inputdevs);
TestFree (p->file_fontpath);
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 5b60a5155..730ea0cab 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -330,7 +330,7 @@ xf86findOption (XF86OptionPtr list, const char *name)
* returned. If the option is not found, a NULL is returned.
*/
-char *
+__attribute__((visibility("default"))) char *
xf86findOptionValue (XF86OptionPtr list, const char *name)
{
XF86OptionPtr p = xf86findOption (list, name);
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index 4bff4b23b..9d533125e 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -688,8 +688,6 @@ xf86printMonitorSection (FILE * cf, XF86ConfMonitorPtr ptr)
fprintf (cf, "\tDisplaySize %d\t%d\n",
ptr->mon_width,
ptr->mon_height);
- if ( ptr->mon_n_hsync || ptr->mon_n_vrefresh )
- fprintf(cf," ### Comment all HorizSync and VertRefresh values to use DDC:\n");
for (i = 0; i < ptr->mon_n_hsync; i++)
{
fprintf (cf, "\tHorizSync %2.1f - %2.1f\n",
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 55c7eb55f..e7989d107 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -948,7 +948,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab)
* Compare two names. The characters '_', ' ', and '\t' are ignored
* in the comparison.
*/
-int
+__attribute__((visibility("default"))) int
xf86nameCompare (const char *s1, const char *s2)
{
char c1, c2;
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index dc30823cc..a078361d3 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -71,7 +71,6 @@
typedef struct
{
char *file_logfile;
- char *file_rgbpath;
char *file_modulepath;
char *file_inputdevs;
char *file_fontpath;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 822bbb9b7..786dac145 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -97,7 +97,6 @@ typedef enum {
/* File tokens */
FONTPATH,
- RGBPATH,
MODULEPATH,
INPUTDEVICES,
LOGFILEPATH,
diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c
index eb05f2e14..8985f38b0 100644
--- a/hw/xfree86/rac/xf86RAC.c
+++ b/hw/xfree86/rac/xf86RAC.c
@@ -139,7 +139,8 @@ static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionPtr prgnSrc );
static void RACClearToBackground (WindowPtr pWin, int x, int y,
int w, int h, Bool generateExposures );
-static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth);
+static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint);
static Bool RACCreateGC(GCPtr pGC);
static Bool RACSaveScreen(ScreenPtr pScreen, Bool unblank);
static void RACStoreColors (ColormapPtr pmap, int ndef, xColorItem *pdefs);
@@ -440,14 +441,14 @@ RACClearToBackground (
}
static PixmapPtr
-RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
+RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
{
PixmapPtr pPix;
DPRINT_S("RACCreatePixmap",pScreen->myNum);
SCREEN_PROLOG ( CreatePixmap);
ENABLE;
- pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth);
+ pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
SCREEN_EPILOG (CreatePixmap, RACCreatePixmap);
return pPix;
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index c3bd61c1e..74beefb67 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -1027,7 +1027,7 @@ ShadowPolyRectangle(
offset1 = offset2 >> 1;
offset3 = offset2 - offset1;
- pBoxInit = (BoxPtr)ALLOCATE_LOCAL(nRects * 4 * sizeof(BoxRec));
+ pBoxInit = (BoxPtr)xalloc(nRects * 4 * sizeof(BoxRec));
pbox = pBoxInit;
while(nRects--) {
@@ -1078,7 +1078,7 @@ ShadowPolyRectangle(
if(pPriv->preRefresh)
(*pPriv->preRefresh)(pPriv->pScrn, num, pBoxInit);
} else {
- DEALLOCATE_LOCAL(pBoxInit);
+ xfree(pBoxInit);
}
}
}
@@ -1090,7 +1090,7 @@ ShadowPolyRectangle(
} else if(num) {
if(pPriv->postRefresh)
(*pPriv->postRefresh)(pPriv->pScrn, num, pBoxInit);
- DEALLOCATE_LOCAL(pBoxInit);
+ xfree(pBoxInit);
}
SHADOW_GC_OP_EPILOGUE(pGC);
diff --git a/hw/xfree86/utils/xorgcfg/expert.c b/hw/xfree86/utils/xorgcfg/expert.c
index 5c22a6e70..bb6960ce7 100644
--- a/hw/xfree86/utils/xorgcfg/expert.c
+++ b/hw/xfree86/utils/xorgcfg/expert.c
@@ -472,15 +472,6 @@ CreateFiles(TreeNode *files)
files->child = node;
files->update = UpdateFiles;
- if (XF86RGB_path)
- value = XF86RGB_path;
- else
- value = file->file_rgbpath ? file->file_rgbpath : "";
- node->next = NewNode(files, NULL, NULL, files->node,
- (TreeData*)XtCalloc(1, sizeof(TreeData)));
- node = node->next;
- CreateFilesField(node, "RgbPath", value);
-
w = XtVaCreateManagedWidget("ModulePath", toggleWidgetClass, tree,
XtNtreeParent, files->node, NULL);
node->next = modulepath = NewNode(files, w, w, files->node, NULL);
@@ -523,15 +514,6 @@ UpdateFiles(TreeNode *files)
XF86Config->conf_files->file_logfile = XtNewString(str);
else
XF86Config->conf_files->file_logfile = NULL;
-
- /* LogFile */
- files = files->next;
- XtVaGetValues(files->data->files.text, XtNstring, &str, NULL);
- XtFree(XF86Config->conf_files->file_rgbpath);
- if (*str)
- XF86Config->conf_files->file_rgbpath = XtNewString(str);
- else
- XF86Config->conf_files->file_rgbpath = NULL;
}
/* FontPath */
diff --git a/hw/xfree86/utils/xorgcfg/interface.c b/hw/xfree86/utils/xorgcfg/interface.c
index 9b22dc7cb..cb39624ca 100644
--- a/hw/xfree86/utils/xorgcfg/interface.c
+++ b/hw/xfree86/utils/xorgcfg/interface.c
@@ -213,7 +213,6 @@ Usage(void)
" -modulepath <module-path> "__XSERVERNAME__" modules location.\n"
" -serverpath <server-path> X server to start (if $DISPLAY is not defined).\n"
" -fontpath <font-path> Font path for fonts.\n"
-" -rgbpath <rgb-path> Where the rgb.txt file is located.\n"
#ifdef HAS_NCURSES
" -textmode Use this option for the text only interface.\n"
#endif
@@ -270,10 +269,7 @@ main(int argc, char *argv[])
} else if (strcmp(argv[i], "-fontpath") == 0) {
if (i + 1 < argc)
XF86Font_path = argv[++i];
- } else if (strcmp(argv[i], "-rgbpath") == 0) {
- if (i + 1 < argc)
- XF86RGB_path = argv[++i];
- }
+ }
#ifdef HAS_NCURSES
else if (strcmp(argv[i], "-textmode") == 0)
textmode = True;
diff --git a/hw/xfree86/utils/xorgcfg/startx.c b/hw/xfree86/utils/xorgcfg/startx.c
index 7b730c9aa..507afbf15 100644
--- a/hw/xfree86/utils/xorgcfg/startx.c
+++ b/hw/xfree86/utils/xorgcfg/startx.c
@@ -73,9 +73,6 @@ startx(void)
if (XF86Font_path && ((len = sizeof(commandline) - c_pos) > 0))
c_pos += XmuSnprintf(commandline + c_pos,len,
" -fontpath %s",XF86Font_path);
- if (XF86RGB_path && ((len = sizeof(commandline) - c_pos) > 0))
- c_pos += XmuSnprintf(commandline + c_pos,len,
- " -rgbpath %s",XF86RGB_path);
if (system(commandline) != 0) {
fprintf(stderr, "Failed to run \"X -configure\".\n");
diff --git a/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre b/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre
index 45fbb4969..71e75e2d8 100644
--- a/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre
+++ b/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre
@@ -84,10 +84,6 @@ __xservername__ binary.
Specifies the path to the fonts that should be used by the server started
by xorgcfg.
.TP 8
-.I -rgbpath
-Specifies the path to the rgb.txt file that should be used by the server
-started by xorgcfg, if any.
-.TP 8
.I -textmode
If xorgcfg was compiled with support for ncurses, this option makes xorgcfg
enter a text mode interface.
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index f50b4e225..efabc9d1f 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -1898,22 +1898,10 @@ static char *XF86Config_firstchunk_text =
"\n"
"Section \"Files\"\n"
"\n"
-"# The location of the RGB database. Note, this is the name of the\n"
-"# file minus the extension (like \".txt\" or \".db\"). There is normally\n"
-"# no need to change the default.\n"
-"\n"
-"# RgbPath \"" TREEROOTSHARE "/rgb\"\n"
-"\n"
"# Multiple FontPath entries are allowed (which are concatenated together),\n"
"# as well as specifying multiple comma-separated entries in one FontPath\n"
"# command (or a combination of both methods)\n"
"# \n"
-#if 0
-"# If you don't have a floating point coprocessor and emacs, Mosaic or other\n"
-"# programs take long to start up, try moving the Type1 directory\n"
-"# to the end of this list (or comment it out).\n"
-#endif
-"# \n"
"\n";
static char *XF86Config_fontpaths[] =
@@ -1923,7 +1911,6 @@ static char *XF86Config_fontpaths[] =
"/misc/",
"/75dpi/:unscaled",
"/100dpi/:unscaled",
- "/Speedo/",
"/Type1/",
"/TrueType/",
"/freefont/",
diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/vbe/vbeModes.c
index ef2c728f4..061d7b695 100644
--- a/hw/xfree86/vbe/vbeModes.c
+++ b/hw/xfree86/vbe/vbeModes.c
@@ -152,34 +152,6 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
xf86ErrorFVerb(DEBUG_VERB, "*");
}
- /*
- * Check if there's a valid monitor mode that this one can be matched
- * up with. The actual matching is done later.
- */
- if (modeOK) {
- Bool sizeMatch = FALSE;
- modeOK = FALSE;
- for (p = pScrn->monitor->Modes; p != NULL; p = p->next) {
- if ((p->HDisplay != mode->XResolution) ||
- (p->VDisplay != mode->YResolution) ||
- (p->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2)))
- continue;
- sizeMatch = TRUE;
- /* XXX could support the various V_ flags */
- status = xf86CheckModeForMonitor(p, pScrn->monitor);
- if (status == MODE_OK) {
- modeOK = TRUE;
- break;
- }
- }
- if (sizeMatch && !modeOK) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Not using built-in mode \"%dx%d\" (%s)\n",
- mode->XResolution, mode->YResolution,
- xf86ModeStatusToString(status));
- }
- }
-
xf86ErrorFVerb(DEBUG_VERB,
"Mode: %x (%dx%d)\n", id, mode->XResolution, mode->YResolution);
xf86ErrorFVerb(DEBUG_VERB,
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index 609376a57..44043c6c7 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -236,9 +236,9 @@ vgaInstallColormap(pmap)
else
entries = pmap->pVisual->ColormapEntries;
- ppix = (Pixel *)ALLOCATE_LOCAL( entries * sizeof(Pixel));
- prgb = (xrgb *)ALLOCATE_LOCAL( entries * sizeof(xrgb));
- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
+ ppix = (Pixel *)xalloc( entries * sizeof(Pixel));
+ prgb = (xrgb *)xalloc( entries * sizeof(xrgb));
+ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
if ( oldmap != NOMAPYET)
WalkTree( pmap->pScreen, TellLostMap, &oldmap->mid);
@@ -261,9 +261,9 @@ vgaInstallColormap(pmap)
WalkTree(pmap->pScreen, TellGainedMap, &pmap->mid);
- DEALLOCATE_LOCAL(ppix);
- DEALLOCATE_LOCAL(prgb);
- DEALLOCATE_LOCAL(defs);
+ xfree(ppix);
+ xfree(prgb);
+ xfree(defs);
}
diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c
index 6c81f6413..ebba74e55 100644
--- a/hw/xfree86/xaa/xaaBitBlt.c
+++ b/hw/xfree86/xaa/xaaBitBlt.c
@@ -186,7 +186,7 @@ XAABitBlt(
/* Do bit blitting */
numRects = REGION_NUM_RECTS(&rgnDst);
if (numRects && width && height) {
- if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects *
+ if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
sizeof(DDXPointRec)))) {
REGION_UNINIT(pGC->pScreen, &rgnDst);
if (freeSrcClip)
@@ -201,7 +201,7 @@ XAABitBlt(
}
(*doBitBlt) (pSrcDrawable, pDstDrawable, pGC, &rgnDst, pptSrc);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
}
prgnExposed = NULL;
diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c
index 89b4441ab..6c991e100 100644
--- a/hw/xfree86/xaa/xaaCpyArea.c
+++ b/hw/xfree86/xaa/xaaCpyArea.c
@@ -108,12 +108,12 @@ XAADoBitBlt(
if (nbox > 1) {
/* keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew1)
return;
- pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pptNew1) {
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pboxNew1);
return;
}
pboxBase = pboxNext = pbox+nbox-1;
@@ -145,14 +145,14 @@ XAADoBitBlt(
if (nbox > 1) {
/* reverse order of rects in each band */
- pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2) {
- if (pptNew2) DEALLOCATE_LOCAL(pptNew2);
- if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2);
+ if (pptNew2) xfree(pptNew2);
+ if (pboxNew2) xfree(pboxNew2);
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
return;
}
@@ -183,12 +183,12 @@ XAADoBitBlt(
xdir, ydir, pGC->alu, pGC->planemask);
if (pboxNew2) {
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pptNew2);
+ xfree(pboxNew2);
}
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
}
diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c
index 1ff955c6c..ecdc9a3be 100644
--- a/hw/xfree86/xaa/xaaCpyWin.c
+++ b/hw/xfree86/xaa/xaaCpyWin.c
@@ -59,7 +59,7 @@ XAACopyWindow(
pbox = REGION_RECTS(&rgnDst);
nbox = REGION_NUM_RECTS(&rgnDst);
if(!nbox ||
- !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) {
+ !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
REGION_UNINIT(pScreen, &rgnDst);
return;
}
@@ -77,6 +77,6 @@ XAACopyWindow(
XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
REGION_UNINIT(pScreen, &rgnDst);
}
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index f1757c866..892cbcfc3 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -30,7 +30,8 @@ static void XAAGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
char *pdstLine);
static void XAAGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
int *pwidth, int nspans, char *pdstStart);
-static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth);
+static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint);
static Bool XAADestroyPixmap(PixmapPtr pPixmap);
static Bool XAAEnterVT (int index, int flags);
static void XAALeaveVT (int index, int flags);
@@ -295,7 +296,8 @@ XAAPixmapBPP (ScreenPtr pScreen, int depth)
DestroyPixmapProcPtr destroyPixmap;
XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, 1, 1, depth);
+ pPix = (*pScreen->CreatePixmap) (pScreen, 1, 1, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
if (!pPix)
return 0;
@@ -326,7 +328,7 @@ XAAInitializeOffscreenDepths (ScreenPtr pScreen)
}
static PixmapPtr
-XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
+XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
@@ -372,7 +374,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
}
XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth);
+ pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, usage_hint);
XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
if (!pPix) {
@@ -404,7 +406,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
}
BAILOUT:
XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth);
+ pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
if(pPix) {
diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c
index a5608c922..d4661e879 100644
--- a/hw/xfree86/xaa/xaaNonTEText.c
+++ b/hw/xfree86/xaa/xaaNonTEText.c
@@ -291,7 +291,7 @@ PolyGlyphBltAsSingleBitmap (
pitch = (Right - Left + 31) >> 5;
size = (pitch << 2) * (Bottom - Top);
- block = (CARD32*)ALLOCATE_LOCAL(size);
+ block = (CARD32*)xalloc(size);
bzero(block, size);
topLine = 10000; botLine = -10000;
@@ -350,7 +350,7 @@ PolyGlyphBltAsSingleBitmap (
nbox--; pbox++;
}
- DEALLOCATE_LOCAL(block);
+ xfree(block);
}
static void
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 86b30ff22..273183e10 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -69,7 +69,7 @@ XAACopyWindow8_32(
pbox = REGION_RECTS(&rgnDst);
nbox = REGION_NUM_RECTS(&rgnDst);
if(!nbox ||
- !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) {
+ !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
REGION_UNINIT(pScreen, &rgnDst);
return;
}
@@ -87,7 +87,7 @@ XAACopyWindow8_32(
XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
REGION_UNINIT(pScreen, &rgnDst);
if(freeReg)
REGION_DESTROY(pScreen, borderClip);
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 508b5c6f1..64ca998ee 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -349,7 +349,7 @@ XAAOverCopyWindow(
nbox = REGION_NUM_RECTS(&rgnDst);
if(nbox &&
- (pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) {
+ (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
pbox = REGION_RECTS(&rgnDst);
for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) {
@@ -367,7 +367,7 @@ XAAOverCopyWindow(
&(infoRec->ScratchGC), &rgnDst, pptSrc);
}
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
}
REGION_UNINIT(pScreen, &rgnDst);
@@ -379,7 +379,7 @@ XAAOverCopyWindow(
REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc);
nbox = REGION_NUM_RECTS(&rgnDst);
if(nbox &&
- (pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))){
+ (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))){
pbox = REGION_RECTS(&rgnDst);
for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) {
@@ -390,7 +390,7 @@ XAAOverCopyWindow(
SWITCH_DEPTH(pScrn->depth);
XAADoBitBlt((DrawablePtr)pRoot, (DrawablePtr)pRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
}
}
REGION_UNINIT(pScreen, &rgnDst);
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index 441788cd8..d05aaf22c 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -1557,7 +1557,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
pad = BitmapBytePad(pCache->w * bpp);
dwords = pad >> 2;
- dstPtr = data = (unsigned char*)ALLOCATE_LOCAL(pad * pCache->h);
+ dstPtr = data = (unsigned char*)xalloc(pad * pCache->h);
srcPtr = (unsigned char*)pPix->devPrivate.ptr;
if(infoRec->ScreenToScreenColorExpandFillFlags & BIT_ORDER_IN_BYTE_MSBFIRST)
@@ -1588,7 +1588,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data,
pad, bpp, pScrn->depth);
- DEALLOCATE_LOCAL(data);
+ xfree(data);
return pCache;
}
@@ -1967,7 +1967,7 @@ XAAWriteMono8x8PatternToCache(
pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel);
- data = (unsigned char*)ALLOCATE_LOCAL(pad * pCache->h);
+ data = (unsigned char*)xalloc(pad * pCache->h);
if(!data) return;
if(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_ORIGIN) {
@@ -1991,7 +1991,7 @@ XAAWriteMono8x8PatternToCache(
(*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth);
- DEALLOCATE_LOCAL(data);
+ xfree(data);
}
void
@@ -2012,7 +2012,7 @@ XAAWriteColor8x8PatternToCache(
if(pixPriv->flags & REDUCIBLE_TO_2_COLOR) {
CARD32* ptr;
pad = BitmapBytePad(pCache->w);
- data = (unsigned char*)ALLOCATE_LOCAL(pad * pCache->h);
+ data = (unsigned char*)xalloc(pad * pCache->h);
if(!data) return;
if(infoRec->Color8x8PatternFillFlags &
@@ -2037,7 +2037,7 @@ XAAWriteColor8x8PatternToCache(
(*infoRec->WriteBitmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pCache->fg, pCache->bg);
- DEALLOCATE_LOCAL(data);
+ xfree(data);
return;
}
@@ -2046,7 +2046,7 @@ XAAWriteColor8x8PatternToCache(
w = min(8,pPix->drawable.width);
pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel);
- data = (unsigned char*)ALLOCATE_LOCAL(pad * pCache->h);
+ data = (unsigned char*)xalloc(pad * pCache->h);
if(!data) return;
/* Write and expand horizontally. */
@@ -2085,7 +2085,7 @@ XAAWriteColor8x8PatternToCache(
(*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth);
- DEALLOCATE_LOCAL(data);
+ xfree(data);
}
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 55f0f6e99..74e90e3b6 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -471,7 +471,7 @@ XAACompositeSrcCopy (PicturePtr pSrc,
REGION_UNINIT(pScreen, &region);
return;
}
- pptSrc = ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptSrc = xalloc(sizeof(DDXPointRec) * nbox);
if (!pptSrc) {
REGION_UNINIT(pScreen, &region);
return;
@@ -489,7 +489,7 @@ XAACompositeSrcCopy (PicturePtr pSrc,
XAADoBitBlt(pSrc->pDrawable, pDst->pDrawable, &infoRec->ScratchGC, &region,
pptSrc);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
REGION_UNINIT(pScreen, &region);
return;
}
diff --git a/hw/xfree86/xaa/xaaTEGlyph.c b/hw/xfree86/xaa/xaaTEGlyph.c
index c8d65968b..cb60266ea 100644
--- a/hw/xfree86/xaa/xaaTEGlyph.c
+++ b/hw/xfree86/xaa/xaaTEGlyph.c
@@ -301,7 +301,7 @@ EXPNAME(XAATEGlyphRenderer3)(
}
dwords = ((3 * w + 31) >> 5) * h;
- mem = (CARD32*)ALLOCATE_LOCAL(((w + 31) >> 3) * sizeof(char));
+ mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char));
if (!mem) return;
(*infoRec->SubsequentCPUToScreenColorExpandFill)(pScrn, x, y, w, h, 0);
@@ -321,7 +321,7 @@ EXPNAME(XAATEGlyphRenderer3)(
DrawTextScanline3(base, mem, w);
}
- DEALLOCATE_LOCAL(mem);
+ xfree(mem);
if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) &&
(dwords & 1)) {
@@ -478,7 +478,7 @@ EXPNAME(XAATEGlyphRendererScanline3)(
w += skipleft;
x -= skipleft;
- mem = (CARD32*)ALLOCATE_LOCAL(((w + 31) >> 3) * sizeof(char));
+ mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char));
if (!mem) return;
(*infoRec->SubsequentScanlineCPUToScreenColorExpandFill)(
@@ -495,7 +495,7 @@ EXPNAME(XAATEGlyphRendererScanline3)(
bufferNo = 0;
}
- DEALLOCATE_LOCAL(mem);
+ xfree(mem);
THE_END:
diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c
index 711a16ee5..4f9561161 100644
--- a/hw/xfree86/xf4bpp/mfbimggblt.c
+++ b/hw/xfree86/xf4bpp/mfbimggblt.c
@@ -356,7 +356,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
int getWidth; /* bits to get from glyph */
#endif
- if(!(ppos = (TEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(TEXTPOS))))
+ if(!(ppos = (TEXTPOS *)xalloc(nglyph * sizeof(TEXTPOS))))
return;
pdstBase = pdstBase + (widthDst * y) + (x >> PWSH);
@@ -495,7 +495,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
}
} /* for each glyph */
} /* while nbox-- */
- DEALLOCATE_LOCAL(ppos);
+ xfree(ppos);
break;
}
default:
diff --git a/hw/xfree86/xf4bpp/ppcCpArea.c b/hw/xfree86/xf4bpp/ppcCpArea.c
index 891ba4b89..9bdaf89e3 100644
--- a/hw/xfree86/xf4bpp/ppcCpArea.c
+++ b/hw/xfree86/xf4bpp/ppcCpArea.c
@@ -110,13 +110,13 @@ vga16DoBitblt
if (nbox > 1)
{
/* keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew1)
return;
- pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pptNew1)
{
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pboxNew1);
return;
}
pboxBase = pboxNext = pbox+nbox-1;
@@ -146,16 +146,16 @@ vga16DoBitblt
if (nbox > 1)
{
/* reverse order of rects in each band */
- pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2)
{
- if (pptNew2) DEALLOCATE_LOCAL(pptNew2);
- if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2);
+ if (pptNew2) xfree(pptNew2);
+ if (pboxNew2) xfree(pboxNew2);
if (pboxNew1)
{
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
return;
}
@@ -207,13 +207,13 @@ vga16DoBitblt
}
if (pboxNew2)
{
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pptNew2);
+ xfree(pboxNew2);
}
if (pboxNew1)
{
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
}
@@ -430,7 +430,7 @@ int dstx, dsty;
numRects = REGION_NUM_RECTS(&rgnDst);
if (numRects && width && height)
{
- if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects *
+ if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
sizeof(DDXPointRec))))
{
REGION_UNINIT(pGC->pScreen, &rgnDst);
@@ -448,7 +448,7 @@ int dstx, dsty;
vga16DoBitblt(pSrcDrawable, pDstDrawable, pGC->alu,
&rgnDst, pptSrc, pGC->planemask );
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
}
prgnExposed = NULL;
diff --git a/hw/xfree86/xf4bpp/ppcFillRct.c b/hw/xfree86/xf4bpp/ppcFillRct.c
index 4be732fb5..3422c8092 100644
--- a/hw/xfree86/xf4bpp/ppcFillRct.c
+++ b/hw/xfree86/xf4bpp/ppcFillRct.c
@@ -106,7 +106,7 @@ xf4bppPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS)
{
- pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec));
+ pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase)
return;
}
@@ -211,5 +211,5 @@ xf4bppPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
xf4bppFillArea((WindowPtr)pDrawable, pboxClipped-pboxClippedBase,
pboxClippedBase, pGC);
if (pboxClippedBase != stackRects)
- DEALLOCATE_LOCAL(pboxClippedBase);
+ xfree(pboxClippedBase);
}
diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c
index 313fcb0f8..83952d12d 100644
--- a/hw/xfree86/xf4bpp/ppcIO.c
+++ b/hw/xfree86/xf4bpp/ppcIO.c
@@ -146,7 +146,7 @@ v16CreateScreenResources
/* create a pixmap with no data, then redirect it to point to
* the screen
*/
- pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth);
+ pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
if (!pPixmap)
return FALSE;
diff --git a/hw/xfree86/xf4bpp/ppcImg.c b/hw/xfree86/xf4bpp/ppcImg.c
index 3691587ae..33c6b89c5 100644
--- a/hw/xfree86/xf4bpp/ppcImg.c
+++ b/hw/xfree86/xf4bpp/ppcImg.c
@@ -79,13 +79,14 @@ xf4bppGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine )
!= (unsigned)( 1 << pDraw->depth ) - 1 ) {
pGC = GetScratchGC( depth, pDraw->pScreen ) ;
pPixmap = (PixmapPtr)
- (* pDraw->pScreen->CreatePixmap)( pDraw->pScreen, w, h, depth ) ;
+ (* pDraw->pScreen->CreatePixmap)( pDraw->pScreen, w, h, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH) ;
gcv[0] = GXcopy ;
gcv[1] = planeMask ;
DoChangeGC( pGC, GCPlaneMask | GCFunction, gcv, 0 ) ;
ValidateGC( (DrawablePtr)pPixmap, pGC ) ;
- pbits = (char *)ALLOCATE_LOCAL(w);
+ pbits = (char *)xalloc(w);
for ( i = 0 ; i < h ; i++ ) {
pt.x = sx ;
@@ -101,7 +102,7 @@ xf4bppGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine )
pDst += linelength ;
}
- DEALLOCATE_LOCAL(pbits) ;
+ xfree(pbits) ;
(* pGC->pScreen->DestroyPixmap)( pPixmap ) ;
FreeScratchGC( pGC ) ;
return ;
diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c
index 91b753255..9fd29efce 100644
--- a/hw/xfree86/xf4bpp/ppcPixFS.c
+++ b/hw/xfree86/xf4bpp/ppcPixFS.c
@@ -128,13 +128,13 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
n = nInit * miFindMaxBand(pGC->pCompositeClip) ;
- if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
+ if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) )
return ;
pwidth = pwidthFree ;
if ( !( pptFree = (DDXPointRec *)
- ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) {
- DEALLOCATE_LOCAL( pwidth ) ;
+ xalloc( n * sizeof( DDXPointRec ) ) ) ) {
+ xfree( pwidth ) ;
return ;
}
ppt = pptFree ;
@@ -160,8 +160,8 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
*addrl = ( *addrl & npm ) | ( pm & DoRop( alu, fg, *addrl ) ) ;
#endif /* PURDUE */
}
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -316,8 +316,8 @@ int fSorted ;
ppt++ ;
pwidth++ ;
}
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -416,8 +416,8 @@ int fSorted ;
#endif /* PURDUE */
}
}
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -496,7 +496,7 @@ int fSorted ;
#endif /* PURDUE */
}
}
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c
index 2079e2ee6..d9a0ccae4 100644
--- a/hw/xfree86/xf4bpp/ppcPixmap.c
+++ b/hw/xfree86/xf4bpp/ppcPixmap.c
@@ -82,16 +82,17 @@ SOFTWARE.
#include "scrnintstr.h"
PixmapPtr
-xf4bppCreatePixmap( pScreen, width, height, depth )
+xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint )
ScreenPtr pScreen ;
int width ;
int height ;
int depth ;
+ unsigned usage_hint ;
{
register PixmapPtr pPixmap = (PixmapPtr)NULL;
size_t size ;
- TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d)\n", pScreen, width, height, depth)) ;
+ TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d, usage_hint=%d)\n", pScreen, width, height, depth, usage_hint)) ;
if ( depth > 8 )
return (PixmapPtr) NULL ;
diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c
index 982bf424c..1522afd9e 100644
--- a/hw/xfree86/xf4bpp/ppcWinFS.c
+++ b/hw/xfree86/xf4bpp/ppcWinFS.c
@@ -100,13 +100,13 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
n = nInit * miFindMaxBand( pGC->pCompositeClip ) ;
- if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
+ if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) )
return ;
pwidth = pwidthFree ;
if ( !( pptFree = (DDXPointRec *)
- ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) {
- DEALLOCATE_LOCAL( pwidth ) ;
+ xalloc( n * sizeof( DDXPointRec ) ) ) ) {
+ xfree( pwidth ) ;
return ;
}
ppt = pptFree ;
@@ -122,8 +122,8 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
xf4bppFillSolid( (WindowPtr)pDrawable,
fg, alu, pm, ppt->x, ppt->y, *pwidth, 1 ) ;
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -180,8 +180,8 @@ int fSorted ;
xf4bppFillStipple( (WindowPtr)pDrawable, pTile, fg, alu, pm,
ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ;
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -232,8 +232,8 @@ int fSorted ;
xf4bppOpaqueStipple( (WindowPtr)pDrawable, pGC->stipple, fg, bg, alu, pm,
ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ;
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
@@ -274,7 +274,7 @@ int fSorted ;
xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm,
ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ;
- DEALLOCATE_LOCAL( pptFree ) ;
- DEALLOCATE_LOCAL( pwidthFree ) ;
+ xfree( pptFree ) ;
+ xfree( pwidthFree ) ;
return ;
}
diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c
index 8261af183..6165e04b6 100644
--- a/hw/xfree86/xf4bpp/ppcWindow.c
+++ b/hw/xfree86/xf4bpp/ppcWindow.c
@@ -123,7 +123,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc)
/* walk source bottom to top */
/* keep ordering in each band, reverse order of bands */
if ( !( pboxNew =
- (BoxPtr) ALLOCATE_LOCAL( sizeof( BoxRec ) * nbox ) ) )
+ (BoxPtr) xalloc( sizeof( BoxRec ) * nbox ) ) )
return ;
pboxBase = pboxNext = pbox+nbox - 1 ;
while ( pboxBase >= pbox ) {
@@ -158,7 +158,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc)
else if ( dx < 0 ) {
/* walk source right to left */
/* reverse order of rects in each band */
- if ( !( pboxNew = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox) ) )
+ if ( !( pboxNew = (BoxPtr)xalloc(sizeof(BoxRec) * nbox) ) )
return ;
pboxBase = pboxNext = pbox ;
while (pboxBase < pbox+nbox)
@@ -190,7 +190,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc)
/* free up stuff */
if ( pboxNew )
- DEALLOCATE_LOCAL( pboxNew ) ;
+ xfree( pboxNew ) ;
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
}
diff --git a/hw/xfree86/xf4bpp/xf4bpp.h b/hw/xfree86/xf4bpp/xf4bpp.h
index e7e3721f7..cf0822444 100644
--- a/hw/xfree86/xf4bpp/xf4bpp.h
+++ b/hw/xfree86/xf4bpp/xf4bpp.h
@@ -183,7 +183,8 @@ PixmapPtr xf4bppCreatePixmap(
ScreenPtr,
int,
int,
- int
+ int,
+ unsigned
);
PixmapPtr xf4bppCopyPixmap(
PixmapPtr
diff --git a/hw/xfree86/xf8_32bpp/cfbcpyarea.c b/hw/xfree86/xf8_32bpp/cfbcpyarea.c
index c2eb1a04e..d8f0c6d76 100644
--- a/hw/xfree86/xf8_32bpp/cfbcpyarea.c
+++ b/hw/xfree86/xf8_32bpp/cfbcpyarea.c
@@ -433,12 +433,12 @@ cfb8_32DoBitBlt(
if (nbox > 1) {
/* keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew1)
return;
- pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pptNew1) {
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pboxNew1);
return;
}
pboxBase = pboxNext = pbox+nbox-1;
@@ -470,14 +470,14 @@ cfb8_32DoBitBlt(
if (nbox > 1) {
/* reverse order of rects in each band */
- pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2) {
- if (pptNew2) DEALLOCATE_LOCAL(pptNew2);
- if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2);
+ if (pptNew2) xfree(pptNew2);
+ if (pboxNew2) xfree(pboxNew2);
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
return;
}
@@ -510,12 +510,12 @@ cfb8_32DoBitBlt(
(*DoBlt)(SrcPtr,SrcPitch,DstPtr,DstPitch,nbox,pptSrc,pbox,xdir,ydir);
if (pboxNew2) {
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pptNew2);
+ xfree(pboxNew2);
}
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
}
diff --git a/hw/xfree86/xf8_32bpp/cfbwindow.c b/hw/xfree86/xf8_32bpp/cfbwindow.c
index 787cbdec6..2e6057f12 100644
--- a/hw/xfree86/xf8_32bpp/cfbwindow.c
+++ b/hw/xfree86/xf8_32bpp/cfbwindow.c
@@ -77,7 +77,7 @@ cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc)
pbox = REGION_RECTS(&rgnDst);
nbox = REGION_NUM_RECTS(&rgnDst);
if(!nbox ||
- !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec))))
+ !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec))))
{
REGION_UNINIT(pScreen, &rgnDst);
return;
@@ -97,7 +97,7 @@ cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc)
cfbDoBitblt8To8GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
GXcopy, &rgnDst, pptSrc, ~0);
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
REGION_UNINIT(pScreen, &rgnDst);
if(freeReg)
REGION_DESTROY(pScreen, borderClip);
diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c
index 700c71ada..c63b3cfd1 100644
--- a/hw/xfree86/xf8_32bpp/xf86overlay.c
+++ b/hw/xfree86/xf8_32bpp/xf86overlay.c
@@ -32,7 +32,7 @@
static Bool OverlayCloseScreen (int, ScreenPtr);
static Bool OverlayCreateGC(GCPtr pGC);
static Bool OverlayDestroyPixmap(PixmapPtr);
-static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int);
+static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int, unsigned);
static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long);
/** Funcs **/
@@ -328,13 +328,14 @@ OverlayCreateGC(GCPtr pGC)
}
static PixmapPtr
-OverlayCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
+OverlayCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint)
{
OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen);
PixmapPtr pPix;
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
- pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth);
+ pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
pScreen->CreatePixmap = OverlayCreatePixmap;
/* We initialize all the privates */
@@ -428,7 +429,7 @@ OverlayRefreshPixmap(PixmapPtr pix8)
PixmapPtr newPix;
newPix = (*pScreen->CreatePixmap)(pScreen, pix8->drawable.width,
- pix8->drawable.height, 24);
+ pix8->drawable.height, 24, 0);
newPix->drawable.depth = 8; /* Bad Mark! Bad Mark! */
pixPriv->pix32 = newPix;
}
diff --git a/hw/xfree86/xorgconf.cpp b/hw/xfree86/xorgconf.cpp
index 1995045b8..acf90f13f 100644
--- a/hw/xfree86/xorgconf.cpp
+++ b/hw/xfree86/xorgconf.cpp
@@ -42,12 +42,6 @@ XCOMM **********************************************************************
Section "Files"
-XCOMM The location of the RGB database. Note, this is the name of the
-XCOMM file minus the extension (like ".txt" or ".db"). There is normally
-XCOMM no need to change the default.
-
- RgbPath RGBPATH
-
XCOMM Multiple FontPath entries are allowed (which are concatenated together),
XCOMM as well as specifying multiple comma-separated entries in one FontPath
XCOMM command (or a combination of both methods)
diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h
index 46747a217..03dc90c70 100644
--- a/hw/xgl/xgl.h
+++ b/hw/xgl/xgl.h
@@ -871,7 +871,8 @@ PixmapPtr
xglCreatePixmap (ScreenPtr pScreen,
int width,
int height,
- int depth);
+ int depth,
+ unsigned usage_hint);
void
xglFiniPixmap (PixmapPtr pPixmap);
diff --git a/hw/xgl/xglglyph.c b/hw/xgl/xglglyph.c
index 7a601889c..c1a484ac0 100644
--- a/hw/xgl/xglglyph.c
+++ b/hw/xgl/xglglyph.c
@@ -1075,7 +1075,8 @@ xglGlyphs (CARD8 op,
pPixmap = (*pScreen->CreatePixmap) (pScreen,
rect.width, rect.height,
- maskFormat->depth);
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglpict.c b/hw/xgl/xglpict.c
index 932d31a33..fee2431b7 100644
--- a/hw/xgl/xglpict.c
+++ b/hw/xgl/xglpict.c
@@ -494,7 +494,7 @@ xglSyncPicture (ScreenPtr pScreen,
return FALSE;
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
- pFormat->depth);
+ pFormat->depth, 0);
if (!pPixmap)
return FALSE;
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 59ed00a72..fefd3ef97 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -222,7 +222,8 @@ PixmapPtr
xglCreatePixmap (ScreenPtr pScreen,
int width,
int height,
- int depth)
+ int depth,
+ unsigned usage_hint)
{
xglPixmapPtr pPixmapPriv;
PixmapPtr pPixmap;
diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c
index 6bd91b72a..47ed34508 100644
--- a/hw/xgl/xglscreen.c
+++ b/hw/xgl/xglscreen.c
@@ -447,7 +447,7 @@ xglCreateSolidAlphaPicture (ScreenPtr pScreen)
if (!pGC)
return;
- pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth);
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth, 0);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglshm.c b/hw/xgl/xglshm.c
index 52a8aabb8..567daa954 100644
--- a/hw/xgl/xglshm.c
+++ b/hw/xgl/xglshm.c
@@ -64,7 +64,8 @@ xglShmPutImage (DrawablePtr pDrawable,
}
else
{
- pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth);
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (pPixmap)
{
GCPtr pScratchGC;
diff --git a/hw/xgl/xgltrap.c b/hw/xgl/xgltrap.c
index 26e2bc451..6e7a5082c 100644
--- a/hw/xgl/xgltrap.c
+++ b/hw/xgl/xgltrap.c
@@ -194,7 +194,8 @@ xglTrapezoids (CARD8 op,
pPixmap = (*pScreen->CreatePixmap) (pScreen,
rect.width, rect.height,
- maskFormat->depth);
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglxv.c b/hw/xgl/xglxv.c
index bfa16e3ca..353f9b3bb 100644
--- a/hw/xgl/xglxv.c
+++ b/hw/xgl/xglxv.c
@@ -290,7 +290,7 @@ xglXvPutImage (ClientPtr client,
if (!pPortPriv->pPixmap)
{
- pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth);
+ pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0);
if (!pPortPriv->pPixmap)
return BadAlloc;
}
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index c9c662af3..57bebc639 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -36,7 +36,8 @@ is" without express or implied warranty.
DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKey;
PixmapPtr
-xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
+xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint)
{
PixmapPtr pPixmap;
diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h
index 3b0833993..614827587 100644
--- a/hw/xnest/XNPixmap.h
+++ b/hw/xnest/XNPixmap.h
@@ -29,7 +29,7 @@ typedef struct {
#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth);
+ int depth, unsigned usage_hint);
Bool xnestDestroyPixmap(PixmapPtr pPixmap);
RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
diff --git a/hw/xprint/pcl/PclArea.c b/hw/xprint/pcl/PclArea.c
index 59ae5e3cc..a4e53dad6 100644
--- a/hw/xprint/pcl/PclArea.c
+++ b/hw/xprint/pcl/PclArea.c
@@ -415,7 +415,8 @@ PclCopyPlane(DrawablePtr pSrc,
* know how to do a CopyArea.
*/
scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width,
- height, pDst->depth );
+ height, pDst->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH );
scratchGC = GetScratchGC( pDst->depth, pDst->pScreen );
CopyGC( pGC, scratchGC, ~0L );
diff --git a/hw/xprint/pcl/PclGC.c b/hw/xprint/pcl/PclGC.c
index e64e779db..fbadf5d5d 100644
--- a/hw/xprint/pcl/PclGC.c
+++ b/hw/xprint/pcl/PclGC.c
@@ -712,7 +712,8 @@ PclUpdateDrawableGC(
scratchPix =
(*pGC->pScreen->CreatePixmap)( pGC->pScreen,
- w, h, pGC->depth );
+ w, h, pGC->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH );
scratchGC = GetScratchGC( pGC->depth, pGC->pScreen );
CopyGC( pGC, scratchGC, ~0L );
diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h
index 415c9296a..a25e9891a 100644
--- a/hw/xprint/ps/Ps.h
+++ b/hw/xprint/ps/Ps.h
@@ -574,7 +574,7 @@ extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
*/
extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth);
+ int depth, unsigned usage_hint);
extern void PsScrubPixmap(PixmapPtr pPixmap);
extern Bool PsDestroyPixmap(PixmapPtr pPixmap);
extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c
index 1fa4e4056..a588f4276 100644
--- a/hw/xprint/ps/PsPixmap.c
+++ b/hw/xprint/ps/PsPixmap.c
@@ -92,7 +92,8 @@ PsCreatePixmap(
ScreenPtr pScreen,
int width,
int height,
- int depth)
+ int depth,
+ unsigned usage_hint)
{
PixmapPtr pPixmap;
diff --git a/hw/xprint/ps/PsText.c b/hw/xprint/ps/PsText.c
index 98cf15345..872c0f427 100644
--- a/hw/xprint/ps/PsText.c
+++ b/hw/xprint/ps/PsText.c
@@ -535,7 +535,7 @@ PsPolyGlyphBlt(
nbyLine = BitmapBytePad(width);
- pbits = (unsigned char *)ALLOCATE_LOCAL(height*nbyLine);
+ pbits = (unsigned char *)xalloc(height*nbyLine);
if (!pbits){
PsDestroyPixmap(pPixmap);
return;
@@ -576,6 +576,6 @@ PsPolyGlyphBlt(
x += pci->metrics.characterWidth;
}
- DEALLOCATE_LOCAL(pbits);
+ xfree(pbits);
FreeScratchGC(pGCtmp);
}
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index f966d4026..d2159813c 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -600,24 +600,6 @@ winFixupPaths (void)
winMsg (font_from, "FontPath set to \"%s\"\n", defaultFontPath);
#ifdef RELOCATE_PROJECTROOT
- if (1) {
- const char *libx11dir = "/usr/X11R6/lib/X11";
- size_t libx11dir_len = strlen(libx11dir);
-
- if (strncmp(libx11dir, rgbPath, libx11dir_len) == 0)
- {
- size_t newsize = strlen(rgbPath) - libx11dir_len + basedirlen;
- char *compose = malloc(newsize + 1);
- strcpy(compose, basedir);
- strcat(compose, rgbPath + libx11dir_len);
- compose[newsize] = 0;
- rgbPath = xstrdup (compose);
- free (compose);
-
- winMsg (X_DEFAULT, "RgbPath set to \"%s\"\n", rgbPath);
- }
- }
-
if (getenv("XKEYSYMDB") == NULL)
{
char buffer[MAX_PATH];
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 45a6ca3c2..3ab324931 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1036,7 +1036,8 @@ winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen);
*/
PixmapPtr
-winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth);
+winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint);
Bool
winDestroyPixmapNativeGDI (PixmapPtr pPixmap);
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index 2c1877172..a68ead266 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -65,7 +65,6 @@ WinCmdlineRec g_cmdline = {
NULL, /* configFile */
#endif
NULL, /* fontPath */
- NULL, /* rgbPath */
#ifdef XWIN_XF86CONFIG
NULL, /* keyboard */
#endif
@@ -673,20 +672,6 @@ winConfigFiles ()
}
winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath);
- /* RGBPath */
- from = X_DEFAULT;
- if (g_cmdline.rgbPath)
- {
- from = X_CMDLINE;
- rgbPath = g_cmdline.rgbPath;
- }
- else if (filesptr != NULL && filesptr->file_rgbpath)
- {
- from = X_CONFIG;
- rgbPath = xstrdup (filesptr->file_rgbpath);
- }
- winMsg (from, "RgbPath set to \"%s\"\n", rgbPath);
-
return TRUE;
}
#else
@@ -702,14 +687,6 @@ winConfigFiles ()
winMsg (X_CMDLINE, "FontPath set to \"%s\"\n", defaultFontPath);
}
- /* RGBPath */
- if (g_cmdline.rgbPath)
- {
- from = X_CMDLINE;
- rgbPath = g_cmdline.rgbPath;
- winMsg (X_CMDLINE, "RgbPath set to \"%s\"\n", rgbPath);
- }
-
return TRUE;
}
#endif
diff --git a/hw/xwin/winconfig.h b/hw/xwin/winconfig.h
index 8fd9841d7..4b56d639c 100644
--- a/hw/xwin/winconfig.h
+++ b/hw/xwin/winconfig.h
@@ -190,7 +190,6 @@ typedef struct
char *configFile;
#endif
char *fontPath;
- char *rgbPath;
/* input devices - keyboard */
#ifdef XWIN_XF86CONFIG
char *keyboard;
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index ffe72079a..6687ebf00 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -57,7 +57,7 @@ winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix,
PixmapPtr
winCreatePixmapNativeGDI (ScreenPtr pScreen,
int iWidth, int iHeight,
- int iDepth)
+ int iDepth, unsigned usage_hint)
{
winPrivPixmapPtr pPixmapPriv = NULL;
PixmapPtr pPixmap = NULL;
@@ -71,8 +71,8 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
}
#if CYGDEBUG
- winDebug ("winCreatePixmap () - w %d h %d d %d bw %d\n",
- iWidth, iHeight, iDepth,
+ winDebug ("winCreatePixmap () - w %d h %d d %d uh %d bw %d\n",
+ iWidth, iHeight, iDepth, usage_hint,
PixmapBytePad (iWidth, iDepth));
#endif
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index bd0b99977..7139cbaab 100755
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -1278,16 +1278,6 @@ ddxProcessArgument (int argc, char *argv[], int i)
}
/*
- * Look for the '-co' argument
- */
- if (IS_OPTION ("-co"))
- {
- CHECK_ARGS (1);
- g_cmdline.rgbPath = argv[++i];
- return 0; /* Let DIX parse this again */
- }
-
- /*
* Look for the '-query' argument
*/
if (IS_OPTION ("-query"))
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index e844dbfb3..1600996df 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -167,7 +167,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
nbox = REGION_NUM_RECTS(prgnDst);
/* Allocate source points for each box */
- if(!(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec))))
+ if(!(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec))))
return;
/* Set an iterator pointer */
@@ -206,7 +206,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
}
/* Cleanup the regions, etc. */
- DEALLOCATE_LOCAL(pptSrc);
+ xfree(pptSrc);
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
}