fix: remove unused method

This commit is contained in:
YiFang Xiao 2023-10-10 21:37:11 +08:00
parent a45c95ebde
commit f274e658ed
2 changed files with 0 additions and 10 deletions

View file

@ -851,19 +851,10 @@ void ScanPopup::enterEvent( QEvent * event )
} }
} }
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.
}
void ScanPopup::showEvent( QShowEvent * ev ) void ScanPopup::showEvent( QShowEvent * ev )
{ {
QMainWindow::showEvent( ev ); QMainWindow::showEvent( ev );
QTimer::singleShot( 100, this, &ScanPopup::requestWindowFocus );
if ( groups.size() <= 1 ) // Only the default group? Hide then. if ( groups.size() <= 1 ) // Only the default group? Hide then.
ui.groupList->hide(); ui.groupList->hide();

View file

@ -88,7 +88,6 @@ signals:
#endif #endif
public slots: public slots:
void requestWindowFocus();
void inspectElementWhenPinned( QWebEnginePage * page ); void inspectElementWhenPinned( QWebEnginePage * page );
/// Translates the word from the clipboard, showing the window etc. /// Translates the word from the clipboard, showing the window etc.