Commit ca4c96b1 authored by Emmanuel Puig's avatar Emmanuel Puig

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