Merge remote-tracking branch 'qt/5.6' into 5.7
Change-Id: I6784a53fcc2f0f68b8e916181cb8cdef263782b8
This commit is contained in:
commit
b47f89bb39
@ -409,13 +409,16 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic
|
||||
{
|
||||
QWaylandWindow *keyboardFocus = inputDevice->keyboardFocus();
|
||||
|
||||
if (!keyboardFocus->shellSurface()->shellManagesActiveState() && mLastKeyboardFocus != keyboardFocus) {
|
||||
if (keyboardFocus)
|
||||
if (mLastKeyboardFocus == keyboardFocus)
|
||||
return;
|
||||
|
||||
if (keyboardFocus && !keyboardFocus->shellManagesActiveState())
|
||||
handleWindowActivated(keyboardFocus);
|
||||
if (mLastKeyboardFocus)
|
||||
|
||||
if (mLastKeyboardFocus && !mLastKeyboardFocus->shellManagesActiveState())
|
||||
handleWindowDeactivated(mLastKeyboardFocus);
|
||||
}
|
||||
mLastKeyboardFocus = inputDevice->keyboardFocus();
|
||||
|
||||
mLastKeyboardFocus = keyboardFocus;
|
||||
}
|
||||
|
||||
void QWaylandDisplay::handleWaylandSync()
|
||||
|
@ -527,6 +527,11 @@ QWaylandSubSurface *QWaylandWindow::subSurfaceWindow() const
|
||||
return mSubSurfaceWindow;
|
||||
}
|
||||
|
||||
bool QWaylandWindow::shellManagesActiveState() const
|
||||
{
|
||||
return mShellSurface && mShellSurface->shellManagesActiveState();
|
||||
}
|
||||
|
||||
void QWaylandWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation)
|
||||
{
|
||||
if (mDisplay->compositorVersion() < 2)
|
||||
|
@ -142,6 +142,8 @@ public:
|
||||
QWaylandSubSurface *subSurfaceWindow() const;
|
||||
QWaylandScreen *screen() const { return mScreen; }
|
||||
|
||||
bool shellManagesActiveState() const;
|
||||
|
||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
|
||||
void setOrientationMask(Qt::ScreenOrientations mask);
|
||||
|
||||
|
@ -157,6 +157,13 @@ void QWaylandWlShellSurface::setTopLevel()
|
||||
set_toplevel();
|
||||
}
|
||||
|
||||
static inline bool testShowWithoutActivating(const QWindow *window)
|
||||
{
|
||||
// QWidget-attribute Qt::WA_ShowWithoutActivating.
|
||||
const QVariant showWithoutActivating = window->property("_q_showWithoutActivating");
|
||||
return showWithoutActivating.isValid() && showWithoutActivating.toBool();
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::updateTransientParent(QWindow *parent)
|
||||
{
|
||||
QWaylandWindow *parent_wayland_window = static_cast<QWaylandWindow *>(parent->handle());
|
||||
@ -174,7 +181,8 @@ void QWaylandWlShellSurface::updateTransientParent(QWindow *parent)
|
||||
uint32_t flags = 0;
|
||||
Qt::WindowFlags wf = m_window->window()->flags();
|
||||
if (wf.testFlag(Qt::ToolTip)
|
||||
|| wf.testFlag(Qt::WindowTransparentForInput))
|
||||
|| wf.testFlag(Qt::WindowTransparentForInput)
|
||||
|| testShowWithoutActivating(m_window->window()))
|
||||
flags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE;
|
||||
|
||||
set_transient(parent_wayland_window->object(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user