nanogui: A new opitional nanowm !


Previous by date: 9 Aug 2002 03:40:57 -0000 Re: SMPEG SegFault?, Mike Schumi
Next by date: 9 Aug 2002 03:40:57 -0000 microwindows for eCos, Pang
Previous in thread:
Next in thread:

Subject: A new opitional nanowm !
From: "wang" ####@####.####
Date: 9 Aug 2002 03:40:57 -0000
Message-Id:

HI,everyone:
 
   Because both Alex and jordon object adding 
WM into server,so to keep the compatibility,I 
decide to add WM into server just as an option,
and do not change original API and other code in
nanax.so both of us can accept it.if you do not
like ,just have it uncompiled.
   
  These days ,I have been busy doing this job.and
basicly filished but with some problem, this is
what I did:
  1.For convenience ,I merge files in nanox and 
nanowm into a new directory newnano( I don't mean
we must do so later).and just use nanox's Makefile
for modifing model.
  2.I devide the main fuction of nanowm into to 
subfuction InitilizeWm() and ConductWmEvent() ,to 
implement ConductWmEvent() I add a new API 
GrGetWmEvent(&wmevent) in srvfunc.c:
    int GrGetWmEvent(GR_EVENT *ep)
{
      GR_EVENT_LIST *	elp;

	/* Copy first event if any*/
	if(!GrPeekEvent(ep))
		return 0;

	/* Get first event again*/
	elp = curclient->eventhead;

	/* Remove first event from queue*/
	curclient->eventhead = elp->next;
	if (curclient->eventtail == elp)
		curclient->eventtail = NULL;

	elp->next = eventfree;
	eventfree = elp;
	return 1;
}
  you see,I have made wm client with 0 as its id by
GsAcceptClientFd(0),so we can't use 0 any more. so ,in 
fuction GsAcceptClient() (srvnet.c) I modify 
   GsAcceptClientFd(i);
   to 
   GsAcceptClientFd(i+1);
 3.After that ,I should add this two new fuction into
srvmain.I just modify the main fucition:
  /* Attempt to initialise the server*/
        if(GsInitialize() < 0)
                exit(1);
        if(InitializeWm()!=0)
                exit(1);
        while(1){
                GsSelect(0L);
                ConductWmEvent();
                }
        return 0;
 first initialize and in every loop conduct wmevent,just
these .so you can have them uncompiled easyly .
   certainly I should and these new fuctions in serv.h.
 4.Modify the makefile .  


 It can be compiled successfully,but when I run it with a
shell "newnano/nano-X & bin/nxterm " ,the background can
be chaged  but can't start nxterm ,and can't switch terminal.
from ssh I know the nano-X has exited ,but it can't go back to
text,we can say that it's dead,but since it can change 
background, so I know InitailzeWm has worked ,but I not sure 
of the reason of failure .

 Any comment are welcome!
        wang
********************************************************************************************
 All my effort is to make our new graphic system faster and more stable.
####@####.####
          2002-08-09

[Content type application/octet-stream not shown. Download]

[Content type application/octet-stream not shown. Download]

Previous by date: 9 Aug 2002 03:40:57 -0000 Re: SMPEG SegFault?, Mike Schumi
Next by date: 9 Aug 2002 03:40:57 -0000 microwindows for eCos, Pang
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.