summaryrefslogtreecommitdiff
path: root/widgetfactory.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-11 14:37:45 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-11 14:37:45 +0200
commitf722fb1155cb3d198c450a68d7db82a0bf6318bf (patch)
treebac789489aaa5d81715d1ee916b030252a1c89e7 /widgetfactory.cpp
parentc73dbbf12b090cb05819df2615594c91dbf1dc16 (diff)
concerted effort to reduce unneccessary redraws on transparent backgrounds
Diffstat (limited to 'widgetfactory.cpp')
-rw-r--r--widgetfactory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/widgetfactory.cpp b/widgetfactory.cpp
index 25d0ce1..67d5c5c 100644
--- a/widgetfactory.cpp
+++ b/widgetfactory.cpp
@@ -178,7 +178,12 @@ commonPanelMessage(void *closure, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
}
if (msg == WM_SIZE && priv->bgmode == BG_GRADIENT) {
+ // HACK doing the invalidation before the layout leads to unnecessary
+ // redraws. I have no idea why, but switching the order of the calls
+ // makes the problem mostly go away.
+ LRESULT rv = ALF_Panel_DefWindowProc(hwnd, msg, wparam, lparam);
ALF_InvalidateBackground(hwnd);
+ return rv;
}
return ALF_Panel_DefWindowProc(hwnd, msg, wparam, lparam);