Commit f7ec1242 authored by ipkiss's avatar ipkiss
Browse files

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

   circular anchoring
parent 1a923219
......@@ -2,7 +2,7 @@
* theme.cpp: Theme class
*****************************************************************************
* 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>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -245,17 +245,18 @@ void Theme::MoveSkin( SkinWindow *wnd, int left, int top )
hang++ )
{
win = (*hang)->GetParent();
win->GetPos( x, y );
MoveSkin( win, left, top );
// 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 );
}
}
}
// Move window only if has not been moved yet
if( !wnd->Moved )
{
wnd->Moved = true;
wnd->Move( oldx + left, oldy + top );
}
// Move window
wnd->Move( oldx + left, oldy + 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