Changeset View
Changeset View
Standalone View
Standalone View
internal_client.cpp
Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Line(s) | 318 | { | |||
---|---|---|---|---|---|
331 | setFrameGeometry(QRect(x(), y(), w, h)); | 331 | setFrameGeometry(QRect(x(), y(), w, h)); | ||
332 | } | 332 | } | ||
333 | 333 | | |||
334 | void InternalClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force) | 334 | void InternalClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force) | ||
335 | { | 335 | { | ||
336 | const QRect rect(x, y, w, h); | 336 | const QRect rect(x, y, w, h); | ||
337 | 337 | | |||
338 | if (areGeometryUpdatesBlocked()) { | 338 | if (areGeometryUpdatesBlocked()) { | ||
339 | geom = rect; | 339 | m_frameGeometry = rect; | ||
340 | if (pendingGeometryUpdate() == PendingGeometryForced) { | 340 | if (pendingGeometryUpdate() == PendingGeometryForced) { | ||
341 | // Maximum, nothing needed. | 341 | // Maximum, nothing needed. | ||
342 | } else if (force == ForceGeometrySet) { | 342 | } else if (force == ForceGeometrySet) { | ||
343 | setPendingGeometryUpdate(PendingGeometryForced); | 343 | setPendingGeometryUpdate(PendingGeometryForced); | ||
344 | } else { | 344 | } else { | ||
345 | setPendingGeometryUpdate(PendingGeometryNormal); | 345 | setPendingGeometryUpdate(PendingGeometryNormal); | ||
346 | } | 346 | } | ||
347 | return; | 347 | return; | ||
348 | } | 348 | } | ||
349 | 349 | | |||
350 | if (pendingGeometryUpdate() != PendingGeometryNone) { | 350 | if (pendingGeometryUpdate() != PendingGeometryNone) { | ||
351 | // Reset geometry to the one before blocking, so that we can compare properly. | 351 | // Reset geometry to the one before blocking, so that we can compare properly. | ||
352 | geom = frameGeometryBeforeUpdateBlocking(); | 352 | m_frameGeometry = frameGeometryBeforeUpdateBlocking(); | ||
353 | } | 353 | } | ||
354 | 354 | | |||
355 | if (geom == rect) { | 355 | if (m_frameGeometry == rect) { | ||
356 | return; | 356 | return; | ||
357 | } | 357 | } | ||
358 | 358 | | |||
359 | const QRect newClientGeometry = mapToClient(rect); | 359 | const QRect newClientGeometry = mapToClient(rect); | ||
360 | 360 | | |||
361 | if (m_clientSize == newClientGeometry.size()) { | 361 | if (m_clientSize == newClientGeometry.size()) { | ||
362 | commitGeometry(rect); | 362 | commitGeometry(rect); | ||
363 | } else { | 363 | } else { | ||
▲ Show 20 Lines • Show All 253 Lines • ▼ Show 20 Line(s) | |||||
617 | { | 617 | { | ||
618 | if (m_internalWindow) { | 618 | if (m_internalWindow) { | ||
619 | m_internalWindow->setGeometry(mapToClient(rect)); | 619 | m_internalWindow->setGeometry(mapToClient(rect)); | ||
620 | } | 620 | } | ||
621 | } | 621 | } | ||
622 | 622 | | |||
623 | void InternalClient::commitGeometry(const QRect &rect) | 623 | void InternalClient::commitGeometry(const QRect &rect) | ||
624 | { | 624 | { | ||
625 | if (geom == rect && pendingGeometryUpdate() == PendingGeometryNone) { | 625 | if (m_frameGeometry == rect && pendingGeometryUpdate() == PendingGeometryNone) { | ||
626 | return; | 626 | return; | ||
627 | } | 627 | } | ||
628 | 628 | | |||
629 | geom = rect; | 629 | m_frameGeometry = rect; | ||
630 | 630 | | |||
631 | m_clientSize = mapToClient(frameGeometry()).size(); | 631 | m_clientSize = mapToClient(frameGeometry()).size(); | ||
632 | 632 | | |||
633 | addWorkspaceRepaint(visibleRect()); | 633 | addWorkspaceRepaint(visibleRect()); | ||
634 | syncGeometryToInternalWindow(); | 634 | syncGeometryToInternalWindow(); | ||
635 | 635 | | |||
636 | const QRect oldGeometry = frameGeometryBeforeUpdateBlocking(); | 636 | const QRect oldGeometry = frameGeometryBeforeUpdateBlocking(); | ||
637 | updateGeometryBeforeUpdateBlocking(); | 637 | updateGeometryBeforeUpdateBlocking(); | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |