[Xquartz-changes] xserver: Branch 'master' - 5 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Mar 16 11:31:05 PDT 2010


 hw/xfree86/modes/xf86Cursors.c      |    4 ++--
 hw/xfree86/ramdac/xf86Cursor.c      |    6 ++++++
 hw/xquartz/GL/Makefile.am           |    2 +-
 hw/xquartz/Makefile.am              |    4 ++--
 hw/xquartz/mach-startup/Makefile.am |    2 +-
 hw/xquartz/quartzKeyboard.c         |    8 +-------
 hw/xquartz/xpr/Makefile.am          |    2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit a945525ea475bfb6f6c104c00e49741cc79b64d2
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Mar 16 11:29:08 2010 -0700

    Revert "XQuartz: Explicitly pass a bellProc to make XBell() work again."
    
    I'm not quite sure why this was necessary, but DDXRingBell is being called
    from CoreKeyboardBell, so we don't need a separate bellProc which would
    result in multiple rings.
    
    This reverts commit 9071b0d69748cfa7ecca17b4cb0e431bbb0ef2a4.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 7e36a9a..c9ef7cc 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -184,12 +184,6 @@ static void DarwinChangeKeyboardControl(DeviceIntPtr device, KeybdCtrl *ctrl) {
     // keyclick, bell volume / pitch, autorepead, LED's
 }
 
-static void DarwinKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) {
-    KeybdCtrl *ctrl = arg;
-
-    DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration);
-}
-
 //-----------------------------------------------------------------------------
 // Utility functions to help parse Darwin keymap
 //-----------------------------------------------------------------------------
@@ -301,7 +295,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
     // for a kIOHIDParamConnectType connection.
     assert(darwinParamConnect = NXOpenEventStatus());
 
-    InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
+    InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl);
 
     DarwinKeyboardReloadHandler();
 
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 \


More information about the Xquartz-changes mailing list