xcb: replace tiny helper function with an inline code

Having these 2 lines in a function does not add much value and
requires scrolling that could be avoided.

Change-Id: Ife814be6478521cd64b0048d1b6ee447afea55de
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
Gatis Paeglis 2018-08-13 15:38:30 +02:00
parent 0e63111416
commit 52d4a2976f
1 changed files with 3 additions and 8 deletions

View File

@ -732,13 +732,6 @@ void QXcbWindow::setVisible(bool visible)
hide();
}
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 QXcbWindow::show()
{
if (window()->isTopLevel()) {
@ -786,7 +779,9 @@ void QXcbWindow::show()
updateNetWmStateBeforeMap();
}
if (testShowWithoutActivating(window()))
// QWidget-attribute Qt::WA_ShowWithoutActivating.
const auto showWithoutActivating = window()->property("_q_showWithoutActivating");
if (showWithoutActivating.isValid() && showWithoutActivating.toBool())
updateNetWmUserTime(0);
else if (connection()->time() != XCB_TIME_CURRENT_TIME)
updateNetWmUserTime(connection()->time());