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

Previously, the scan popup used Qt::Popup flag on Linux, but this
flag is incompatible with the new translate box UI, esp. the
floating suggestion list, since in the Qt::Popup-styled windows
all the events go to the popup, hence the creation of additional
windows is problematic, and those new windows don't work properly
since they don't receive events.

Without this change, the scrolling of the suggestion list in the
Scan Popup's translate box is impossible.
This commit is contained in:
Tvangeste 2013-01-27 22:21:09 +01:00
parent ffa9f5778b
commit 8a8c7cc7d7

View file

@ -16,16 +16,7 @@
using std::wstring;
/// 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
;
static Qt::WindowFlags popupWindowFlags = Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint;
ScanPopup::ScanPopup( QWidget * parent,
Config::Class & cfg_,
@ -313,14 +304,7 @@ void ScanPopup::translateWord( QString const & word )
altModeExpirationTimer.stop();
inputWord = str;
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
);
engagePopup( false, true );
}
void ScanPopup::clipboardChanged( QClipboard::Mode m )