save the real parent widget and use it later for getting the screen number of the okular application

BUG: 185013

svn path=/trunk/KDE/kdegraphics/okular/; revision=928888
remotes/origin/KDE/4.3
Pino Toscano 17 years ago
parent bfeab33986
commit 77d027bac0
  1. 5
      ui/presentationwidget.cpp
  2. 1
      ui/presentationwidget.h

@ -127,6 +127,7 @@ class PresentationToolBar : public QToolBar
PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc, KActionCollection * collection )
: QWidget( 0 /* must be null, to have an independent widget */, Qt::FramelessWindowHint ),
m_pressedLink( 0 ), m_handCursor( false ), m_drawingEngine( 0 ), m_screenSaverCookie( -1 ),
m_parentWidget( parent ),
m_document( doc ), m_frameIndex( -1 ), m_topBar( 0 ), m_pagesEdit( 0 ), m_searchBar( 0 ),
m_screenSelect( 0 ), m_blockNotifications( false ), m_inBlackScreenMode( false )
{
@ -1069,7 +1070,7 @@ void PresentationWidget::recalcGeometry()
int screen = 0;
if ( preferenceScreen == -2 )
{
screen = desktop->screenNumber( parentWidget() );
screen = desktop->screenNumber( m_parentWidget );
}
else if ( preferenceScreen == -1 )
{
@ -1081,7 +1082,7 @@ void PresentationWidget::recalcGeometry()
}
else
{
screen = desktop->screenNumber( parentWidget() );
screen = desktop->screenNumber( m_parentWidget );
Okular::Settings::setSlidesScreen( -2 );
}
const QRect screenGeom = desktop->screenGeometry( screen );

@ -113,6 +113,7 @@ class PresentationWidget : public QWidget, public Okular::DocumentObserver
QList< QRect > m_transitionRects;
// misc stuff
QWidget * m_parentWidget;
Okular::Document * m_document;
QVector< PresentationFrame * > m_frames;
int m_frameIndex;

Loading…
Cancel
Save