Revert "Use the same window flags for the scan window, on Win and Linux."

Unfortunately, the change didn't work properly on KDE systems.

This reverts commit 8a8c7cc7d7.
This commit is contained in:
Tvangeste 2013-01-28 13:19:11 +01:00
parent 9f46028299
commit a89299c2e3

View file

@ -16,7 +16,16 @@
using std::wstring; using std::wstring;
static Qt::WindowFlags popupWindowFlags = Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; /// We use different window flags under Windows and X11 due to slight differences
/// in their behavior on those platforms.
static Qt::WindowFlags popupWindowFlags =
#ifdef Q_WS_WIN
Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint
#else
Qt::Popup
#endif
;
ScanPopup::ScanPopup( QWidget * parent, ScanPopup::ScanPopup( QWidget * parent,
Config::Class & cfg_, Config::Class & cfg_,
@ -304,7 +313,14 @@ void ScanPopup::translateWord( QString const & word )
altModeExpirationTimer.stop(); altModeExpirationTimer.stop();
inputWord = str; inputWord = str;
engagePopup( false, true ); engagePopup( false,
#ifdef Q_WS_WIN
true // We only focus popup under Windows when activated via Ctrl+C+C
// -- on Linux it already has an implicit focus
#else
false
#endif
);
} }
void ScanPopup::clipboardChanged( QClipboard::Mode m ) void ScanPopup::clipboardChanged( QClipboard::Mode m )