Commit Diff


commit - d296c18e379547218c4c50445c56e725ec3be91d
commit + 9e0d3750c543de49ccc43512cb3fbaa1f42f1648
blob - 2bc9b4be73ca91fe161ee7c21cda5d31142bf953
blob + 3a012959f6edd579c69f0ddb4ffd3a4c7ebd6f3a
--- include/draw.h
+++ include/draw.h
@@ -524,6 +524,8 @@ extern	int	_cursorfd;
 extern	int	_drawdebug;	/* set to 1 to see errors from flushimage */
 extern	void	_setdrawop(Display*, Drawop);
 extern	Display	*_initdisplay(void(*)(Display*,char*), char*);
+
+extern	void	needdisplay(void); /* call instead of initdraw to get (null) variable linked in */
 
 #define	BGSHORT(p)		(((p)[0]<<0) | ((p)[1]<<8))
 #define	BGLONG(p)		((BGSHORT(p)<<0) | (BGSHORT(p+2)<<16))
blob - fe0367f084a2be228517b6bdb49fc81f2eb9965b
blob + 31281325a02b527bd542bb7161f0da85fc57dd87
--- src/cmd/9term/bsdpty.c
+++ src/cmd/9term/bsdpty.c
@@ -77,10 +77,10 @@ updatewinsize(int row, int col, int dx, int dy)
 	ws.ws_col = col;
 	ws.ws_xpixel = dx;
 
-
+	needdisplay(); // in case this is 'win' and not 9term
 	// Leave "is this a hidpi display" in the low bit of the ypixel height for mc.
 	dy &= ~1;
-	if(display->dpi >= DefaultDPI*3/2)
+	if(display != nil && display->dpi >= DefaultDPI*3/2)
 		dy |= 1;
 	ws.ws_ypixel = dy;
 
blob - 452b6da76e00dde5bde44d4aaf50dc7169ff1f44
blob + e5a367f31cdfc54d960a6329ff6ec7aadf21b28f
--- src/libdraw/init.c
+++ src/libdraw/init.c
@@ -19,6 +19,11 @@ Image	*mousebuttons;
 Image	*mousesave;
 Mouse	_drawmouse;
 
+void
+needdisplay(void)
+{
+}
+
 /*
 static void
 drawshutdown(void)