~dandrader/unity8/removeApplicationStage

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/Application/MirSurface.cpp

  • Committer: Bileto Bot
  • Date: 2016-07-14 07:09:00 UTC
  • mfrom: (2525.1.5 mirSurfaceInputBounds)
  • Revision ID: ci-train-bot@canonical.com-20160714070900-8wpqiln9hnk2q05i
Make use of MirSurface::inputBounds and drop UbuntuKeyboardInfo hack

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
    m_zombieTimer.setInterval(100);
88
88
    m_zombieTimer.setSingleShot(true);
89
89
    connect(&m_zombieTimer, &QTimer::timeout, this, [this](){ this->setLive(false); });
 
90
 
 
91
    updateInputBoundsAfterResize();
90
92
}
91
93
 
92
94
MirSurface::~MirSurface()
326
328
    if (changed) {
327
329
        Q_EMIT sizeChanged(QSize(width, height));
328
330
    }
 
331
 
 
332
    updateInputBoundsAfterResize();
 
333
}
 
334
 
 
335
void MirSurface::updateInputBoundsAfterResize()
 
336
{
 
337
    setInputBounds(QRect(0, 0, m_width, m_height));
329
338
}
330
339
 
331
340
bool MirSurface::isSlowToResize() const
439
448
    return controller ? controller->focusedSurface() == this : false;
440
449
}
441
450
 
 
451
QRect MirSurface::inputBounds() const
 
452
{
 
453
    return m_inputBounds;
 
454
}
 
455
 
 
456
void MirSurface::setInputBounds(const QRect &boundsRect)
 
457
{
 
458
    if (boundsRect != m_inputBounds) {
 
459
        m_inputBounds = boundsRect;
 
460
        Q_EMIT inputBoundsChanged(m_inputBounds);
 
461
    }
 
462
}
442
463
#if MIRSURFACE_DEBUG
443
464
#undef DEBUG_MSG
444
465
#define DEBUG_MSG(params) qDebug().nospace() << "MirFocusController::" << __func__  << " " << params