mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Reworked process handler due a large number of races. Now process reports
should not interfere with popped up message boxes. Still there is a issue with childs during splash startup: when one of them crashes with core dump crash dialog will not be shown, but the main process handler correctly returns crash flag.
This commit is contained in:
@ -28,9 +28,15 @@
|
||||
|
||||
|
||||
extern void service_watcher_cb(int pid, int signum);
|
||||
|
||||
Fl_Double_Window* splash_win = 0;
|
||||
|
||||
class AutoSound {
|
||||
public:
|
||||
AutoSound() { edelib::SoundSystem::init(); }
|
||||
~AutoSound() { if(edelib::SoundSystem::inited()) edelib::SoundSystem::shutdown(); }
|
||||
void play(const char* file) { if(edelib::SoundSystem::inited()) edelib::SoundSystem::play(file, 0); }
|
||||
};
|
||||
|
||||
int splash_xmessage_handler(int e) {
|
||||
if(fl_xevent->type == MapNotify || fl_xevent->type == ConfigureNotify) {
|
||||
if(splash_win) {
|
||||
@ -186,9 +192,12 @@ void Splash::run(void) {
|
||||
int sh = DisplayHeight(fl_display, fl_screen);
|
||||
position(sw/2 - w()/2, sh/2 - h()/2);
|
||||
|
||||
#if 0
|
||||
bool sound_loaded = false;
|
||||
if(sound && !sound->empty())
|
||||
sound_loaded = edelib::SoundSystem::init();
|
||||
#endif
|
||||
AutoSound sound_play;
|
||||
|
||||
show();
|
||||
|
||||
@ -203,17 +212,20 @@ void Splash::run(void) {
|
||||
|
||||
//XSelectInput(fl_display, RootWindow(fl_display, fl_screen), SubstructureNotifyMask);
|
||||
//Fl::add_handler(splash_xmessage_handler);
|
||||
|
||||
#if 0
|
||||
if(sound_loaded)
|
||||
edelib::SoundSystem::play(sound->c_str(), 0);
|
||||
#endif
|
||||
sound_play.play(sound->c_str());
|
||||
|
||||
while(shown())
|
||||
Fl::wait();
|
||||
|
||||
#if 0
|
||||
if(sound_loaded) {
|
||||
edelib::SoundSystem::stop();
|
||||
edelib::SoundSystem::shutdown();
|
||||
}
|
||||
#endif
|
||||
|
||||
splash_win = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user