summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-16 12:38:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:30 +0100
commit00876d07c8d8a95e547bc2f4dcd176e6b8c8e3af (patch)
treeb39c5f211e2003c80dfae5e8c0f9006aea58dbef
parentba28def295100fe7f2e2ff2bb542639ea20851cc (diff)
skip queue_resize on irrelevant state changes
-rw-r--r--vcl/source/window/window.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bb1562cfe849..f651041e1f5c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4921,10 +4921,27 @@ void Window::UserEvent( sal_uLong, void* )
// -----------------------------------------------------------------------
-void Window::StateChanged( StateChangedType )
+void Window::StateChanged( StateChangedType eType )
{
- queue_resize();
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
+ switch (eType)
+ {
+ //stuff that doesn't invalidate the layout
+ case STATE_CHANGE_CONTROLFOREGROUND:
+ case STATE_CHANGE_CONTROLBACKGROUND:
+ case STATE_CHANGE_TRANSPARENT:
+ case STATE_CHANGE_UPDATEMODE:
+ case STATE_CHANGE_READONLY:
+ case STATE_CHANGE_ENABLE:
+ case STATE_CHANGE_STATE:
+ case STATE_CHANGE_DATA:
+ break;
+ //stuff that does invalidate the layout
+ default:
+ fprintf(stderr, "queue_resize due to %d\n", eType);
+ queue_resize();
+ break;
+ }
}
// -----------------------------------------------------------------------