Native window decorations: when window is initially shown, fill background with window background color (instead of white), which avoids flickering in dark themes (issue #339)

This commit is contained in:
Karl Tauber
2021-07-31 21:02:42 +02:00
parent 4ab90065dc
commit 7f02eb9cf0
4 changed files with 73 additions and 15 deletions

View File

@@ -42,6 +42,7 @@ private:
HWND hwnd;
WNDPROC defaultWndProc;
int wmSizeWParam;
HBRUSH background;
FlatWndProc();
static void initIDs( JNIEnv *env, jobject obj );
@@ -49,6 +50,7 @@ private:
static LRESULT CALLBACK StaticWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WmDestroy( HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WmEraseBkgnd( HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WmNcCalcSize( HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WmNcHitTest( HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam );