[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Too many Ecore events stop the Ecore's main loop?

On Sun, 2 Jul 2006 18:40:50 +0200 Simon TRENY <simon.treny@free.fr> babbled:

> Hi everyone,
> In Etk, in order to update the widgets when the window is resized, I
> use an ecore job: in the Ecore_Evas's resize_cb, I just create an
> "update job" with ecore_job_add() if there is no "update job" created
> yet. This job will resize the widgets.
> My problem is that if the window is resized too often (i.e. if I drag
> the bottom-right corner of the window, and draw small circles with the
> mouse to resize the window), the "update job" is not called anymore.
> When I stop resizing, the job is called again.

actually you want to delete the old job, and add a new one each time you get a
resize (if an existing job is around). jobs basically piggyback the events
system and place an internal event on the queue that will get processed after
all current events int he queue are done (but before any new events e finds).
they don't use idlers and idle_enterers.

> I wrote a small code (attached to this mail) to illustrate the problem.
> Just try to resize the window of the test prog (by "drawing small
> circles" witht the mouse), and you'll see that sooner or later, the job
> won't be called anymore (no more output in the terminal and the purple
> rectangle is no longer resized). Jobs are not the only ones affected by
> this problem, I tried with timers and animators, they are also not
> called. Ecore's main loop just seems to be stopped when the window is
> resized?!
> For info, my CPU is an Athlon XP 2700+
> Could you explain me why this happens?

let me test and see. ok - i did this for about a minute (resizing in small
circles) - still working... damn.

> Regards,
> Simon TRENY <MoOm>

------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
Tokyo, Japan (東京 日本)