kwin clients - virtual colorsSupported()?

Lubos Lunak l.lunak at suse.cz
Tue Nov 27 21:43:16 GMT 2007


On Ășt 27. listopadu 2007, Matthew Woehlke wrote:
> Lubos Lunak wrote:
> >  If all you need is querying a decoration whether it supports something,
> > see KDecorationFactory::supports(). This is already done for buttons -
> > there's one flag for querying whether the client supports announcing
> > supported buttons :) and then there's one flag per button. You can have
> > the same for window roles.
>
> Ok. aseigo and I talked on IRC, and came up with two recommended solutions:
>
> 1. add color types to Ability
>    + no new API, BC
>    - all clients must be updated or result will be wrong

 "or the result will be the default". Which should make it the same like 2a 
here.

> 2a. add 'virtual supports(ColorType) const;' to KDecorationFactory
>    + reuses existing enum

 Which can be however simple to map.

>    - BIC
 
 BC/BIC shouldn't matter that much, I still want to change something there.

>    - clients might forget to override it
> 2b. add 'virtual supports(ColorType) const = 0;' to KDecorationFactory
>    + reuses existing enum
>    + clients must override it, more likely to do it correctly

 Long live copy&paste! I wonder if anybody has started writing a new windeco 
from scratch in the recent years.

>    - BIC
>    - all clients must be updated
>
> Lubos, you're the maintainer, what do you think? aseigo and I both
> prefer 2; aseigo likes 2a, while I lean a bit toward 2b.

 I would actually prefer 1, since that's exactly what supports() was designed 
for and should be the one place for it. But I don't insist.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz



More information about the kde-core-devel mailing list