From e60569da86f211e776c6504f5c055313423cbfc3 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Fri, 29 Oct 2021 02:33:07 +0800 Subject: [PATCH] codes changes, tries to locate problems of #4 --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index cc811dc..d582cd6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -225,7 +225,7 @@ static void initSokol() { pass_action = sg_pass_action{ .colors = { - {.action = SG_ACTION_CLEAR, .value = {0, 0, 0, .5}} + {.action = SG_ACTION_CLEAR, .value = {0, 0, 0, 1}} }, }; @@ -376,6 +376,8 @@ static void init() { SetWindowLong(hwnd, GWL_STYLE, style); SetWindowLong(hwnd, GWL_EXSTYLE, exStyle); SetLayeredWindowAttributes(hwnd, 0, cfg->alpha, LWA_COLORKEY | LWA_ALPHA); + SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, (LONG)CreateSolidBrush(0)); + InvalidateRect(hwnd, nullptr, TRUE); static tray_menu menu[] = { {.text = (char*)"Quit", .cb = quit_cb},