Enlightenment CVS committal
Author : xcomputerman
Project : e17
Module : proto
Dir : e17/proto/esmart/src/trans
Modified Files:
esmart_trans.c
Log Message:
Partially resolve issues with sticky windows switching across multiple
desktops. Still not getting notifies when returning to desktop 0, but
I don't have enough time left to hunt that critter down.
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/esmart/src/trans/esmart_trans.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- esmart_trans.c 24 Apr 2004 05:51:16 -0000 1.16
+++ esmart_trans.c 24 Apr 2004 06:35:00 -0000 1.17
@@ -19,6 +19,7 @@
Evas_Object *obj;
Ecore_X_Window win;
Ecore_X_Pixmap pmap_id;
+ Ecore_Timer *timer;
} Esmart_Trans_Object;
static Evas_Smart * _esmart_trans_x11_smart_get(void);
@@ -48,6 +49,17 @@
static Ecore_Event_Handler *_root_prop_hnd = NULL;
+static int
+_esmart_trans_x11_timer_cb(void *data)
+{
+ Esmart_Trans_Object *o;
+
+ o = (Esmart_Trans_Object *) data;
+ esmart_trans_x11_freshen(o->obj, o->x, o->y, o->w, o->h);
+ o->timer = NULL;
+ return 0;
+}
+
static Esmart_Trans_Object *
_esmart_trans_x11_object_find(Evas_Object *o)
{
@@ -292,7 +304,8 @@
{
if(_root_prop_hnd)
ecore_event_handler_del(_root_prop_hnd);
- ecore_x_event_mask_unset(old_root, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
+ if (old_root != DefaultRootWindow(ecore_x_display_get()))
+ ecore_x_event_mask_unset(old_root, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
ecore_x_event_mask_set(root, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
old_root = root;
}
@@ -363,7 +376,7 @@
return TRUE;
e = (Ecore_X_Event_Window_Property *) event;
-
+
if (e->win == root && (e->atom == rootpmap || e->atom == rootcolor
|| e->atom == x_current_desktop
|| e->atom == enlightenment_desktop))
@@ -374,11 +387,17 @@
Esmart_Trans_Object *o;
o = (Esmart_Trans_Object *) n->data;
/* For desktop changes, do not freshen non-sticky windows */
+#if 0
if ((e->atom == x_current_desktop || e->atom == enlightenment_desktop)
&& !(ecore_x_window_prop_state_isset(e->win,
ECORE_X_WINDOW_STATE_STICKY)))
continue;
- esmart_trans_x11_freshen(o->obj, o->x, o->y, o->w, o->h);
+#endif
+ /* Use timer to avoid consecutive events causing refreshes */
+ if (o->timer)
+ continue;
+ else
+ o->timer = ecore_timer_add(0.5, _esmart_trans_x11_timer_cb, o);
}
}
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs