Fabien Costantini wrote:

>> Albrecht Schlosser wrote:
>>
>> > Fabien Costantini wrote:
>> >> If it is made clear that it could be intersting to get a default
>> >> configurable class name for all windows created after a setting, then
>> >> we could also add an Fl_Window static member...
>> >
>> > That's what I thought of and why I proposed this. If the current
>> > default would be to derive the class name from argv[0], then it would
>> > be useful to set a global default, but otherwise you're right and it
>> > should be a window property - with a useful default value...
>> >
>> > Albrecht
>>
>> Since xclass is automatically set by Fl_Window::show(int,char**), why not
>> store the string as a static member in Fl_Window as well (e.g.
>> Fl_Window::default_xclass). Basically, when show(int,char**) is called it
>> checks xclass() ../..
>> Alvin
> 
> IMHO, the advantage of using only static get/set methods is that we don't
> add a potentially unused attribute to the Fl_Window base class. This is
> also the drawback, and it should be analysed whether we should add both
> static method and window property methods. In all cases, it seems to be a
> good idea to have the static get/set methods.
> 
> Fabien

My suggestion was only to minimumally extend the current functionality.

As of right now, the WM_CLASS is only set for the first Fl_Window created by
the app (assuming Fl_Window::show(int,char**) is called. This handles the
cases were xclass is set by the developer or, if not set, determined by
argv[0]. However, all other Fl_Window's that are created do not have
WM_CLASS set.

My suggest is only to retain the string that was used. Then every other
Fl_Window could use that same string (if xclass() has not been set
otherwise).

-- 
Alvin
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to