summaryrefslogtreecommitdiff
path: root/hw/darwin/quartz/xpr
diff options
context:
space:
mode:
authorBen Byer <bbyer@bbyer.local>2007-11-04 05:13:19 -0800
committerBen Byer <bbyer@bbyer.local>2007-11-04 05:13:19 -0800
commitff9929ed48f2dec8b536d348e25e66a0bc4ac1a6 (patch)
tree985b4121199b7c0bdcfa9eb745d0fa2b7f7f5a7e /hw/darwin/quartz/xpr
parent181468db92d44a58080fc9a76e46dfc7011bf9f1 (diff)
pulling in changes from xorg-server-1.2-apple branch
Diffstat (limited to 'hw/darwin/quartz/xpr')
-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.c23
3 files changed, 26 insertions, 15 deletions
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c
index d5a118061..10d326444 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.
@@ -84,8 +82,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 76c719ec0..c395f0743 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..3f91980bd 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.
*
@@ -77,8 +76,14 @@ eventHandler(unsigned int type, const void *arg,
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;
@@ -177,15 +182,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 +208,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);