On 29.09.2008, at 21:37, Alvin wrote: > * When show(argc, argv) is called (in Fl_arg.cxx) for the first > window of > the application, a check is made to see if xclass() has been set. If > not, > argv[0] is used. I have tested this and, sure enough, if I make a > symlink > called turnip to my program, the WM_CLASS is set to "turnip","Turnip". > > Now, my apps have their main(int,char**) created by fluid. I'm not > sure what > happens when the show() is called instead of show(int,char**). If > someone > can tell me, it would be greatly appreciated.
Ah, I was wondering about that. The first "show()" call in an application always should be "show(int,char**)" for this and other reasons. I beleive it is in the docs somewhere, but I can see how easy it is to get that wrong. > * Should the xclass() of other Fl_Windows (and its derivatives) be > automatically set when show() is called? Yes, I think that is acceptable. > If so, what should it be set to: (1) The same as the first window? Is > that valid? Yes, I beleive that this is coded that way anyways, unless xclass() is set differently in a later call. If no class is given or show() is called, the window class will be "FLTK" (at least in MSWindows). It would probably be better to use the filename instead, but since argv[0] is not accessable here, we would have to go another route (plus argv[0] is not always valid anyways, but IIRC Greg has a collection of functions to get the executable path on all platforms?!) > (2) Or a distinct name, something like <first window > xclass>#<xid of the Fl_Window being shown>. No, I don't think so. From what I understand, the xclass shoudl be the same to signal to the WM that all windows belong to the same app. Which brings me to the first mail: I am very surprised that Fluid is not behaving correctly, and here seems to be the main problem, because Fluid does correctly call Fl::args(...) and main_window->show(argc, argv). ---- http://robowerk.com/ _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
