Skip to content

Commit

Permalink
fix redraw.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Jul 5, 2021
1 parent 08087dc commit 785b719
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ void screen_setup(void)
{
Point size = subpt(screen->r.max, screen->r.min);
Rectangle frame = (Rectangle){Pt(0,0),size};

if (view != nil)
freeimage(view);

view = allocimage(display,frame,screen->chan,1,backgroundColor);
}
Expand All @@ -61,7 +58,7 @@ void eresized(int new)
{
if (new && getwindow(display, Refnone) < 0)
sysfatal("can't reattach to window");
screen_setup();
screen_update_view();
}

/**
Expand All @@ -84,10 +81,12 @@ void screen_init(void)
if (fd >= 0)
{
fprint(fd,"resize -dx 520 -dy 520"); // gives 512x512 client area.
flushimage(display,1);
close(fd);
}

eresized(0);
screen_setup();
ShowPLATO(splash,sizeof(splash));
screen_update_view();
}
Expand Down

0 comments on commit 785b719

Please sign in to comment.