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

[E-devel] e_border patch against property change events when moving windows



Hello,

I saw that there are property events send if windows were moved, but
for this there is already the border move event. As far as I see it, no
app uses the property change event to listen for window moves, and if
so it probably shouldn´t. 

Here is a 3 liner patch to omit this behavior.


Hannes
Index: e_border.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.521
diff -u -r1.521 e_border.c
--- e_border.c	7 Aug 2006 20:25:34 -0000	1.521
+++ e_border.c	11 Aug 2006 13:07:10 -0000
@@ -4663,10 +4663,12 @@
 
 static void
 _e_border_eval(E_Border *bd)
-{
+{	
    E_Event_Border_Property *event;
    int change_urgent = 0;
    int rem_change = 0;
+   int send_event = 1;
+   
    
    /* fetch any info queued to be fetched */
    if (bd->client.icccm.fetch.client_leader)
@@ -5834,6 +5836,7 @@
 	e_container_shape_move(bd->shape, bd->x, bd->y);
 	bd->changes.pos = 0;
 	rem_change = 1;
+	send_event = 0;
      }
    else if (bd->changes.size)
      {
@@ -6223,11 +6226,13 @@
    if ((bd->remember) && (rem_change))
      e_remember_update(bd->remember, bd);
 
-
-   event = calloc(1, sizeof(E_Event_Border_Property));
-   event->border = bd;
-   e_object_ref(E_OBJECT(bd));
-   ecore_event_add(E_EVENT_BORDER_PROPERTY, event, _e_border_event_border_property_free, NULL);
+   if(send_event)
+   {
+   	event = calloc(1, sizeof(E_Event_Border_Property));
+   	event->border = bd;
+   	e_object_ref(E_OBJECT(bd));
+   	ecore_event_add(E_EVENT_BORDER_PROPERTY, event, _e_border_event_border_property_free, NULL);
+   }
 }
 
 static void