[63813] trunk/dports/x11/xorg-server-devel
jeremyhu at macports.org
jeremyhu at macports.org
Mon Feb 15 17:16:50 PST 2010
Revision: 63813
http://trac.macports.org/changeset/63813
Author: jeremyhu at macports.org
Date: 2010-02-15 17:16:47 -0800 (Mon, 15 Feb 2010)
Log Message:
-----------
Bump xorg-server-devel to fix a couple of annoyances (including XQuartz #339)
Modified Paths:
--------------
trunk/dports/x11/xorg-server-devel/Portfile
trunk/dports/x11/xorg-server-devel/files/0002-XQuartz-clang-static-analysis-fixes.patch
Added Paths:
-----------
trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Fix-a-possible-buffer-overrun-in-quartzAudio.patch
trunk/dports/x11/xorg-server-devel/files/0004-XQuartz-Use-an-empty-xkb-keymap-by-default.patch
trunk/dports/x11/xorg-server-devel/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch
trunk/dports/x11/xorg-server-devel/files/0006-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch
Removed Paths:
-------------
trunk/dports/x11/xorg-server-devel/files/0001-XQuartz-Fix-a-possible-crash-in-quartzAudio-fade.patch
trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Use-an-empty-xkb-keymap-by-default.patch
trunk/dports/x11/xorg-server-devel/files/0004-fb-Revert-fb-changes-that-broke-XQuartz.patch
Modified: trunk/dports/x11/xorg-server-devel/Portfile
===================================================================
--- trunk/dports/x11/xorg-server-devel/Portfile 2010-02-15 23:55:05 UTC (rev 63812)
+++ trunk/dports/x11/xorg-server-devel/Portfile 2010-02-16 01:16:47 UTC (rev 63813)
@@ -5,6 +5,7 @@
name xorg-server-devel
set my_name xorg-server
version 1.7.99.901
+revision 1
categories x11 devel
maintainers jeremyhu openmaintainer
description The X.org / Xquartz X server.
@@ -75,10 +76,11 @@
configure.cppflags-append -I/usr/include -I${filespath}/dri
patchfiles \
- 0001-XQuartz-Fix-a-possible-crash-in-quartzAudio-fade.patch \
0002-XQuartz-clang-static-analysis-fixes.patch \
- 0003-XQuartz-Use-an-empty-xkb-keymap-by-default.patch \
- 0004-fb-Revert-fb-changes-that-broke-XQuartz.patch
+ 0003-XQuartz-Fix-a-possible-buffer-overrun-in-quartzAudio.patch \
+ 0004-XQuartz-Use-an-empty-xkb-keymap-by-default.patch \
+ 0005-fb-Revert-fb-changes-that-broke-XQuartz.patch \
+ 0006-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch
patch.args -p1
Deleted: trunk/dports/x11/xorg-server-devel/files/0001-XQuartz-Fix-a-possible-crash-in-quartzAudio-fade.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0001-XQuartz-Fix-a-possible-crash-in-quartzAudio-fade.patch 2010-02-15 23:55:05 UTC (rev 63812)
+++ trunk/dports/x11/xorg-server-devel/files/0001-XQuartz-Fix-a-possible-crash-in-quartzAudio-fade.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -1,26 +0,0 @@
-From 1e9491f12b8a20fde07b7bd86e8e0ad87a6f0e08 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Wed, 10 Feb 2010 17:22:58 -0800
-Subject: [PATCH 1/4] XQuartz: Fix a possible crash in quartzAudio fade
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- hw/xquartz/quartzAudio.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
-index af63d18..2723259 100644
---- a/hw/xquartz/quartzAudio.c
-+++ b/hw/xquartz/quartzAudio.c
-@@ -141,7 +141,7 @@ static void QuartzFillBuffer(
- data->prevFrame = 0;
-
- // adjust for space eaten by prev fade
-- buffer += audiobuffer->mNumberChannels*frame;
-+ b += audiobuffer->mNumberChannels*frame;
- bufferFrameCount -= frame;
- frameCount = min(bufferFrameCount, data->remainingFrames);
- }
---
-1.6.2
-
Modified: trunk/dports/x11/xorg-server-devel/files/0002-XQuartz-clang-static-analysis-fixes.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0002-XQuartz-clang-static-analysis-fixes.patch 2010-02-15 23:55:05 UTC (rev 63812)
+++ trunk/dports/x11/xorg-server-devel/files/0002-XQuartz-clang-static-analysis-fixes.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -1,7 +1,7 @@
-From ae0fb1f426e85420cce76ac4f03a929eddc05a07 Mon Sep 17 00:00:00 2001
+From 4127e8e5be5c366eb752bbb8d7f0ff5b519e641b Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed, 10 Feb 2010 17:56:30 -0800
-Subject: [PATCH 2/4] XQuartz: clang static analysis fixes
+Subject: [PATCH 2/6] XQuartz: clang static analysis fixes
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
@@ -243,7 +243,7 @@
struct {
diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
-index 2723259..d6e9a72 100644
+index af63d18..e4b49fc 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -204,6 +204,7 @@ QuartzAudioIOProc(
@@ -268,5 +268,5 @@
const char *sysmodmap = PROJECTROOT "/lib/X11/xinit/.Xmodmap";
const char *homedir = getenv("HOME");
--
-1.6.2
+1.6.6.1
Added: trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Fix-a-possible-buffer-overrun-in-quartzAudio.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Fix-a-possible-buffer-overrun-in-quartzAudio.patch (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Fix-a-possible-buffer-overrun-in-quartzAudio.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -0,0 +1,112 @@
+From 4e8bf12b13690afa6d9fee0e339d3819ef16fb3f Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Mon, 15 Feb 2010 16:46:21 -0800
+Subject: [PATCH 3/6] XQuartz: Fix a possible buffer overrun in quartzAudio
+
+Also dropped deprecated API while there
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ hw/xquartz/quartzAudio.c | 36 ++++++++++++++++++------------------
+ 1 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
+index e4b49fc..708202b 100644
+--- a/hw/xquartz/quartzAudio.c
++++ b/hw/xquartz/quartzAudio.c
+@@ -62,7 +62,6 @@ typedef struct QuartzAudioRec {
+ UInt32 curFrame;
+ UInt32 remainingFrames;
+ UInt32 totalFrames;
+- UInt32 bytesPerFrame;
+ double sampleRate;
+ UInt32 fadeLength;
+
+@@ -117,9 +116,9 @@ static void QuartzFillBuffer(
+ unsigned int bufferFrameCount;
+ float multiplier, v;
+ int i;
+-
++
+ buffer = (float *)audiobuffer->mData;
+- bufferFrameCount = audiobuffer->mDataByteSize / data->bytesPerFrame;
++ bufferFrameCount = audiobuffer->mDataByteSize / (sizeof(float) * audiobuffer->mNumberChannels);
+
+ frameCount = min(bufferFrameCount, data->remainingFrames);
+
+@@ -141,7 +140,7 @@ static void QuartzFillBuffer(
+ data->prevFrame = 0;
+
+ // adjust for space eaten by prev fade
+- buffer += audiobuffer->mNumberChannels*frame;
++ b += audiobuffer->mNumberChannels*frame;
+ bufferFrameCount -= frame;
+ frameCount = min(bufferFrameCount, data->remainingFrames);
+ }
+@@ -204,7 +203,8 @@ QuartzAudioIOProc(
+ if (wasPlaying && !data->playing) {
+ OSStatus err;
+ err = AudioDeviceStop(inDevice, QuartzAudioIOProc);
+- fprintf(stderr, "Error stopping audio device: %ld\n", (long int)err);
++ if(err != noErr)
++ fprintf(stderr, "Error stopping audio device: %ld\n", (long int)err);
+ }
+ pthread_mutex_unlock(&data->lock);
+ return 0;
+@@ -263,16 +263,17 @@ void QuartzAudioInit(void)
+ UInt32 propertySize;
+ OSStatus status;
+ AudioDeviceID outputDevice;
+- AudioStreamBasicDescription outputStreamDescription;
+ double sampleRate;
+-
++ AudioObjectPropertyAddress devicePropertyAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
++ AudioObjectPropertyAddress sampleRatePropertyAddress = { kAudioDevicePropertyNominalSampleRate, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
++
+ // Get the default output device
+ propertySize = sizeof(outputDevice);
+- status = AudioHardwareGetProperty(
+- kAudioHardwarePropertyDefaultOutputDevice,
+- &propertySize, &outputDevice);
++ status = AudioObjectGetPropertyData(kAudioObjectSystemObject, &devicePropertyAddress,
++ 0, NULL,
++ &propertySize, &outputDevice);
+ if (status) {
+- ErrorF("QuartzAudioInit: AudioHardwareGetProperty returned %ld\n",
++ ErrorF("QuartzAudioInit: AudioObjectGetPropertyData(output device) returned %ld\n",
+ (long)status);
+ return;
+ }
+@@ -282,23 +283,22 @@ void QuartzAudioInit(void)
+ }
+
+ // Get the basic device description
+- propertySize = sizeof(outputStreamDescription);
+- status = AudioDeviceGetProperty(outputDevice, 0, FALSE,
+- kAudioDevicePropertyStreamFormat,
+- &propertySize, &outputStreamDescription);
++ sampleRate = 0.;
++ propertySize = sizeof(sampleRate);
++ status = AudioObjectGetPropertyData(outputDevice, &sampleRatePropertyAddress,
++ 0, NULL,
++ &propertySize, &sampleRate);
+ if (status) {
+- ErrorF("QuartzAudioInit: GetProperty(stream format) returned %ld\n",
++ ErrorF("QuartzAudioInit: AudioObjectGetPropertyData(sample rate) returned %ld\n",
+ (long)status);
+ return;
+ }
+- sampleRate = outputStreamDescription.mSampleRate;
+
+ // Fill in the playback data
+ data.frequency = 0;
+ data.amplitude = 0;
+ data.curFrame = 0;
+ data.remainingFrames = 0;
+- data.bytesPerFrame = outputStreamDescription.mBytesPerFrame;
+ data.sampleRate = sampleRate;
+ // data.bufferByteCount = bufferByteCount;
+ data.playing = FALSE;
+--
+1.6.6.1
+
Deleted: trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Use-an-empty-xkb-keymap-by-default.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Use-an-empty-xkb-keymap-by-default.patch 2010-02-15 23:55:05 UTC (rev 63812)
+++ trunk/dports/x11/xorg-server-devel/files/0003-XQuartz-Use-an-empty-xkb-keymap-by-default.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -1,86 +0,0 @@
-From 960924eae45b520a1386f4d2ec81b1a6b2e7d8c3 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Wed, 10 Feb 2010 15:52:14 -0800
-Subject: [PATCH 3/4] XQuartz: Use an empty xkb keymap by default
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- hw/xquartz/darwin.c | 6 ++++++
- hw/xquartz/quartzKeyboard.c | 16 +++++-----------
- 2 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
-index 3feacdc..066f5a5 100644
---- a/hw/xquartz/darwin.c
-+++ b/hw/xquartz/darwin.c
-@@ -45,6 +45,7 @@
- #include "site.h"
- #include "globals.h"
- #include "dix.h"
-+#include "xkbsrv.h"
-
- #include <X11/extensions/XI.h>
- #include <X11/extensions/XIproto.h>
-@@ -461,6 +462,11 @@ int DarwinParseModifierList(const char *constmodifiers, int separatelr)
- */
- void InitInput( int argc, char **argv )
- {
-+ XkbRMLVOSet rmlvo = { .rules = "base", .model = "empty", .layout = "empty",
-+ .variant = NULL, .options = NULL };
-+ /* We need to really have rules... or something... */
-+ XkbSetRulesDflts(&rmlvo);
-+
- darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE);
- RegisterKeyboardDevice( darwinKeyboard );
- darwinKeyboard->name = strdup("keyboard");
-diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
-index 3b4eac3..7e36a9a 100644
---- a/hw/xquartz/quartzKeyboard.c
-+++ b/hw/xquartz/quartzKeyboard.c
-@@ -301,9 +301,6 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
- // for a kIOHIDParamConnectType connection.
- assert(darwinParamConnect = NXOpenEventStatus());
-
-- /* We need to really have rules... or something... */
-- //XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
--
- InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
-
- DarwinKeyboardReloadHandler();
-@@ -775,12 +772,9 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
- #endif
- }
-
-- // There seems to be an issue with this in 1.5+, shift-space is not
-- // producing space, it's sending NoSymbol... ?
-- //if (k[3] == k[2]) k[3] = NoSymbol;
-- //if (k[1] == k[0]) k[1] = NoSymbol;
-- //if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
-- //if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] = NoSymbol;
-+ if (k[3] == k[2]) k[3] = NoSymbol;
-+ if (k[1] == k[0]) k[1] = NoSymbol;
-+ if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
- }
-
- /* Fix up some things that are normally missing.. */
-@@ -791,7 +785,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
-
- if (k[0] == NoSymbol && k[1] == NoSymbol
- && k[2] == NoSymbol && k[3] == NoSymbol)
-- k[0] = k[1] = k[2] = k[3] = known_keys[i].keysym;
-+ k[0] = known_keys[i].keysym;
- }
- }
-
-@@ -804,7 +798,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
- k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
-
- if (k[0] == known_numeric_keys[i].normal)
-- k[0] = k[1] = k[2] = k[3] = known_numeric_keys[i].keypad;
-+ k[0] = known_numeric_keys[i].keypad;
- }
- }
-
---
-1.6.2
-
Added: trunk/dports/x11/xorg-server-devel/files/0004-XQuartz-Use-an-empty-xkb-keymap-by-default.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0004-XQuartz-Use-an-empty-xkb-keymap-by-default.patch (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0004-XQuartz-Use-an-empty-xkb-keymap-by-default.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -0,0 +1,86 @@
+From 89727d3db19a6eaa06125b982fff866a88901ce9 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Wed, 10 Feb 2010 15:52:14 -0800
+Subject: [PATCH 4/6] XQuartz: Use an empty xkb keymap by default
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ hw/xquartz/darwin.c | 6 ++++++
+ hw/xquartz/quartzKeyboard.c | 16 +++++-----------
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
+index 3feacdc..066f5a5 100644
+--- a/hw/xquartz/darwin.c
++++ b/hw/xquartz/darwin.c
+@@ -45,6 +45,7 @@
+ #include "site.h"
+ #include "globals.h"
+ #include "dix.h"
++#include "xkbsrv.h"
+
+ #include <X11/extensions/XI.h>
+ #include <X11/extensions/XIproto.h>
+@@ -461,6 +462,11 @@ int DarwinParseModifierList(const char *constmodifiers, int separatelr)
+ */
+ void InitInput( int argc, char **argv )
+ {
++ XkbRMLVOSet rmlvo = { .rules = "base", .model = "empty", .layout = "empty",
++ .variant = NULL, .options = NULL };
++ /* We need to really have rules... or something... */
++ XkbSetRulesDflts(&rmlvo);
++
+ darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE);
+ RegisterKeyboardDevice( darwinKeyboard );
+ darwinKeyboard->name = strdup("keyboard");
+diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
+index 3b4eac3..7e36a9a 100644
+--- a/hw/xquartz/quartzKeyboard.c
++++ b/hw/xquartz/quartzKeyboard.c
+@@ -301,9 +301,6 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
+ // for a kIOHIDParamConnectType connection.
+ assert(darwinParamConnect = NXOpenEventStatus());
+
+- /* We need to really have rules... or something... */
+- //XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
+-
+ InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
+
+ DarwinKeyboardReloadHandler();
+@@ -775,12 +772,9 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
+ #endif
+ }
+
+- // There seems to be an issue with this in 1.5+, shift-space is not
+- // producing space, it's sending NoSymbol... ?
+- //if (k[3] == k[2]) k[3] = NoSymbol;
+- //if (k[1] == k[0]) k[1] = NoSymbol;
+- //if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
+- //if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] = NoSymbol;
++ if (k[3] == k[2]) k[3] = NoSymbol;
++ if (k[1] == k[0]) k[1] = NoSymbol;
++ if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
+ }
+
+ /* Fix up some things that are normally missing.. */
+@@ -791,7 +785,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
+
+ if (k[0] == NoSymbol && k[1] == NoSymbol
+ && k[2] == NoSymbol && k[3] == NoSymbol)
+- k[0] = k[1] = k[2] = k[3] = known_keys[i].keysym;
++ k[0] = known_keys[i].keysym;
+ }
+ }
+
+@@ -804,7 +798,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
+ k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
+
+ if (k[0] == known_numeric_keys[i].normal)
+- k[0] = k[1] = k[2] = k[3] = known_numeric_keys[i].keypad;
++ k[0] = known_numeric_keys[i].keypad;
+ }
+ }
+
+--
+1.6.6.1
+
Deleted: trunk/dports/x11/xorg-server-devel/files/0004-fb-Revert-fb-changes-that-broke-XQuartz.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0004-fb-Revert-fb-changes-that-broke-XQuartz.patch 2010-02-15 23:55:05 UTC (rev 63812)
+++ trunk/dports/x11/xorg-server-devel/files/0004-fb-Revert-fb-changes-that-broke-XQuartz.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -1,231 +0,0 @@
-From ed5676d7872626c98e19a044110210b8f5fdbcf4 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Fri, 12 Feb 2010 19:48:52 -0800
-Subject: [PATCH 4/4] fb: Revert fb changes that broke XQuartz
-
-http://bugs.freedesktop.org/show_bug.cgi?id=26124
-
-Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
-Revert "fb: Adjust transform or composite coordinates for pixman operations"
-
-http://bugs.freedesktop.org/26124
-
-This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
-This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- fb/fb.h | 7 +----
- fb/fbpict.c | 72 ++++++++++++++++++-----------------------------------------
- fb/fbtrap.c | 6 +---
- 3 files changed, 26 insertions(+), 59 deletions(-)
-
-diff --git a/fb/fb.h b/fb/fb.h
-index 02d6c03..ed21f9e 100644
---- a/fb/fb.h
-+++ b/fb/fb.h
-@@ -2082,11 +2082,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
- FbBits xor);
-
- extern _X_EXPORT pixman_image_t *
--image_from_pict (PicturePtr pict,
-- Bool has_clip,
-- int *xoff,
-- int *yoff);
--
-+image_from_pict (PicturePtr pict,
-+ Bool has_clip);
- extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
-
- #endif /* _FB_H_ */
-diff --git a/fb/fbpict.c b/fb/fbpict.c
-index dddfce8..07a2286 100644
---- a/fb/fbpict.c
-+++ b/fb/fbpict.c
-@@ -158,24 +158,19 @@ fbComposite (CARD8 op,
- CARD16 height)
- {
- pixman_image_t *src, *mask, *dest;
-- int src_xoff, src_yoff;
-- int msk_xoff, msk_yoff;
-- int dst_xoff, dst_yoff;
-
- miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
- if (pMask)
- miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
-
-- src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
-- mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
-- dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
-+ src = image_from_pict (pSrc, TRUE);
-+ mask = image_from_pict (pMask, TRUE);
-+ dest = image_from_pict (pDst, TRUE);
-
- if (src && dest && !(pMask && !mask))
- {
- pixman_image_composite (op, src, mask, dest,
-- xSrc + src_xoff, ySrc + src_yoff,
-- xMask + msk_xoff, yMask + msk_yoff,
-- xDst + dst_xoff, yDst + dst_yoff,
-+ xSrc, ySrc, xMask, yMask, xDst, yDst,
- width, height);
- }
-
-@@ -275,22 +270,22 @@ create_conical_gradient_image (PictGradient *gradient)
-
- static pixman_image_t *
- create_bits_picture (PicturePtr pict,
-- Bool has_clip,
-- int *xoff,
-- int *yoff)
-+ Bool has_clip)
- {
-- PixmapPtr pixmap;
- FbBits *bits;
- FbStride stride;
-- int bpp;
-+ int bpp, xoff, yoff;
- pixman_image_t *image;
-
-- fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
-- fbGetPixmapBitsData(pixmap, bits, stride, bpp);
-+ fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-+
-+ bits = (FbBits*)((CARD8*)bits +
-+ (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
-+ (pict->pDrawable->x + xoff) * (bpp / 8));
-
- image = pixman_image_create_bits (
- pict->format,
-- pixmap->drawable.width, pixmap->drawable.height,
-+ pict->pDrawable->width, pict->pDrawable->height,
- (uint32_t *)bits, stride * sizeof (FbStride));
-
-
-@@ -316,52 +311,30 @@ create_bits_picture (PicturePtr pict,
- if (pict->clientClipType != CT_NONE)
- pixman_image_set_has_client_clip (image, TRUE);
-
-- if (*xoff || *yoff)
-- pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
-+ pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
-
- pixman_image_set_clip_region (image, pict->pCompositeClip);
-
-- if (*xoff || *yoff)
-- pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
-+ pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
- }
-
- /* Indexed table */
- if (pict->pFormat->index.devPrivate)
- pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
-
-- /* Add in drawable origin to position within the image */
-- *xoff += pict->pDrawable->x;
-- *yoff += pict->pDrawable->y;
--
- return image;
- }
-
- static void
--set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
-+set_image_properties (pixman_image_t *image, PicturePtr pict)
- {
- pixman_repeat_t repeat;
- pixman_filter_t filter;
-
- if (pict->transform)
- {
-- /* For source images, adjust the transform to account
-- * for the drawable offset within the pixman image,
-- * then set the offset to 0 as it will be used
-- * to compute positions within the transformed image.
-- */
-- if (!has_clip) {
-- struct pixman_transform adjusted;
--
-- adjusted = *pict->transform;
-- pixman_transform_translate(&adjusted,
-- NULL,
-- pixman_int_to_fixed(*xoff),
-- pixman_int_to_fixed(*yoff));
-- pixman_image_set_transform (image, &adjusted);
-- *xoff = 0;
-- *yoff = 0;
-- } else
-- pixman_image_set_transform (image, pict->transform);
-+ pixman_image_set_transform (
-+ image, (pixman_transform_t *)pict->transform);
- }
-
- switch (pict->repeatType)
-@@ -388,8 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
-
- if (pict->alphaMap)
- {
-- int alpha_xoff, alpha_yoff;
-- pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
-+ pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
-
- pixman_image_set_alpha_map (
- image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
-@@ -422,7 +394,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
- }
-
- pixman_image_t *
--image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
-+image_from_pict (PicturePtr pict,
-+ Bool has_clip)
- {
- pixman_image_t *image = NULL;
-
-@@ -431,7 +404,7 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
-
- if (pict->pDrawable)
- {
-- image = create_bits_picture (pict, has_clip, xoff, yoff);
-+ image = create_bits_picture (pict, has_clip);
- }
- else if (pict->pSourcePict)
- {
-@@ -452,11 +425,10 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
- else if (sp->type == SourcePictTypeConical)
- image = create_conical_gradient_image (gradient);
- }
-- *xoff = *yoff = 0;
- }
-
- if (image)
-- set_image_properties (image, pict, has_clip, xoff, yoff);
-+ set_image_properties (image, pict);
-
- return image;
- }
-diff --git a/fb/fbtrap.c b/fb/fbtrap.c
-index 515e2e1..830603a 100644
---- a/fb/fbtrap.c
-+++ b/fb/fbtrap.c
-@@ -40,8 +40,7 @@ fbAddTraps (PicturePtr pPicture,
- int ntrap,
- xTrap *traps)
- {
-- int image_xoff, image_yoff;
-- pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
-+ pixman_image_t *image = image_from_pict (pPicture, FALSE);
-
- if (!image)
- return;
-@@ -57,8 +56,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
- int x_off,
- int y_off)
- {
-- int mask_xoff, mask_yoff;
-- pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
-+ pixman_image_t *image = image_from_pict (pPicture, FALSE);
-
- if (!image)
- return;
---
-1.6.2
-
Added: trunk/dports/x11/xorg-server-devel/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -0,0 +1,231 @@
+From 01ff8d468f836b760a3b39bc5fad8f0c9abced3a Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Fri, 12 Feb 2010 19:48:52 -0800
+Subject: [PATCH 5/6] fb: Revert fb changes that broke XQuartz
+
+http://bugs.freedesktop.org/show_bug.cgi?id=26124
+
+Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
+Revert "fb: Adjust transform or composite coordinates for pixman operations"
+
+http://bugs.freedesktop.org/26124
+
+This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
+This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ fb/fb.h | 7 +----
+ fb/fbpict.c | 72 ++++++++++++++++++-----------------------------------------
+ fb/fbtrap.c | 6 +---
+ 3 files changed, 26 insertions(+), 59 deletions(-)
+
+diff --git a/fb/fb.h b/fb/fb.h
+index 02d6c03..ed21f9e 100644
+--- a/fb/fb.h
++++ b/fb/fb.h
+@@ -2082,11 +2082,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
+ FbBits xor);
+
+ extern _X_EXPORT pixman_image_t *
+-image_from_pict (PicturePtr pict,
+- Bool has_clip,
+- int *xoff,
+- int *yoff);
+-
++image_from_pict (PicturePtr pict,
++ Bool has_clip);
+ extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
+
+ #endif /* _FB_H_ */
+diff --git a/fb/fbpict.c b/fb/fbpict.c
+index dddfce8..07a2286 100644
+--- a/fb/fbpict.c
++++ b/fb/fbpict.c
+@@ -158,24 +158,19 @@ fbComposite (CARD8 op,
+ CARD16 height)
+ {
+ pixman_image_t *src, *mask, *dest;
+- int src_xoff, src_yoff;
+- int msk_xoff, msk_yoff;
+- int dst_xoff, dst_yoff;
+
+ miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
+ if (pMask)
+ miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
+
+- src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
+- mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
+- dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
++ src = image_from_pict (pSrc, TRUE);
++ mask = image_from_pict (pMask, TRUE);
++ dest = image_from_pict (pDst, TRUE);
+
+ if (src && dest && !(pMask && !mask))
+ {
+ pixman_image_composite (op, src, mask, dest,
+- xSrc + src_xoff, ySrc + src_yoff,
+- xMask + msk_xoff, yMask + msk_yoff,
+- xDst + dst_xoff, yDst + dst_yoff,
++ xSrc, ySrc, xMask, yMask, xDst, yDst,
+ width, height);
+ }
+
+@@ -275,22 +270,22 @@ create_conical_gradient_image (PictGradient *gradient)
+
+ static pixman_image_t *
+ create_bits_picture (PicturePtr pict,
+- Bool has_clip,
+- int *xoff,
+- int *yoff)
++ Bool has_clip)
+ {
+- PixmapPtr pixmap;
+ FbBits *bits;
+ FbStride stride;
+- int bpp;
++ int bpp, xoff, yoff;
+ pixman_image_t *image;
+
+- fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
+- fbGetPixmapBitsData(pixmap, bits, stride, bpp);
++ fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
++
++ bits = (FbBits*)((CARD8*)bits +
++ (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
++ (pict->pDrawable->x + xoff) * (bpp / 8));
+
+ image = pixman_image_create_bits (
+ pict->format,
+- pixmap->drawable.width, pixmap->drawable.height,
++ pict->pDrawable->width, pict->pDrawable->height,
+ (uint32_t *)bits, stride * sizeof (FbStride));
+
+
+@@ -316,52 +311,30 @@ create_bits_picture (PicturePtr pict,
+ if (pict->clientClipType != CT_NONE)
+ pixman_image_set_has_client_clip (image, TRUE);
+
+- if (*xoff || *yoff)
+- pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
++ pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
+
+ pixman_image_set_clip_region (image, pict->pCompositeClip);
+
+- if (*xoff || *yoff)
+- pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
++ pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
+ }
+
+ /* Indexed table */
+ if (pict->pFormat->index.devPrivate)
+ pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
+
+- /* Add in drawable origin to position within the image */
+- *xoff += pict->pDrawable->x;
+- *yoff += pict->pDrawable->y;
+-
+ return image;
+ }
+
+ static void
+-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
++set_image_properties (pixman_image_t *image, PicturePtr pict)
+ {
+ pixman_repeat_t repeat;
+ pixman_filter_t filter;
+
+ if (pict->transform)
+ {
+- /* For source images, adjust the transform to account
+- * for the drawable offset within the pixman image,
+- * then set the offset to 0 as it will be used
+- * to compute positions within the transformed image.
+- */
+- if (!has_clip) {
+- struct pixman_transform adjusted;
+-
+- adjusted = *pict->transform;
+- pixman_transform_translate(&adjusted,
+- NULL,
+- pixman_int_to_fixed(*xoff),
+- pixman_int_to_fixed(*yoff));
+- pixman_image_set_transform (image, &adjusted);
+- *xoff = 0;
+- *yoff = 0;
+- } else
+- pixman_image_set_transform (image, pict->transform);
++ pixman_image_set_transform (
++ image, (pixman_transform_t *)pict->transform);
+ }
+
+ switch (pict->repeatType)
+@@ -388,8 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
+
+ if (pict->alphaMap)
+ {
+- int alpha_xoff, alpha_yoff;
+- pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
++ pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
+
+ pixman_image_set_alpha_map (
+ image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
+@@ -422,7 +394,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
+ }
+
+ pixman_image_t *
+-image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
++image_from_pict (PicturePtr pict,
++ Bool has_clip)
+ {
+ pixman_image_t *image = NULL;
+
+@@ -431,7 +404,7 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+
+ if (pict->pDrawable)
+ {
+- image = create_bits_picture (pict, has_clip, xoff, yoff);
++ image = create_bits_picture (pict, has_clip);
+ }
+ else if (pict->pSourcePict)
+ {
+@@ -452,11 +425,10 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+ else if (sp->type == SourcePictTypeConical)
+ image = create_conical_gradient_image (gradient);
+ }
+- *xoff = *yoff = 0;
+ }
+
+ if (image)
+- set_image_properties (image, pict, has_clip, xoff, yoff);
++ set_image_properties (image, pict);
+
+ return image;
+ }
+diff --git a/fb/fbtrap.c b/fb/fbtrap.c
+index 515e2e1..830603a 100644
+--- a/fb/fbtrap.c
++++ b/fb/fbtrap.c
+@@ -40,8 +40,7 @@ fbAddTraps (PicturePtr pPicture,
+ int ntrap,
+ xTrap *traps)
+ {
+- int image_xoff, image_yoff;
+- pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
++ pixman_image_t *image = image_from_pict (pPicture, FALSE);
+
+ if (!image)
+ return;
+@@ -57,8 +56,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
+ int x_off,
+ int y_off)
+ {
+- int mask_xoff, mask_yoff;
+- pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
++ pixman_image_t *image = image_from_pict (pPicture, FALSE);
+
+ if (!image)
+ return;
+--
+1.6.6.1
+
Added: trunk/dports/x11/xorg-server-devel/files/0006-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/0006-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch (rev 0)
+++ trunk/dports/x11/xorg-server-devel/files/0006-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch 2010-02-16 01:16:47 UTC (rev 63813)
@@ -0,0 +1,84 @@
+From 3369deaa34e73540bc3528e1ba3c32e93240c536 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Fri, 15 Jan 2010 11:39:36 +1000
+Subject: [PATCH 6/6] dix: if owner-events is true for passive grabs, add the window mask (#25400)
+
+A client requesting a GrabModeSync button grab, owner-events true, with only
+the ButtonRelease mask set would never receive the press event even if the
+grab window had the ButtonPress mask set.
+
+The protocol requires that if owner-events is true, then the delivery mask
+is the combination of the grab mask + the window event mask.
+
+X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400>
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+Tested-by: Jim Ramsay <i.am at jimramsay.com>
+---
+ dix/events.c | 36 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 36 insertions(+), 0 deletions(-)
+
+diff --git a/dix/events.c b/dix/events.c
+index 85c8f9a..b854d98 100644
+--- a/dix/events.c
++++ b/dix/events.c
+@@ -3580,6 +3580,8 @@ CheckPassiveGrabsOnWindow(
+ xE = &core;
+ count = 1;
+ mask = grab->eventMask;
++ if (grab->ownerEvents)
++ mask |= pWin->eventMask;
+ } else if (match & XI2_MATCH)
+ {
+ rc = EventToXI2((InternalEvent*)event, &xE);
+@@ -3601,6 +3603,24 @@ CheckPassiveGrabsOnWindow(
+ mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
+ else if (event->type == XI_Enter || event->type == XI_FocusIn)
+ mask = grab->xi2mask[device->id][event->type/8];
++
++ if (grab->ownerEvents && wOtherInputMasks(grab->window))
++ {
++ InputClientsPtr icp =
++ wOtherInputMasks(grab->window)->inputClients;
++
++ while(icp)
++ {
++ if (rClient(icp) == rClient(grab))
++ {
++ int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
++ mask |= icp->xi2mask[device->id][evtype/8];
++ break;
++ }
++
++ icp = icp->next;
++ }
++ }
+ } else
+ {
+ rc = EventToXI((InternalEvent*)event, &xE, &count);
+@@ -3612,6 +3632,22 @@ CheckPassiveGrabsOnWindow(
+ continue;
+ }
+ mask = grab->eventMask;
++ if (grab->ownerEvents && wOtherInputMasks(grab->window))
++ {
++ InputClientsPtr icp =
++ wOtherInputMasks(grab->window)->inputClients;
++
++ while(icp)
++ {
++ if (rClient(icp) == rClient(grab))
++ {
++ mask |= icp->mask[device->id];
++ break;
++ }
++
++ icp = icp->next;
++ }
++ }
+ }
+
+ (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
+--
+1.6.6.1
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100215/e1c2d3d5/attachment-0001.html>
More information about the macports-changes
mailing list