On Thu, Feb 20, 2003 at 09:04:38AM -0700, Micah Dowty wrote:
> On Tue, Feb 18, 2003 at 12:00:50AM +0100, Tomas wrote:
> > hi
> >
> > what is the difference between
> > pgEventLoop()
> > and
> > while (1) pgEventPoll()
> > ?
>
> pgEventLoop() blocks your program and processes all events until pgExitEventLoop()
>is called. pgEventPoll() processes any available events and returns as soon as
>possible. You shouldn't use "while (1) pgEventPoll()" since that will make your
>program use 100% of the CPU checking for new events.
>
sure, about that CPU usage you can think of while (1) { pgEventPoll(); usleep(10000);
} and it behaves same (just less cpu consiming)
my point was that pgEventLoop() behaves different than while(1) { pgEventPoll();
usleep(10000); }
(if you add sleep call to while in the test.c i sent, it will do the same thing)
> >
> > on the first case, when i add some widgets, widgets are shown one by one (i don't
>call pgUpdate) and other widgets are resized
> > on the second case, widgets are not shown until i click any button (even, if that
>button does nothing), but other widgets
> > are resized
>
> Looks like a bug in pgserver, and using "while (1) pgEventPoll()" keeps pgserver
>from getting any CPU for a little while.
>
> >
> >
> > i'm attaching test.c
> > when i click on add button, buttons are resized (on each pgNewWidget(?) and flick)
> > then, when i click dummy button (nothing is binded to dummy), fields apear
> > why ?
> > i thought pgserver displays/removes widgets when pg[Sub]Update is called (?)
> >
> > btw pgserver segfaults when line with /* crash */ comment is present
> > (on my 320x240 ipaq display, where fields would then be outside the screen, and
>only with classique theme)
> >
> > pgserver segfaults as well when option doublebuffer = 1 is present in configfile
>
> I would ask you to file this in the new bug tracker, but it's not working yet :)
> I'll try to take a closer look at this soon.
>
> >
> >
> > could you direct me to place, where the code for adding/removing widgets, updating
>screen and such things is ?
> > (sorry if this mail is little chaotic :)
>
> The code for adding and removing widgets is in pgserver/widget/widget.c
> Layout is mostly handled in pgserver/gcore/div.c
>
thanks
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Pgui-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/pgui-devel
>
> --
> Only you can prevent creeping featurism!
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel