[patch] mainloop
- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: [patch] mainloop
- Date: Sat, 18 Oct 1997 08:48:24 -0400
This patch makes some fairly major changes to the GTK mainloop. The
main effective difference is that the mainloop can be called
recursively from within a timeout or idle function. This probably
isn't too useful for GTK programs in general, but it is meant to allow
to allow the gtk mainloop to be used for hybrid GTK/ILU programs.
It also fixes a problem where if the gtk_main_quit() was called from
a timeout, it wouldn't take effect until after the next events.
As before, little effort is made to make sure that timers go off
exactly at the assigned time. If people feel this is important, it
could be fixed at the cost of another system call (gettimeofday()) per
main loop iteration. (~5-6 microseconds on my system.)
I've tested the timeouts pretty extensively, the idles less so. If
you use such things extensively in your programs, you might want to
give a spin and see if it breaks anything.
Regards,
Owen
begin 644 gtk+970925-otaylor-mainloop.patch.gz
M'XL("+&K2#0``V=T:RLY-S`Y,C4M;W1A>6QO<BUM86EN;&]O<"YP871C:`#M
M7%MOVSH2?G9^!=.'UA<YM>1[LRE0'/1T#]"]X+1%]\U0+-I68TN&K"3-%OGO
M2PXO(BE25APWW18GZ,46A^1P+M\,R5&B>+%`W7^C[AQU,]3]#]J&^7S5Q5_G
MZ^L(HV5^U9F.>]-@>)9F\?(E^4[_;L(X.9LKK7K#2;O=KN[:^(PC]`%O43!`
M0?"J/WTU'"-_.AV?=+M=Y[C0ZU_S'/E#\H=T>=7KL5YM_0<8&$V]\0#!5SHH
M_3I"Y%/W!"'R9Y>'>3Q'-VD<(3KC#'^-\]GB.IDC]M.D3:US&VD>;W!ZG<_B
M9(>SG)"^RZ\^LF>_DP'R.$U0FQ,MR!"=\A"K,(G6>#:_SC*<Y&+$'6HNK^,D
M[P<H7V%X6JM[3+Z0OG9N.6TQA7MAG)0.MT\&RJB92FI3Q63@37VF"CD2627Y
M&^=QN([_2_1Z@7Y_\_[#6V6N=]'5VQNR.I3@K_D,TX^V5B$#3M"5!/G5YSA:
MXARUH6EV"]_L%,LLO)0$<HXE97(5WF`VN(7'@J)@4B4#TY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