Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h events.c focus.c 


Log Message:
Added some configuration request debug stuff.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -3 -r1.207 -r1.208
--- E.h 13 Feb 2004 18:36:50 -0000      1.207
+++ E.h 17 Feb 2004 23:15:52 -0000      1.208
@@ -1973,6 +1973,12 @@
 void                PropagateShapes(Window win);
 
 /* events.c */
+#define ENABLE_DEBUG_EVENTS 1
+#if ENABLE_DEBUG_EVENTS
+int                 EventDebug(unsigned int type);
+#else
+#define             EventDebug(type) 0
+#endif
 void                EventsInit(void);
 void                CheckEvent(void);
 void                WaitEvent(void);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- events.c    10 Feb 2004 18:29:46 -0000      1.50
+++ events.c    17 Feb 2004 23:15:54 -0000      1.51
@@ -27,12 +27,6 @@
 #include <io.h>                        /* EMX select() */
 #endif
 
-#define ENABLE_DEBUG_EVENTS 1
-
-#if ENABLE_DEBUG_EVENTS
-static int          EventDebug(unsigned int type);
-#endif
-
 static int          event_base_shape = 0;
 
 char                throw_move_events_away = 0;
@@ -817,7 +811,7 @@
      }
 }
 
-static int
+int
 EventDebug(unsigned int type)
 {
    return ev_debug && (type < sizeof(ev_debug_flags)) && ev_debug_flags[type];
@@ -888,16 +882,14 @@
      {
      case KeyPress:
      case KeyRelease:
-       printf("EV-%s win=%#lx\n", name, win);
-       break;
+       goto case_common;
      case ButtonPress:
      case ButtonRelease:
        printf("EV-%s win=%#lx state=%#x button=%#x\n", name, win,
               ev->xbutton.state, ev->xbutton.button);
        break;
      case MotionNotify:
-       printf("EV-%s win=%#lx\n", name, win);
-       break;
+       goto case_common;
      case EnterNotify:
      case LeaveNotify:
        printf("EV-%s win=%#lx m=%s d=%s\n", name, win,
@@ -922,13 +914,25 @@
      case MapRequest:
      case ReparentNotify:
      case ConfigureNotify:
+       goto case_common;
      case ConfigureRequest:
+       printf("EV-%s: win=%#lx m=%#lx %d+%d %dx%d bw=%d above=%#lx stk=%d\n",
+              name, win,
+              ev->xconfigurerequest.value_mask,
+              ev->xconfigurerequest.x, ev->xconfigurerequest.y,
+              ev->xconfigurerequest.width, ev->xconfigurerequest.height,
+              ev->xconfigurerequest.border_width,
+              ev->xconfigurerequest.above, ev->xconfigurerequest.detail);
+       break;
      case GravityNotify:
+       goto case_common;
      case ResizeRequest:
+       printf("EV-%s: win=%#lx %dx%d\n",
+              name, win, ev->xresizerequest.width, ev->xresizerequest.height);
+       break;
      case CirculateNotify:
      case CirculateRequest:
-       printf("EV-%s win=%#lx\n", name, win);
-       break;
+       goto case_common;
      case PropertyNotify:
        txt = XGetAtomName(disp, ev->xproperty.atom);
        printf("EV-%s: win=%#lx Atom=%s(%ld)\n",
@@ -939,8 +943,7 @@
      case SelectionRequest:
      case SelectionNotify:
      case ColormapNotify:
-       printf("EV-%s win=%#lx\n", name, win);
-       break;
+       goto case_common;
      case ClientMessage:
        txt = XGetAtomName(disp, ev->xclient.message_type);
        printf
@@ -951,6 +954,7 @@
        XFree(txt);
        break;
      case MappingNotify:
+      case_common:
        printf("EV-%s win=%#lx\n", name, win);
        break;
      default:
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- focus.c     16 Feb 2004 22:58:21 -0000      1.48
+++ focus.c     17 Feb 2004 23:15:54 -0000      1.49
@@ -161,13 +161,15 @@
    int                 do_follow = 0;
 
    EDBUG(4, "FocusToEWin");
-#if 0
-   if (ewin)
-      printf("FocusToEWin %#lx %s why=%d\n", ewin->client.win,
-            ewin->client.name, why);
-   else
-      printf("FocusToEWin None why=%d\n", why);
-#endif
+
+   if (EventDebug(50))
+     {
+       if (ewin)
+          printf("FocusToEWin %#lx %s why=%d\n", ewin->client.win,
+                 ewin->client.name, why);
+       else
+          printf("FocusToEWin None why=%d\n", why);
+     }
 
    switch (why)
      {




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to