Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
pager.c
Log Message:
Delay pager snapshots.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- pager.c 8 Jul 2005 16:48:09 -0000 1.155
+++ pager.c 9 Jul 2005 22:57:19 -0000 1.156
@@ -48,7 +48,7 @@
Window sel_win;
/* State flags */
- char timeout_pending;
+ char scan_pending;
char do_newbg;
char do_update;
int x1, y1, x2, y2;
@@ -65,6 +65,7 @@
#define PAGER_EVENT_MOTION 0
#define PAGER_EVENT_MOUSE_IN 1
+static void PagerScanTimeout(int val, void *data);
static void PagerUpdateTimeout(int val, void *data);
static void PagerCheckUpdate(Pager * p);
static void PagerEwinUpdateFromPager(Pager * p, EWin * ewin);
@@ -151,16 +152,16 @@
{
char s[128];
- if (p->timeout_pending || Conf.pagers.scanspeed <= 0)
+ if (p->scan_pending || Conf.pagers.scanspeed <= 0)
return;
- Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
- DoIn(s, 1 / ((double)Conf.pagers.scanspeed), PagerUpdateTimeout, 0, p);
- p->timeout_pending = 1;
+ Esnprintf(s, sizeof(s), "pg-scan.%x", (unsigned)p->win);
+ DoIn(s, 1 / ((double)Conf.pagers.scanspeed), PagerScanTimeout, 0, p);
+ p->scan_pending = 1;
}
static void
-PagerUpdateTimeout(int val __UNUSED__, void *data)
+PagerScanTimeout(int val __UNUSED__, void *data)
{
Pager *p;
EWin *ewin;
@@ -171,7 +172,7 @@
return;
p = (Pager *) data;
- p->timeout_pending = 0;
+ p->scan_pending = 0;
ewin = p->ewin;
if (!ewin || !EoIsShown(ewin))
@@ -415,6 +416,12 @@
p->do_update = 1;
pager_update_pending = 1;
+
+ if (!Conf.pagers.snap)
+ return;
+
+ RemoveTimerEvent("pg-upd");
+ DoIn("pg-upd", .2, PagerUpdateTimeout, 0, NULL);
}
static void
@@ -690,9 +697,6 @@
static void
PagerCheckUpdate(Pager * p)
{
- if (Mode.mode != MODE_NONE)
- return;
-
if (p->do_newbg)
{
PagerUpdateBg(p);
@@ -713,6 +717,8 @@
if (!pager_update_pending || !Conf.pagers.enable)
return;
+ if (Mode.mode != MODE_NONE && Conf.pagers.snap)
+ return;
pl = (Pager **) ListItemType(&num, LIST_TYPE_PAGER);
if (!pl)
@@ -725,6 +731,12 @@
}
static void
+PagerUpdateTimeout(int val __UNUSED__, void *data __UNUSED__)
+{
+ PagersCheckUpdate();
+}
+
+static void
PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
{
int x, y, w, h;
@@ -2212,7 +2224,8 @@
break;
case ESIGNAL_IDLE:
- PagersCheckUpdate();
+ if (!Conf.pagers.snap)
+ PagersCheckUpdate();
break;
case ESIGNAL_AREA_CONFIGURED:
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs