Commit e3d4f314 authored by Ilkka Ollakka's avatar Ilkka Ollakka

QT4: compare also screengeometry to see if screenresolution has changed

 when checking if fullscreencontrollers position needs to be
 recalculated. Should fix #2283 (what I understand that ticket)

 Please review and test.
parent 2bf1567f
...@@ -699,11 +699,12 @@ void FullscreenControllerWidget::showFSC() ...@@ -699,11 +699,12 @@ void FullscreenControllerWidget::showFSC()
adjustSize(); adjustSize();
/* center down */ /* center down */
int number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); int number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
if( number != i_screennumber ) if( number != i_screennumber ||
screenRes != QApplication::desktop()->screenGeometry(number) )
{ {
screenRes = QApplication::desktop()->screenGeometry(number);
msg_Dbg( p_intf, "Calculation fullscreen controllers center"); msg_Dbg( p_intf, "Calculation fullscreen controllers center");
/* screen has changed, calculate new position */ /* screen has changed, calculate new position */
QRect screenRes = QApplication::desktop()->screenGeometry(number);
QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2), QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2),
screenRes.y() + screenRes.height() - height()); screenRes.y() + screenRes.height() - height());
move( pos ); move( pos );
......
...@@ -264,6 +264,7 @@ private: ...@@ -264,6 +264,7 @@ private:
int i_mouse_last_x, i_mouse_last_y; int i_mouse_last_x, i_mouse_last_y;
bool b_mouse_over; bool b_mouse_over;
int i_screennumber; int i_screennumber;
QRect screenRes;
#ifdef WIN32TRICK #ifdef WIN32TRICK
bool b_fscHidden; bool b_fscHidden;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment