summaryrefslogtreecommitdiff
path: root/alf/alflayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alflayout.cpp')
-rw-r--r--alf/alflayout.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp
index ba2854b..38e69a2 100644
--- a/alf/alflayout.cpp
+++ b/alf/alflayout.cpp
@@ -104,6 +104,7 @@ ALF_Layout_ForwardFontToControl(ALFLayout *layout, HWND window, ALFControlPriv *
switch (control->flags & ALF_LAYOUT_SIZETYPE_MASK) {
case ALF_LAYOUT_SIZE_EDIT:
case ALF_LAYOUT_SIZE_CHECKBOX:
+ case ALF_LAYOUT_SIZE_PUSHBUTTON:
ALF_Layout_Invalidate(layout, window);
break;
default:
@@ -627,12 +628,12 @@ ALF_Layout_Apply(ALFLayout* layout, HWND window)
if (!ALF_Compat_Is40())
flags |= SWP_NOCOPYBITS;
+ RECT oldR;
+ GetWindowRect(c->hwnd, &oldR);
+ MapWindowRect(NULL, window, &oldR);
+
// transparent background: invalidate if control moved
if (layout->bgcolor == ALF_COLOR_TRANSPARENT) {
- RECT oldR;
- GetWindowRect(c->hwnd, &oldR);
- MapWindowRect(NULL, window, &oldR);
-
if (oldR.left != r.left || oldR.top != r.top) {
if (c->flags & ALF_LAYOUT_SENDBGCHANGE) {
ALF_InvalidateBackground(c->hwnd);
@@ -643,10 +644,12 @@ ALF_Layout_Apply(ALFLayout* layout, HWND window)
}
}
- hdwp = DeferWindowPos(hdwp,
- c->hwnd, 0,
- r.left, r.top, r.right - r.left, r.bottom - r.top,
- flags);
+ if (!EqualRect(&r, &oldR)) {
+ hdwp = DeferWindowPos(hdwp,
+ c->hwnd, 0,
+ r.left, r.top, r.right - r.left, r.bottom - r.top,
+ flags);
+ }
}
}