From d1315ade4171b25039a60b01d8fd8f39d822cc10 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 20 Sep 2015 12:25:01 +0200 Subject: libdraw, screenrc: bind devdraw and devmouse in screenrc instead of handling it in libdraw libdraw was attempting to bind '#i' and '#m' to /dev when it could not find /dev/mouse or /dev/draw. a library shouldnt be that clever and do namespace manipulations on behalf of the caller. so instead, we setup the graphics environment in screenrc on boot time. --- rc/bin/screenrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'rc') diff --git a/rc/bin/screenrc b/rc/bin/screenrc index 5aaebca68..5a432c9d0 100755 --- a/rc/bin/screenrc +++ b/rc/bin/screenrc @@ -35,7 +35,13 @@ if(test -f /dev/vgactl){ } } -if(test -f /dev/mousectl && test -f '#i/winname'){ +if(! test -d /dev/draw) + bind -a '#i' /dev + +if(! test -f /dev/mouse) + bind -a '#m' /dev + +if(test -f /dev/mousectl && test -f /dev/winname){ ask mouseport ' is (ps2, ps2intellimouse, 0, 1, 2)' ps2 switch($mouseport){ case ps2 ps2intellimouse 0 1 2 -- cgit v1.2.3