From 89c2e3318df5ea6d71bc891ae2d5c63961f3a2e9 Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Sun, 1 Feb 2009 05:15:25 +0000 Subject: [PATCH] Saner choice for the frameless window type; no more window activating which used to unnecessarily steal focus. --- src/scanpopup.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/scanpopup.cc b/src/scanpopup.cc index 47586fe8..8f57ae33 100644 --- a/src/scanpopup.cc +++ b/src/scanpopup.cc @@ -28,8 +28,7 @@ ScanPopup::ScanPopup( QWidget * parent, ui.prefixButton->hide(); ui.groupList->fill( groups ); - //setWindowFlags( Qt::Tool ); - setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::Tool ); + setWindowFlags( Qt::Popup ); #if 0 // Experimental code to give window a non-rectangular shape (i.e. // balloon) using a colorkey mask. @@ -88,7 +87,6 @@ void ScanPopup::clipboardChanged( QClipboard::Mode m ) move( currentPos.x() + 4, currentPos.y() + 10 ); show(); - activateWindow(); QApplication::processEvents(); // Make window appear immediately no matter what } @@ -221,7 +219,7 @@ void ScanPopup::pinButtonClicked( bool checked ) if ( checked ) setWindowFlags( Qt::Dialog ); else - setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::Tool ); + setWindowFlags( Qt::Popup ); // Should we disable grip? I like it with the grip better. //ui.gripArea->setDisabled( checked );