Qt5: disable an obsolete Qt4 X11 window focus workaround

I have verified in numerous desktop environments and window managers
that the workaround does not work with Qt5.
Let us disable it in Qt5 builds to prevent potential issues
and eliminate the small performance overhead.
This commit is contained in:
Igor Kushnir 2018-04-14 16:25:09 +03:00
parent 3c4cdaff8e
commit d530af7781

View file

@ -906,7 +906,7 @@ void ScanPopup::requestWindowFocus()
// One of the rare, actually working workarounds for requesting a user keyboard focus on X11,
// works for Qt::Popup windows, exactly like our Scan Popup (in unpinned state).
// Modern window managers actively resist to automatically focus pop-up windows.
#ifdef HAVE_X11
#if defined HAVE_X11 && QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
if ( !ui.pinButton->isChecked() )
{
QMenu m( this );