mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Merge branch 'goldendict:master' into staged
This commit is contained in:
commit
2bccf038b1
|
@ -2980,7 +2980,19 @@ void MainWindow::hotKeyActivated( int hk )
|
|||
toggleMainWindow();
|
||||
else
|
||||
if ( scanPopup.get() )
|
||||
{
|
||||
#ifdef HAVE_X11
|
||||
// When the user requests translation with the Ctrl+C+C hotkey in certain apps
|
||||
// on some GNU/Linux systems, GoldenDict appears to handle Ctrl+C+C before the
|
||||
// active application finishes handling Ctrl+C. As a result, GoldenDict finds
|
||||
// the clipboard empty, silently cancels the translation request, and users report
|
||||
// that Ctrl+C+C is broken in these apps. Slightly delay handling the clipboard
|
||||
// hotkey to give the active application more time and thus work around the issue.
|
||||
QTimer::singleShot( 10, scanPopup.get(), SLOT( translateWordFromClipboard() ) );
|
||||
#else
|
||||
scanPopup->translateWordFromClipboard();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::prepareNewReleaseChecks()
|
||||
|
|
Loading…
Reference in a new issue