Thanks, Alan. I got it. That is to say, a simple X API application can make the xserver running without reset.
Frank > -----Original Message----- > From: [email protected] [mailto:xorg- > [email protected]] On Behalf Of Alan > Coopersmith > Sent: 2011?4?28? 15:26 > To: Huang, FrankR > Cc: [email protected] > Subject: Re: Question about the modesetting on X server > > On 04/27/11 10:26 PM, Huang, FrankR wrote: > > Okay. I understand that. But how the X server knows that no cliens are > connected again? > > It keeps a count of open clients, increments it when a new client > connects, decrements it when one disconnects. When it decrements > nClients, if the new value is now 0, then set the flag to reset in > dispatch. > > > 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. > > Start xlogo before running xrandr if you don't want the reset. > Or xclock. Or twm, or any client that doesn't XCloseDisplay() > right away like xrandr, xdpyinfo, xset, etc. do. > > -- > -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 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
