+ /* same strategy as with move: we first check if
+ the size changed at all, and if it did, we
+ invalidate both the old and new area.
+ TODO: check if either the old or new area
+ fits into the other completely, and invalidate
+ only once. */
+ eSize old_size = m_size;
+ eSize old_offset = m_client_offset;
+ m_client_offset = eSize(0, 0);
+ event(evtWillChangeSize, &size, &m_client_offset);
+ if (old_size == m_size)
+ return;
+
+ move(position() - old_offset);
+
+ invalidate();