Commit ca4c96b1 authored by Emmanuel Puig's avatar Emmanuel Puig

* Fiwing WINDOW_CLOSE and WINDOW_OPEN synchronization
parent 6140784b
......@@ -2,7 +2,7 @@
* event.cpp: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
* $Id: event.cpp,v 1.2 2003/03/19 18:14:48 karibu Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -296,11 +296,11 @@ void Event::CreateEvent()
break;
case WINDOW_OPEN:
Param2 = GetBool( para2 );
Param1 = GetBool( para2 );
break;
case WINDOW_CLOSE:
Param2 = GetBool( para2 );
Param1 = GetBool( para2 );
break;
case PLAYLIST_ID_DEL:
......@@ -357,7 +357,7 @@ int Event::GetBool( string expr )
{
return 2;
}
return 2;
return 1;
}
//---------------------------------------------------------------------------
void Event::CreateShortcut()
......
......@@ -2,7 +2,7 @@
* theme.cpp: Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: theme.cpp,v 1.2 2003/03/19 03:11:14 karibu Exp $
* $Id: theme.cpp,v 1.3 2003/03/19 18:14:48 karibu Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -87,18 +87,25 @@ void Theme::ShowTheme()
ChangeTaskbar();
list<Window *>::const_iterator win;
Event *evt;
Event *evt1;
Event *evt2;
// Synchronize control to visible aspect
for( win = WindowList.begin(); win != WindowList.end(); win++ )
{
// Synchronize windows visibility
if( (*win)->OnStartThemeVisible )
evt = (Event *)new OSEvent( p_intf, (*win), WINDOW_OPEN, 0, 1 );
{
evt1 = (Event *)new OSEvent( p_intf, (*win), WINDOW_OPEN, 1, 0 );
evt2 = (Event *)new OSEvent( p_intf, (*win), WINDOW_CLOSE, 0, 0 );
}
else
evt = (Event *)new OSEvent( p_intf, (*win), WINDOW_CLOSE, 0, 1 );
evt->PostSynchroMessage( true );
{
evt1 = (Event *)new OSEvent( p_intf, (*win), WINDOW_OPEN, 0, 0 );
evt2 = (Event *)new OSEvent( p_intf, (*win), WINDOW_CLOSE, 1, 0 );
}
evt1->PostSynchroMessage( true );
evt2->PostSynchroMessage( true );
}
// Initialize magnetism
......
......@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
* $Id: vlcproc.cpp,v 1.2 2003/03/19 18:14:48 karibu Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -78,7 +78,7 @@ bool VlcProc::EventProc( Event *evt )
(*win)->OnStartThemeVisible = !(*win)->IsHidden();
}
p_intf->p_sys->i_close_status = (int)evt->GetParam1();
OSAPI_PostMessage( NULL, WINDOW_CLOSE, 0, 0 );
OSAPI_PostMessage( NULL, WINDOW_CLOSE, 1, 0 );
return true;
case VLC_SHOW:
......@@ -87,7 +87,7 @@ bool VlcProc::EventProc( Event *evt )
win != p_intf->p_sys->p_theme->WindowList.end(); win++ )
{
if( (*win)->OnStartThemeVisible )
OSAPI_PostMessage( (*win), WINDOW_OPEN, 0, 0 );
OSAPI_PostMessage( (*win), WINDOW_OPEN, 1, 0 );
}
p_intf->p_sys->b_all_win_closed = false;
return true;
......
......@@ -2,7 +2,7 @@
* window.cpp: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.2 2003/03/19 02:09:56 videolan Exp $
* $Id: window.cpp,v 1.3 2003/03/19 18:14:48 karibu Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -185,11 +185,39 @@ bool Window::ProcessEvent( Event *evt )
return true;
case WINDOW_OPEN:
switch( p1 )
{
case 0:
Close();
break;
case 1:
Open();
break;
case 2:
if( Hidden )
Open();
else
Close();
break;
}
return true;
case WINDOW_CLOSE:
switch( p1 )
{
case 0:
Open();
break;
case 1:
Close();
break;
case 2:
if( Hidden )
Open();
else
Close();
break;
}
return true;
case WINDOW_SHOW:
......
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