Okay. I understand that. But how the X server knows that no cliens are connected again? Is there any time stamp to record it? Let me describe my debug process. I use GDB to debug the X server. When the X server is booting up, I set the breakpoint on modesetting function. Then I run "xrandr -s 1280x1024" to set the mode. Then the modesetting in dispatch is executing. After that, the dispatch will break out and while loop in dix_mian execute again. So is there a time stamp in dispatch to know no clients are connected?
Thanks, Frank > -----Original Message----- > From: Alan Coopersmith [mailto:[email protected]] > Sent: 2011年4月28日 11:06 > To: Huang, FrankR > Cc: [email protected] > Subject: Re: Question about the modesetting on X server > > On 04/27/11 07:46 PM, Huang, FrankR wrote: > > Hi, all > > > > Right now, I am working on the graphics driver and use X server > > architecture as our base. I finished the modeset part now. But I > > encounter a problem that puzzled me. > > As you know, in dix_main(), the mode will be set in > > xf86CrtcCreateScreenResources. Then the code will go to dispatch to > > listen to client's new requirement. > > And I use command xrandr to change the resolution to the new > > mode, I found that modeset will be done via ProcRRSetScreenConfig(). But > > I also noticed that the dispatch will be break out. And the while loop > > in dix_main() will be executed again. The serverGeneration will be > > updated with new value. I am not sure why the Xserver will do this > > again? Why the dispatch must be breaked out with this new resolution? > > The X protocol requires the server to reset when no clients are connected > to it. To avoid that, keep a simple client such as xlogo or a window > manager running - testing an X server with no clients connected isn't > a good match for what users actually runs anyway. > > -- > -Alan Coopersmith- [email protected] > Oracle Solaris Platform Engineering: X Window System > _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
