Commit f7ec1242 authored by Olivier Teulière's avatar Olivier Teulière

* ./modules/gui/skins/src/theme.cpp: avoid infinite recursion with

   circular anchoring
parent 1a923219
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* theme.cpp: Theme class * theme.cpp: Theme class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: theme.cpp,v 1.12 2003/04/22 22:57:40 ipkiss Exp $ * $Id: theme.cpp,v 1.13 2003/04/29 20:36:56 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -245,17 +245,18 @@ void Theme::MoveSkin( SkinWindow *wnd, int left, int top ) ...@@ -245,17 +245,18 @@ void Theme::MoveSkin( SkinWindow *wnd, int left, int top )
hang++ ) hang++ )
{ {
win = (*hang)->GetParent(); win = (*hang)->GetParent();
win->GetPos( x, y ); // Check that the window hasn't already moved (this avoids
// infinite recursion with circular anchoring)
if( !win->Moved )
{
win->Moved = true;
MoveSkin( win, left, top ); MoveSkin( win, left, top );
} }
} }
}
// Move window only if has not been moved yet // Move window
if( !wnd->Moved )
{
wnd->Moved = true;
wnd->Move( oldx + left, oldy + top ); wnd->Move( oldx + left, oldy + top );
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool Theme::MoveSkinMagnet( SkinWindow *wnd, int left, int top ) bool Theme::MoveSkinMagnet( SkinWindow *wnd, int left, int top )
......
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