Commits

Ivan Vučica committed 0866d79

Fixed a crash on NVidia 9400m. Added requirements. Added ability to test with a real server.

  • Participants
  • Parent commits 635cacd

Comments (0)

Files changed (4)

FPManagedWindow.m

 {
 	FPX11Display * mainDisplay = [FPX11Display mainDisplay];
 	Display * display = [mainDisplay display];
-	XWindowAttributes attr;
+	XWindowAttributes attr = { 0 };
 	XGetWindowAttributes (display, _window, &attr);
 	_width = attr.width;
 	_height = attr.height;
 	_z = 0;
 	_isMapped = (attr.map_state == IsViewable);
 	_hasOutput = (attr.class == InputOutput);
-	_hasAlpha = (attr.depth > 3 * attr.visual->bits_per_rgb);
+NSLog(@"%p", attr.visual);
+	_hasAlpha = attr.visual ? (attr.depth > 3 * attr.visual->bits_per_rgb) : NO;
 	_overrideRedirect = attr.override_redirect;
 	_opacity = 1.0; // FIXME: is this right?
 }
 
 Licensed under GNU Lesser General Public License v2.1. For details, review
 file named COPYING.
+
+Requirements
+------------
+- libxcomposite-dev
+- libxdamage-dev
 #!/bin/sh
 
-display=':3'
+if [ -z $SERVER ] ; then
+  SERVER=Xephyr
+fi
+if [ -z $ARGS ] ; then
+  ARGS="-host-cursor -nodri -wr"
+fi
+
+if [ -z $display ] ; then
+  display=':3'
+fi
 
 MCOOKIE=$(mcookie)
 xauth add $(hostname)/unix$display . $MCOOKIE
 xauth add localhost/unix$display . $MCOOKIE
-xinit "$@" -- /usr/bin/Xephyr $display -host-cursor -nodri -wr
+xinit "$@" -- /usr/bin/$SERVER $display $ARGS
 # startx -- `which Xnest` $display
 xauth remove $(hostname)/unix$display localhost/unix$display
 

test-with-real-X.sh

+#!/bin/bash
+SERVER=X ARGS="vt8" sudo -E ./test.sh