Re: Interaction between applications and compositing managers



On 10 Apr 2006 18:18:04 +0200 Soeren Sandmann <sandmann daimi au dk> babbled:

> Lubos Lunak <l lunak suse cz> writes:
> 
> > On Monday 03 April 2006 23:23, Olivier Chapuis wrote:
> > > Soeren Sandmann a écrit :
> > > > Hello
> > > >
> > > > To integrate a compositing manager well with the rest of the desktop,
> > > > new hints and protocols between applications and compositing managers
> > > > are needed. This message is intended to start that discussion.
> > > >
> > ...
> > > (2) I think that using a new property "_NET_WM_UNMANAGED_TYPE" (and then
> > > NET_WM_UNMANAGED_TYPE_DND_WINDOW ...etc) will help to avoid confusion.
> > 
> >  I think I disagree here. I don't see any compelling reason to have a
> > separate type for override-redirect windows and IMHO it will avoid about as
> > much confusion as it will create:
> 
> Well, one reason is that having two separate types is somewhat simpler
> to implement, at least in gtk+. If they were one type, logically, the
> existing enumeration would have to be extended which is an API break
> (because of things like switch statements without a default). Not
> impossible to work around of course.

switch statements with no default: case (and an assumption that all the members
in the switch are the only valid values and if no switch case is executed "bad
things" (tm) will happem) switching on EXTERNALLY provided values (ie from a
property read from x) are just fundamentally broken from the start - bugs
waiting to happen. i would not consider this an api break. it's an api
addition. the original code was/is broken. never trust data you read from
properties to always be correct and sane - nasty applications could try cause
havoc by maliciously mangling properties or simply bugs in software on clients
could do the same. reading x properties is like reading any protocol over a
wire to an untrusted client - you double check  what you get and never assume
it is sane and correct.

so my point - it's not a pi break at all adding extra enumerations. the code
should have already handled the case of an enumeration it doesn't know about to
start with in some "sane" fashion.

> 
> Soren
> _______________________________________________
> wm-spec-list mailing list
> wm-spec-list gnome org
> http://mail.gnome.org/mailman/listinfo/wm-spec-list
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster rasterman com
裸好多
Tokyo, Japan (東京 日本)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]