xserver: Branch 'master' - 3 commits

Keith Packard keithp at kemper.freedesktop.org
Sat Jan 30 23:54:46 PST 2010


 hw/xquartz/bundle/.gitignore  |    1 +
 hw/xquartz/darwin.c           |   41 +----------------------------------------
 hw/xquartz/darwin.h           |    2 --
 hw/xquartz/pbproxy/.gitignore |    1 +
 hw/xquartz/xpr/xprScreen.c    |   13 +++++++++++++
 5 files changed, 16 insertions(+), 42 deletions(-)

New commits:
commit 52456c602c3cdd7d5eac677889a18fad37dfb7ae
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat Jan 30 14:49:02 2010 -0800

    XQuartz: Attatch a stub display when CoreGraphics reports no displays.
    
    This is half of the required changes to address the "stuck mouse pointer"
    bug that occurs when X11 launches while the displays are asleep.  The
    remainder of the fix is part of libXplugin which needs to be updated to
    send XP_EVENT_DISPLAY_CHANGED when the display wakes up.  If you don't
    have a recent enough libXplugin (expected in 2.5.0_beta2 or later), you
    can cause this event to be sent by changing your display resolution (or
    you could just start X11.app with your screens awake).
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 22a727e..735b2ba 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -184,7 +184,20 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
 
     // Find all the CoreGraphics displays
     CGGetActiveDisplayList(0, NULL, &displayCount);
+    DEBUG_LOG("displayCount: %d\n", (int)displayCount);
+
+    if(!displayCount) {
+        ErrorF("CoreGraphics has reported no connected displays.  Creating a stub 800x600 display.\n");
+        *x = *y = 0;
+        *width = 800;
+        *height = 600;
+        PseudoramiXAddScreen(*x, *y, *width, *height);
+        return;
+    }
+
     displayList = xalloc(displayCount * sizeof(CGDirectDisplayID));
+    if(!displayList)
+        FatalError("Unable to allocate memory for list of displays.\n");
     CGGetActiveDisplayList(displayCount, displayList, &displayCount);
 
     /* Get the union of all screens */
commit 15f4bb6dc64313ff100aa5444a94c60922a498df
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Wed Jan 27 17:12:12 2010 -0800

    XQuartz: Dead code removal
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 30b8905..3feacdc 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -96,9 +96,7 @@ int                     darwinMainScreenX = 0;
 int                     darwinMainScreenY = 0;
 
 // parameters read from the command line or user preferences
-unsigned int            darwinDesiredWidth = 0, darwinDesiredHeight = 0;
 int                     darwinDesiredDepth = -1;
-int                     darwinDesiredRefresh = -1;
 int                     darwinSyncKeymap = FALSE;
 
 // modifier masks for faking mouse buttons - ANY of these bits trigger it  (not all)
@@ -703,28 +701,10 @@ int ddxProcessArgument( int argc, char *argv[], int i )
         return 1;
     }
 
-    if ( !strcmp( argv[i], "-size" ) ) {
-        if ( i >= argc-2 ) {
-            FatalError( "-size must be followed by two numbers\n" );
-        }
-#ifdef OLD_POWERBOOK_G3
-        ErrorF( "Ignoring unsupported -size option on old PowerBook G3\n" );
-#else
-        darwinDesiredWidth = atoi( argv[i+1] );
-        darwinDesiredHeight = atoi( argv[i+2] );
-        ErrorF( "Attempting to use width x height = %i x %i\n",
-                darwinDesiredWidth, darwinDesiredHeight );
-#endif
-        return 3;
-    }
-
     if ( !strcmp( argv[i], "-depth" ) ) {
         if ( i == argc-1 ) {
             FatalError( "-depth must be followed by a number\n" );
         }
-#ifdef OLD_POWERBOOK_G3
-        ErrorF( "Ignoring unsupported -depth option on old PowerBook G3\n");
-#else
         darwinDesiredDepth = atoi( argv[i+1] );
         if(darwinDesiredDepth != -1 &&
            darwinDesiredDepth != 8 &&
@@ -734,20 +714,6 @@ int ddxProcessArgument( int argc, char *argv[], int i )
         }
 
         ErrorF( "Attempting to use pixel depth of %i\n", darwinDesiredDepth );
-#endif
-        return 2;
-    }
-
-    if ( !strcmp( argv[i], "-refresh" ) ) {
-        if ( i == argc-1 ) {
-            FatalError( "-refresh must be followed by a number\n" );
-        }
-#ifdef OLD_POWERBOOK_G3
-        ErrorF( "Ignoring unsupported -refresh option on old PowerBook G3\n");
-#else
-        darwinDesiredRefresh = atoi( argv[i+1] );
-        ErrorF( "Attempting to use refresh rate of %i\n", darwinDesiredRefresh );
-#endif
         return 2;
     }
 
@@ -771,6 +737,7 @@ void ddxUseMsg( void )
     ErrorF("\n");
     ErrorF("Device Dependent Usage:\n");
     ErrorF("\n");
+    ErrorF("-depth <8,15,24> : use this bit depth.\n");
     ErrorF("-fakebuttons : fake a three button mouse with Command and Option keys.\n");
     ErrorF("-nofakebuttons : don't fake a three button mouse.\n");
     ErrorF("-fakemouse2 <modifiers> : fake middle mouse button with modifier keys.\n");
@@ -778,12 +745,6 @@ void ddxUseMsg( void )
     ErrorF("  ex: -fakemouse2 \"option,shift\" = option-shift-click is middle button.\n");
     ErrorF("-version : show the server version.\n");
     ErrorF("\n");
-    ErrorF("\n");
-    ErrorF("Options ignored in rootless mode:\n");
-    ErrorF("-size <height> <width> : use a screen resolution of <height> x <width>.\n");
-    ErrorF("-depth <8,15,24> : use this bit depth.\n");
-    ErrorF("-refresh <rate> : use a monitor refresh rate of <rate> Hz.\n");
-    ErrorF("\n");
 }
 
 
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 586044f..8fa48bf 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -70,9 +70,7 @@ extern int              darwinFakeMouse3Mask;
 extern unsigned int     darwinAppKitModMask;
 extern unsigned int     windowItemModMask;
 extern int              darwinSyncKeymap;
-extern unsigned int     darwinDesiredWidth, darwinDesiredHeight;
 extern int              darwinDesiredDepth;
-extern int              darwinDesiredRefresh;
 
 // location of X11's (0,0) point in global screen coordinates
 extern int              darwinMainScreenX;
commit 7ba5de6e9e1e8efda9f79af601fb6269bae841ce
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sat Jan 30 10:55:38 2010 -0800

    XQuartz: Add some .gitignore magic
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>

diff --git a/hw/xquartz/bundle/.gitignore b/hw/xquartz/bundle/.gitignore
new file mode 100644
index 0000000..4e432c2
--- /dev/null
+++ b/hw/xquartz/bundle/.gitignore
@@ -0,0 +1 @@
+Info.plist
diff --git a/hw/xquartz/pbproxy/.gitignore b/hw/xquartz/pbproxy/.gitignore
new file mode 100644
index 0000000..6684920
--- /dev/null
+++ b/hw/xquartz/pbproxy/.gitignore
@@ -0,0 +1 @@
+xpbproxy


More information about the xorg-commit mailing list