Fixed issues with add_fd() addon. Dialogs popped up, especially from

service_watcher() would not be drawn correctly yielding program hang since
add_fd() would not send events to fltk.

Also commented hack from Splash to keep it's window at the top of all;
now, using add_fd() evoke will get events before fltk which is what I want.
Not tested with other wm's.

Note: enabling that hack will surely crash evoke unless fl_handle() is removed
from main evoke loop.
This commit is contained in:
Sanel Zukan
2007-09-18 15:43:01 +00:00
parent ad69c2fc2c
commit 04a87a7f7c
4 changed files with 48 additions and 27 deletions

View File

@ -48,6 +48,11 @@ void xmessage_handler(int, void*) {
}
}
int xmessage_handler2(int e) {
return EvokeService::instance()->handle(fl_xevent);
}
const char* next_param(int curr, char** argv, int argc) {
int j = curr + 1;
if(j >= argc)
@ -202,6 +207,7 @@ int main(int argc, char** argv) {
* Also note that '1' parameter means POLLIN, and for the details see Fl_x.cxx
*/
Fl::add_fd(ConnectionNumber(fl_display), 1, xmessage_handler);
//Fl::add_handler(xmessage_handler2);
while(service->running())
Fl::wait(FOREVER);