Skip to content

Commit

Permalink
lstopo/windows: draw the white background when we really start drawing
Browse files Browse the repository at this point in the history
It worked when done earlier (during PREPARE),
but it would break if we resize the window in between (upcoming changes).

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
(cherry picked from commit 742be69)
  • Loading branch information
bgoglin committed Oct 28, 2019
1 parent 3c5e1aa commit 7392faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/lstopo/lstopo-windows.c
Expand Up @@ -156,12 +156,12 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
font = CreateFont(loutput->fontsize, 0, 0, 0, 0, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, NULL);
SelectObject(the_output.ps.hdc, (HGDIOBJ) font);
SetBkMode(the_output.ps.hdc, TRANSPARENT);
windows_box(loutput, &white, 0, 0, win_width, 0, win_height, NULL, 0);
loutput->drawing = LSTOPO_DRAWING_PREPARE;
output_draw(loutput);
the_width = loutput->width;
the_height = loutput->height;
loutput->drawing = LSTOPO_DRAWING_DRAW;
windows_box(loutput, &white, 0, 0, win_width, 0, win_height, NULL, 0);
output_draw(loutput);
DeleteObject(font);
EndPaint(hwnd, &the_output.ps);
Expand Down

0 comments on commit 7392faa

Please sign in to comment.