xserver: Branch 'xorg-server-1.2-apple' - 4 commits
Ben Byer
bbyer at kemper.freedesktop.org
Tue Nov 13 02:00:29 PST 2007
configure.ac | 2 +-
hw/darwin/Makefile.am | 2 +-
hw/darwin/apple/X11Application.m | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 8f600d98428ee41468726801e42b8d4f17936e3f
Author: Ben Byer <bbyer at bbyer.local>
Date: Tue Nov 13 01:09:16 2007 -0800
Revert "Revert "These changes are necessary, yet not sufficient, to get 8-bit indexed""
This reverts commit 45f8601692cf31bc3acdab56fad6688064bbdcb6.
bah, not needed
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index 8fd922d..fc22b1b 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -34,6 +34,7 @@
#endif
#include "rootlessCommon.h"
+#include "colormapst.h"
unsigned int rootless_CopyBytes_threshold = 0;
unsigned int rootless_FillBytes_threshold = 0;
@@ -95,6 +96,41 @@ IsFramedWindow(WindowPtr pWin)
return (top && WINREC(top));
}
+Bool
+RootlessResolveColormap (ScreenPtr pScreen, int first_color,
+ int n_colors, uint32_t *colors)
+{
+ int last, i;
+ ColormapPtr map;
+
+ map = RootlessGetColormap (pScreen);
+ if (map == NULL || map->class != PseudoColor) return FALSE;
+
+ last = MIN (map->pVisual->ColormapEntries, first_color + n_colors);
+ for (i = MAX (0, first_color); i < last; i++) {
+ Entry *ent = map->red + i;
+ uint16_t red, green, blue;
+
+ if (!ent->refcnt) continue;
+ if (ent->fShared) {
+ red = ent->co.shco.red->color;
+ green = ent->co.shco.green->color;
+ blue = ent->co.shco.blue->color;
+ } else {
+ red = ent->co.local.red;
+ green = ent->co.local.green;
+ blue = ent->co.local.blue;
+ }
+
+ colors[i - first_color] = (0xFF000000UL
+ | ((uint32_t) red & 0xff00) << 8
+ | (green & 0xff00)
+ | (blue >> 8));
+ }
+
+ return TRUE;
+}
+
/*
* RootlessStartDrawing
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index 3bf6af0..b002214 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -32,6 +32,7 @@
#include <dix-config.h>
#endif
+#include <stdint.h>
#ifndef _ROOTLESSCOMMON_H
#define _ROOTLESSCOMMON_H
@@ -104,13 +105,20 @@ typedef struct _RootlessScreenRec {
GlyphsProcPtr Glyphs;
#endif
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
+ StoreColorsProcPtr StoreColors;
+
void *pixmap_data;
unsigned int pixmap_data_size;
+ ColormapPtr colormap;
+
void *redisplay_timer;
unsigned int redisplay_timer_set :1;
unsigned int redisplay_queued :1;
unsigned int redisplay_expired :1;
+ unsigned int colormap_changed :1;
} RootlessScreenRec, *RootlessScreenPtr;
@@ -251,6 +259,16 @@ void RootlessRedisplayScreen(ScreenPtr pScreen);
void RootlessQueueRedisplay(ScreenPtr pScreen);
+/* Return the colormap currently installed on the given screen. */
+ColormapPtr RootlessGetColormap (ScreenPtr pScreen);
+
+/* Convert colormap to ARGB. */
+Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
+ int n_colors, uint32_t *colors);
+
+void RootlessFlushWindowColormap (WindowPtr pWin);
+void RootlessFlushScreenColormaps (ScreenPtr pScreen);
+
// Move a window to its proper location on the screen.
void RootlessRepositionWindow(WindowPtr pWin);
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 356fec7..b314581 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -42,6 +42,7 @@
#include "propertyst.h"
#include "mivalidate.h"
#include "picturestr.h"
+#include "colormapst.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -469,6 +470,67 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
return result;
}
+ColormapPtr
+RootlessGetColormap (ScreenPtr pScreen)
+{
+ RootlessScreenRec *s = SCREENREC (pScreen);
+
+ return s->colormap;
+}
+
+static void
+RootlessInstallColormap (ColormapPtr pMap)
+{
+ ScreenPtr pScreen = pMap->pScreen;
+ RootlessScreenRec *s = SCREENREC (pScreen);
+
+ SCREEN_UNWRAP(pScreen, InstallColormap);
+
+ if (s->colormap != pMap) {
+ s->colormap = pMap;
+ s->colormap_changed = TRUE;
+ RootlessQueueRedisplay (pScreen);
+ }
+
+ pScreen->InstallColormap (pMap);
+
+ SCREEN_WRAP (pScreen, InstallColormap);
+}
+
+static void
+RootlessUninstallColormap (ColormapPtr pMap)
+{
+ ScreenPtr pScreen = pMap->pScreen;
+ RootlessScreenRec *s = SCREENREC (pScreen);
+
+ SCREEN_UNWRAP(pScreen, UninstallColormap);
+
+ if (s->colormap == pMap)
+ s->colormap = NULL;
+
+ pScreen->UninstallColormap (pMap);
+
+ SCREEN_WRAP(pScreen, UninstallColormap);
+}
+
+static void
+RootlessStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef)
+{
+ ScreenPtr pScreen = pMap->pScreen;
+ RootlessScreenRec *s = SCREENREC (pScreen);
+
+ SCREEN_UNWRAP(pScreen, StoreColors);
+
+ if (s->colormap == pMap && ndef > 0) {
+ s->colormap_changed = TRUE;
+ RootlessQueueRedisplay (pScreen);
+ }
+
+ pScreen->StoreColors (pMap, ndef, pdef);
+
+ SCREEN_WRAP(pScreen, StoreColors);
+}
+
static CARD32
RootlessRedisplayCallback(OsTimerPtr timer, CARD32 time, void *arg)
@@ -616,6 +678,9 @@ RootlessWrap(ScreenPtr pScreen)
WRAP(MarkOverlappedWindows);
WRAP(ValidateTree);
WRAP(ChangeWindowAttributes);
+ WRAP(InstallColormap);
+ WRAP(UninstallColormap);
+ WRAP(StoreColors);
#ifdef SHAPE
WRAP(SetShape);
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 84aa91d..cf32426 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -447,6 +447,12 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
}
+Bool
+RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors)
+{
+ return RootlessResolveColormap (data, first_color, n_colors, colors);
+}
+
/*
* RootlessEnsureFrame
* Make sure the given window is framed. If the window doesn't have a
@@ -505,6 +511,9 @@ RootlessEnsureFrame(WindowPtr pWin)
return NULL;
}
+ if (pWin->drawable.depth == 8)
+ RootlessFlushWindowColormap(pWin);
+
#ifdef SHAPE
if (pShape != NULL)
REGION_UNINIT(pScreen, &shape);
@@ -1458,6 +1467,25 @@ out:
}
+void
+RootlessFlushWindowColormap (WindowPtr pWin)
+{
+ RootlessWindowRec *winRec = WINREC (pWin);
+ xp_window_changes wc;
+
+ if (winRec == NULL)
+ return;
+
+ RootlessStopDrawing (pWin, FALSE);
+
+ /* This is how we tell xp that the colormap may have changed. */
+
+ wc.colormap = RootlessColormapCallback;
+ wc.colormap_data = pWin->drawable.pScreen;
+
+ configure_window (winRec->wid, XP_COLORMAP, &wc);
+}
+
/*
* SetPixmapOfAncestors
* Set the Pixmaps on all ParentRelative windows up the ancestor chain.
commit e4edb3504102730058f371a0ea6a2bb8f6837fe9
Author: Ben Byer <bbyer at bbyer.local>
Date: Tue Nov 13 01:08:02 2007 -0800
fix missing -DXFree86Server; this needs to be defined when building
fb/fbcmap.c or else you get the "sunglasses effect"
diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index d41e7cc..04d9965 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -4,7 +4,7 @@ libdarwin_XINPUT_SRCS = darwinXinput.c
AM_CFLAGS = @XORG_CFLAGS@
INCLUDES = @XORG_INCS@ -I../../miext/rootless
-DEFS = @DEFS@ -DUSE_NEW_CLUT -DBUILD_DATE=\"$(BUILD_DATE)\"
+DEFS = @DEFS@ -DUSE_NEW_CLUT -DXFree86Server -DBUILD_DATE=\"$(BUILD_DATE)\"
if XQUARTZ
XQUARTZ_SUBDIRS = quartz
commit 45f8601692cf31bc3acdab56fad6688064bbdcb6
Author: Ben Byer <bbyer at bbyer.apple.com>
Date: Mon Nov 12 21:33:04 2007 -0800
Revert "These changes are necessary, yet not sufficient, to get 8-bit indexed"
This reverts commit 7baba3f6b8db059ff984afbe23a43d89638ccb0e.
This should hopefully prevent the "sunglasses" problem aka
"why is my xterm black"?
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index fc22b1b..8fd922d 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -34,7 +34,6 @@
#endif
#include "rootlessCommon.h"
-#include "colormapst.h"
unsigned int rootless_CopyBytes_threshold = 0;
unsigned int rootless_FillBytes_threshold = 0;
@@ -96,41 +95,6 @@ IsFramedWindow(WindowPtr pWin)
return (top && WINREC(top));
}
-Bool
-RootlessResolveColormap (ScreenPtr pScreen, int first_color,
- int n_colors, uint32_t *colors)
-{
- int last, i;
- ColormapPtr map;
-
- map = RootlessGetColormap (pScreen);
- if (map == NULL || map->class != PseudoColor) return FALSE;
-
- last = MIN (map->pVisual->ColormapEntries, first_color + n_colors);
- for (i = MAX (0, first_color); i < last; i++) {
- Entry *ent = map->red + i;
- uint16_t red, green, blue;
-
- if (!ent->refcnt) continue;
- if (ent->fShared) {
- red = ent->co.shco.red->color;
- green = ent->co.shco.green->color;
- blue = ent->co.shco.blue->color;
- } else {
- red = ent->co.local.red;
- green = ent->co.local.green;
- blue = ent->co.local.blue;
- }
-
- colors[i - first_color] = (0xFF000000UL
- | ((uint32_t) red & 0xff00) << 8
- | (green & 0xff00)
- | (blue >> 8));
- }
-
- return TRUE;
-}
-
/*
* RootlessStartDrawing
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index b002214..3bf6af0 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -32,7 +32,6 @@
#include <dix-config.h>
#endif
-#include <stdint.h>
#ifndef _ROOTLESSCOMMON_H
#define _ROOTLESSCOMMON_H
@@ -105,20 +104,13 @@ typedef struct _RootlessScreenRec {
GlyphsProcPtr Glyphs;
#endif
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
- StoreColorsProcPtr StoreColors;
-
void *pixmap_data;
unsigned int pixmap_data_size;
- ColormapPtr colormap;
-
void *redisplay_timer;
unsigned int redisplay_timer_set :1;
unsigned int redisplay_queued :1;
unsigned int redisplay_expired :1;
- unsigned int colormap_changed :1;
} RootlessScreenRec, *RootlessScreenPtr;
@@ -259,16 +251,6 @@ void RootlessRedisplayScreen(ScreenPtr pScreen);
void RootlessQueueRedisplay(ScreenPtr pScreen);
-/* Return the colormap currently installed on the given screen. */
-ColormapPtr RootlessGetColormap (ScreenPtr pScreen);
-
-/* Convert colormap to ARGB. */
-Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
- int n_colors, uint32_t *colors);
-
-void RootlessFlushWindowColormap (WindowPtr pWin);
-void RootlessFlushScreenColormaps (ScreenPtr pScreen);
-
// Move a window to its proper location on the screen.
void RootlessRepositionWindow(WindowPtr pWin);
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index b314581..356fec7 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -42,7 +42,6 @@
#include "propertyst.h"
#include "mivalidate.h"
#include "picturestr.h"
-#include "colormapst.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -470,67 +469,6 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
return result;
}
-ColormapPtr
-RootlessGetColormap (ScreenPtr pScreen)
-{
- RootlessScreenRec *s = SCREENREC (pScreen);
-
- return s->colormap;
-}
-
-static void
-RootlessInstallColormap (ColormapPtr pMap)
-{
- ScreenPtr pScreen = pMap->pScreen;
- RootlessScreenRec *s = SCREENREC (pScreen);
-
- SCREEN_UNWRAP(pScreen, InstallColormap);
-
- if (s->colormap != pMap) {
- s->colormap = pMap;
- s->colormap_changed = TRUE;
- RootlessQueueRedisplay (pScreen);
- }
-
- pScreen->InstallColormap (pMap);
-
- SCREEN_WRAP (pScreen, InstallColormap);
-}
-
-static void
-RootlessUninstallColormap (ColormapPtr pMap)
-{
- ScreenPtr pScreen = pMap->pScreen;
- RootlessScreenRec *s = SCREENREC (pScreen);
-
- SCREEN_UNWRAP(pScreen, UninstallColormap);
-
- if (s->colormap == pMap)
- s->colormap = NULL;
-
- pScreen->UninstallColormap (pMap);
-
- SCREEN_WRAP(pScreen, UninstallColormap);
-}
-
-static void
-RootlessStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef)
-{
- ScreenPtr pScreen = pMap->pScreen;
- RootlessScreenRec *s = SCREENREC (pScreen);
-
- SCREEN_UNWRAP(pScreen, StoreColors);
-
- if (s->colormap == pMap && ndef > 0) {
- s->colormap_changed = TRUE;
- RootlessQueueRedisplay (pScreen);
- }
-
- pScreen->StoreColors (pMap, ndef, pdef);
-
- SCREEN_WRAP(pScreen, StoreColors);
-}
-
static CARD32
RootlessRedisplayCallback(OsTimerPtr timer, CARD32 time, void *arg)
@@ -678,9 +616,6 @@ RootlessWrap(ScreenPtr pScreen)
WRAP(MarkOverlappedWindows);
WRAP(ValidateTree);
WRAP(ChangeWindowAttributes);
- WRAP(InstallColormap);
- WRAP(UninstallColormap);
- WRAP(StoreColors);
#ifdef SHAPE
WRAP(SetShape);
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index cf32426..84aa91d 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -447,12 +447,6 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
}
-Bool
-RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors)
-{
- return RootlessResolveColormap (data, first_color, n_colors, colors);
-}
-
/*
* RootlessEnsureFrame
* Make sure the given window is framed. If the window doesn't have a
@@ -511,9 +505,6 @@ RootlessEnsureFrame(WindowPtr pWin)
return NULL;
}
- if (pWin->drawable.depth == 8)
- RootlessFlushWindowColormap(pWin);
-
#ifdef SHAPE
if (pShape != NULL)
REGION_UNINIT(pScreen, &shape);
@@ -1467,25 +1458,6 @@ out:
}
-void
-RootlessFlushWindowColormap (WindowPtr pWin)
-{
- RootlessWindowRec *winRec = WINREC (pWin);
- xp_window_changes wc;
-
- if (winRec == NULL)
- return;
-
- RootlessStopDrawing (pWin, FALSE);
-
- /* This is how we tell xp that the colormap may have changed. */
-
- wc.colormap = RootlessColormapCallback;
- wc.colormap_data = pWin->drawable.pScreen;
-
- configure_window (winRec->wid, XP_COLORMAP, &wc);
-}
-
/*
* SetPixmapOfAncestors
* Set the Pixmaps on all ParentRelative windows up the ancestor chain.
commit 9079b574458832ca2f19a479e14c425445d4c5c3
Author: Ben Byer <bbyer at bbyer.apple.com>
Date: Mon Nov 12 21:32:21 2007 -0800
bump to 1.2a9
diff --git a/configure.ac b/configure.ac
index a203560..b6d4c15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
dnl This is the not the Xorg version number, it's the server version number.
dnl Yes, that's weird.
-AC_INIT([xorg-server], 1.2a8, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.2a9, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 92d369b..7132186 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -156,7 +156,7 @@ message_kit_thread (SEL selector, NSObject *arg)
tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
- [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.2 (xorg-server-1.2a8)",
+ [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.2 (xorg-server-1.2a9)",
tem] forKey:@"ApplicationVersion"];
[self orderFrontStandardAboutPanelWithOptions: dict];
More information about the xorg-commit
mailing list