mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
9term, win: work around bsd linker nonsense
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
This commit is contained in:
parent
d296c18e37
commit
9e0d3750c5
3 changed files with 9 additions and 2 deletions
|
@ -525,6 +525,8 @@ extern int _drawdebug; /* set to 1 to see errors from flushimage */
|
||||||
extern void _setdrawop(Display*, Drawop);
|
extern void _setdrawop(Display*, Drawop);
|
||||||
extern Display *_initdisplay(void(*)(Display*,char*), char*);
|
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 BGSHORT(p) (((p)[0]<<0) | ((p)[1]<<8))
|
||||||
#define BGLONG(p) ((BGSHORT(p)<<0) | (BGSHORT(p+2)<<16))
|
#define BGLONG(p) ((BGSHORT(p)<<0) | (BGSHORT(p+2)<<16))
|
||||||
#define BPSHORT(p, v) ((p)[0]=(v), (p)[1]=((v)>>8))
|
#define BPSHORT(p, v) ((p)[0]=(v), (p)[1]=((v)>>8))
|
||||||
|
|
|
@ -77,10 +77,10 @@ updatewinsize(int row, int col, int dx, int dy)
|
||||||
ws.ws_col = col;
|
ws.ws_col = col;
|
||||||
ws.ws_xpixel = dx;
|
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.
|
// Leave "is this a hidpi display" in the low bit of the ypixel height for mc.
|
||||||
dy &= ~1;
|
dy &= ~1;
|
||||||
if(display->dpi >= DefaultDPI*3/2)
|
if(display != nil && display->dpi >= DefaultDPI*3/2)
|
||||||
dy |= 1;
|
dy |= 1;
|
||||||
ws.ws_ypixel = dy;
|
ws.ws_ypixel = dy;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,11 @@ Image *mousebuttons;
|
||||||
Image *mousesave;
|
Image *mousesave;
|
||||||
Mouse _drawmouse;
|
Mouse _drawmouse;
|
||||||
|
|
||||||
|
void
|
||||||
|
needdisplay(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static void
|
static void
|
||||||
drawshutdown(void)
|
drawshutdown(void)
|
||||||
|
|
Loading…
Reference in a new issue