xserver: Branch 'master' - 7 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon Mar 15 08:51:07 PDT 2010
hw/xfree86/modes/xf86Cursors.c | 4 ++--
hw/xfree86/ramdac/xf86Cursor.c | 6 ++++++
hw/xquartz/GL/Makefile.am | 2 +-
hw/xquartz/GL/capabilities.c | 4 ++++
hw/xquartz/GL/indirect.c | 2 +-
hw/xquartz/Makefile.am | 4 ++--
hw/xquartz/darwin.c | 6 ++++++
hw/xquartz/mach-startup/Makefile.am | 2 +-
hw/xquartz/quartzKeyboard.c | 16 +++++-----------
hw/xquartz/xpr/Makefile.am | 2 +-
10 files changed, 29 insertions(+), 19 deletions(-)
New commits:
commit 67a8c659f25218904bae64aac6e98e326c90330b
Author: Roland Scheidegger <sroland at vmware.com>
Date: Fri Mar 12 16:53:30 2010 +0100
hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions
The problem is that the xf86_use_hw_cursor(_argb) functions may get this
correctly now, some drivers will replace these generic versions with their
own functions. It is pretty insane to expect them to do reference counting
of the cursor (as an example, look at driver/xf86-video-vmware to see how
that looks like as a workaround). There are even places in xserver itself
which replace these two functions.
The segfaults if no reference counting is done are caused because the
reference count of the cursor reached zero, hence the cursor was freed,
however xf86CursorEnableDisableFBAccess() brought it back to life from
the dead (from the SavedCursor).
This patch hence adds reference counting in xf86CursorSetCursor. As per Michel
Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen.
In theory with this it should be possible to remove the reference
counting in the UseHwCursor functions I think, though it should also be
safe to keep them.
Signed-off-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Michel Dänzer <michel at daenzer.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index 6b71f46..7f23d9e 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -129,6 +129,9 @@ xf86CursorCloseScreen(int i, ScreenPtr pScreen)
if (ScreenPriv->isUp && pScrn->vtSema)
xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
+
pScreen->CloseScreen = ScreenPriv->CloseScreen;
pScreen->QueryBestSize = ScreenPriv->QueryBestSize;
pScreen->RecolorCursor = ScreenPriv->RecolorCursor;
@@ -317,6 +320,9 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
if (pDev == inputInfo.pointer ||
(!IsMaster(pDev) && pDev->u.master == inputInfo.pointer))
{
+ pCurs->refcnt++;
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
ScreenPriv->CurrentCursor = pCurs;
ScreenPriv->x = x;
ScreenPriv->y = y;
commit 75efb46a14fe45ffe73faff637b1fa6d017e1e52
Author: Roland Scheidegger <sroland at vmware.com>
Date: Fri Mar 12 16:52:56 2010 +0100
hw/xfree86: fix refcounting in xf86_use_hw_cursor
This is the same fix as was done in
fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 for xf86_use_hw_cursor_argb.
Signed-off-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Michel Dänzer <michel at daenzer.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 385848b..e2e174e 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -461,11 +461,11 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ ++cursor->refcnt;
if (xf86_config->cursor)
FreeCursor (xf86_config->cursor, None);
xf86_config->cursor = cursor;
- ++cursor->refcnt;
-
+
if (cursor->bits->width > cursor_info->MaxWidth ||
cursor->bits->height> cursor_info->MaxHeight)
return FALSE;
commit df9b6f16b27398545cd4cff8a56dd59a3813351d
Merge: 5f169f5... 5172253...
Author: Keith Packard <keithp at keithp.com>
Date: Mon Mar 15 08:26:58 2010 -0700
Merge remote branch 'jeremyhu/master'
commit 5f169f54936c9868ad0f3778cb95c1f35eef41ea
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Fri Mar 5 10:35:54 2010 -0500
XQuartz: remove undefined XSERVER_CFLAGS variable
This is a variable local to configure.ac which is not AC_SUBST()
It is undefined in any generated Makefile.
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xquartz/GL/Makefile.am b/hw/xquartz/GL/Makefile.am
index 9b61305..af89077 100644
--- a/hw/xquartz/GL/Makefile.am
+++ b/hw/xquartz/GL/Makefile.am
@@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libCGLCore.la
-AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(DIX_CFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/glx \
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 65c70b0..96b139f 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libXquartz.la
-AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
-AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(DIX_CFLAGS)
+AM_OBJCFLAGS = $(DIX_CFLAGS)
AM_CPPFLAGS = \
-DBUILD_DATE=\"$(BUILD_DATE)\" \
-DXSERVER_VERSION=\"$(VERSION)\" \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 334f06d..4dff45a 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -3,7 +3,7 @@ AM_CPPFLAGS = \
-DXSERVER_VERSION=\"$(VERSION)\" \
-DX11BINDIR=\"$(bindir)\"
-AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(DIX_CFLAGS)
x11appdir = $(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/MacOS
x11app_PROGRAMS = X11.bin
diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
index ba7b258..763a7cd 100644
--- a/hw/xquartz/xpr/Makefile.am
+++ b/hw/xquartz/xpr/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libXquartzXpr.la
-AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(DIX_CFLAGS)
AM_CPPFLAGS = \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/miext \
commit 5172253bae3b9867118c6717434e73c173acd5e9
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Feb 10 15:52:14 2010 -0800
XQuartz: Use an empty xkb keymap by default
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
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;
}
}
commit b117bc7a441bec8f61610fb384d747112f73d236
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Thu Mar 11 00:06:01 2010 -0800
XQuartz: Include os.h for OsAbort()
Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index 5f1f870..2c5ec65 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -31,6 +31,10 @@
#include "capabilities.h"
+#define Cursor X_Cursor
+#include "os.h"
+#undef Cursor
+
static void handleBufferModes(struct glCapabilitiesConfig *c, GLint bufferModes) {
if(bufferModes & kCGLStereoscopicBit) {
c->stereo = true;
commit b7a16117c6d87a9d33a5f682b592b4507f2c065e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Thu Mar 11 00:03:08 2010 -0800
XQuartz: GLX: Fix prototype for swapBuffers
This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 44380ff..c092c1d 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -471,7 +471,7 @@ static int __glXAquaContextForceCurrent(__GLXcontext *baseContext)
}
/* Drawing surface notification callbacks */
-static GLboolean __glXAquaDrawableSwapBuffers(__GLXdrawable *base) {
+static GLboolean __glXAquaDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base) {
CGLError err;
__GLXAquaDrawable *drawable;
More information about the xorg-commit
mailing list