nanogui: what about the nanowm


Previous by date: 30 Oct 2000 19:07:37 -0000 Re: Multiple Screen Support, David Erickson
Next by date: 30 Oct 2000 19:07:37 -0000 Re: bitblitting, Greg Haerr
Previous in thread: 30 Oct 2000 19:07:37 -0000 Re: what about the nanowm , 高�麟
Next in thread:

Subject: Re: what about the nanowm
From: "Greg Haerr" ####@####.####
Date: 30 Oct 2000 19:07:37 -0000
Message-Id: <02ca01c042a5$86296230$6817dbd0@censoft.com>

: > I have added it to
: > Microwindows 0.89pre5.  However, in your code below,
: > the value of ep->utype will be the same regardless
: > of whether the event is CHLD_UPDATE or UPDATE.
: >
: > In most cases, the client handling of CHLD_UPDATE
: > and UPDATE will be identical.  Only the type value
: > needs to change, rather than utype as well.
: >

Mr Kao,
    I have been thinking about this fix, and
I have yet another idea.  I'm wondering whether
we should change Nano-X to have but a single
GR_EVENT_TYPE_UPDATE event, but two masks,
GR_EVENT_MASK_UPDATE and GR_EVENT_MASK_CHLD_UPDATE.
In this way, you can select for either window
or parent update events, but the event itself
is always the same.

I'm having trouble understanding why one would
ever care about two different events, when
the ep->wid is always used to differentiate
them anyway.  With the current fix, every
case statement that has GR_EVENT_TYPE_UPDATE
also has to have CHLD_UPDATE...

Regards,

Greg




: > : my fix of this 'bug':
: > : p.s.: GR_UPDATECHLD(utype) is a macro, = utype + 8
: > :
: > : void GsDeliverUpdateEvent(GR_WINDOW *wp, GR_UPDATE_TYPE utype,
GR_COORD
: x,
: > :    GR_COORD y, GR_SIZE width, GR_SIZE height)
: > : {
: > :  GR_EVENT_MASK  cmask = GR_EVENT_MASK_UPDATE;
: > :  GR_EVENT_UPDATE  *ep;  /* update event */
: > :  GR_EVENT_CLIENT  *ecp;  /* current event client */
: > :  GR_WINDOW_ID  id = wp->id;
: > :  int   lcount = 0;
: > :
: > : update_again:
: > :  if (lcount)
: > :  for (ecp = wp->eventclients; ecp; ecp = ecp->next) {
: > :   if ((ecp->eventmask & cmask) == 0)
: > :    continue;
: > :
: > :   ep = (GR_EVENT_UPDATE *) GsAllocEvent(ecp->client);
: > :   if (ep == NULL)
: > :    continue;
: > :
: > :   ep->type = (lcount) ? GR_EVENT_TYPE_CHLD_UPDATE :
: GR_EVENT_TYPE_UPDATE;
: > :   ep->utype = (lcount) ? GR_UPDATECHLD(utype) : utype;  /* FIXME */
: > :   ep->wid = wp->id;
: > :   ep->subwid = id;
: > :   ep->x = x;
: > :   ep->y = y;
: > :   ep->width = width;
: > :   ep->height = height;
: > :  }
: > :
: > :  /* If we are currently checking the window updated, go back and
: > :   * check its parent too */
: > :  if (!lcount++)
: > :
: > :   wp = wp->parent;
: > :   cmask = GR_EVENT_MASK_CHLD_UPDATE;
: > :   goto update_again;
: > :  }
: > : }
: > :
: >
: >
:
:


Previous by date: 30 Oct 2000 19:07:37 -0000 Re: Multiple Screen Support, David Erickson
Next by date: 30 Oct 2000 19:07:37 -0000 Re: bitblitting, Greg Haerr
Previous in thread: 30 Oct 2000 19:07:37 -0000 Re: what about the nanowm , 高�麟
Next in thread:


Powered by ezmlm-browse 0.20.