@ -20,6 +20,7 @@
# include <klocale.h>
# include <kiconloader.h>
# include <kimageeffect.h>
# include <kwin.h>
// system includes
# include <stdlib.h>
@ -46,9 +47,8 @@ struct PresentationFrame
} ;
PresentationWidget : : PresentationWidget ( KPDFDocument * doc )
: QWidget ( 0 , " presentationWidget " , WDestructiveClose | WStyle_NoBorder |
WStyle_StaysOnTop | WShowModal ) , m_document ( doc ) , m_frameIndex ( - 1 )
PresentationWidget : : PresentationWidget ( QWidget * parent , KPDFDocument * doc )
: QDialog ( parent , " presentationWidget " , true , WDestructiveClose | WStyle_NoBorder ) , m_document ( doc ) , m_frameIndex ( - 1 )
{
// set look and geometry
setBackgroundMode ( Qt : : NoBackground ) ;
@ -168,6 +168,13 @@ bool PresentationWidget::canUnloadPixmap( int pageNumber )
// <widget events>
bool PresentationWidget : : event ( QEvent * e )
{
if ( e - > type ( ) = = QEvent : : WindowDeactivate ) KWin : : clearState ( winId ( ) , NET : : StaysOnTop ) ;
else if ( e - > type ( ) = = QEvent : : WindowActivate ) KWin : : setState ( winId ( ) , NET : : StaysOnTop ) ;
return QDialog : : event ( e ) ;
}
void PresentationWidget : : keyPressEvent ( QKeyEvent * e )
{
if ( m_width = = - 1 ) return ;