Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Tag: branch-exp ewins.c misc.c Log Message: Merge, fixes. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v retrieving revision 1.1.2.20 retrieving revision 1.1.2.21 diff -u -3 -r1.1.2.20 -r1.1.2.21 --- ewins.c 26 Sep 2004 20:09:50 -0000 1.1.2.20 +++ ewins.c 29 Sep 2004 21:13:51 -0000 1.1.2.21 @@ -738,6 +738,16 @@ ewin->desktop = DESKTOPS_WRAP_NUM(ewin->desktop); } + if (ewin->st.fullscreen) + { + ewin->st.fullscreen = 0; + EwinSetFullscreen(ewin, 1); + ewin->client.already_placed = 1; + ShowEwin(ewin); + ecore_x_ungrab(); + EDBUG_RETURN_; + } + ResizeEwin(ewin, ewin->client.w, ewin->client.h); if ((!ewin->client.transient) && (Conf.place.manual) @@ -1792,7 +1802,6 @@ case MapRequest: EwinDeIconify(ewin); break; -#if 0 case ConfigureRequest: EwinEventConfigureRequest(ewin, ev); break; @@ -1802,7 +1811,6 @@ case CirculateRequest: EwinEventCirculateRequest(ewin, ev); break; -#endif default: Eprintf("EwinHandleEventsContainer: type=%2d win=%#lx: %s\n", ev->type, ewin->client.win, EwinGetTitle(ewin)); @@ -1839,6 +1847,7 @@ if (ev->xmap.window == ewin->client.win) EwinEventMap(ewin); break; +#if 0 case ConfigureRequest: if (ev->xconfigurerequest.window == ewin->client.win) EwinEventConfigureRequest(ewin, ev); @@ -1850,6 +1859,7 @@ case CirculateRequest: EwinEventCirculateRequest(ewin, ev); break; +#endif case PropertyNotify: EwinEventPropertyNotify(ewin, ev); break; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/misc.c,v retrieving revision 1.58.2.3 retrieving revision 1.58.2.4 diff -u -3 -r1.58.2.3 -r1.58.2.4 --- misc.c 26 Sep 2004 20:09:51 -0000 1.58.2.3 +++ misc.c 29 Sep 2004 21:13:51 -0000 1.58.2.4 @@ -94,56 +94,54 @@ /* * Stuff to make loops for animated effects. */ -struct timeval etl_tv_last; -static int etl_speed; -static int etl_k1, etl_k2, etl_ki; -static double etl_k; +struct timeval etl_tv_start; +static int etl_k1, etl_k2; +static double etl_k, etl_fac; + +/* + * Return elapsed time in seconds since t0 + */ +static double +ETimeElapsed(struct timeval *t0) +{ + struct timeval tv; + int sec, usec; + + gettimeofday(&tv, NULL); + sec = tv.tv_sec - t0->tv_sec; + usec = tv.tv_usec - t0->tv_usec; + return (double)sec + (((double)usec) / 1000000); +} void ETimedLoopInit(int k1, int k2, int speed) { etl_k1 = k1; etl_k2 = k2; - etl_speed = speed; + if (speed < 500) + speed = 500; + /* When speed is 1000 the loop will take one sec. */ + etl_fac = (k2 - k1) * speed / 1000.; - etl_k = 1.0 * etl_k1; - gettimeofday(&etl_tv_last, NULL); + gettimeofday(&etl_tv_start, NULL); } int ETimedLoopNext(void) { - struct timeval tv; - int dsec, dusec; - double spd, tm; - - etl_ki++; /* Increment iteration count */ + double tm; /* Find elapsed time since loop start */ - gettimeofday(&tv, NULL); - dsec = tv.tv_sec - etl_tv_last.tv_sec; - dusec = tv.tv_usec - etl_tv_last.tv_usec; - etl_tv_last.tv_sec = tv.tv_sec; - etl_tv_last.tv_usec = tv.tv_usec; - if (dusec < 0) - { - dsec--; - dusec += 1000000; - } - tm = (double)dsec + (((double)dusec) / 1000000); - - spd = ((double)etl_speed * tm); - if (spd < 0.001) /* More or less arbitrary limit */ - spd = 0.001; + tm = ETimeElapsed(&etl_tv_start); #if 0 - Eprintf("SlideEwinTo k=%4f tm=%.3f spd=%f\n", etl_k, 1e3 * tm, spd); + Eprintf("ETimedLoopNext k=%4f tm=%.3f\n", etl_k, tm); #endif - etl_k += spd; + etl_k = etl_k1 + tm * etl_fac; CheckEvent(); ecore_x_sync(); - return (int)etl_k; + return etl_k; } /* ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs