Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h borders.c events.c evhandlers.c focus.c icccm.c menus.c 


Log Message:
Bits and pieces - no actual changes.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -3 -r1.307 -r1.308
--- E.h 15 Jul 2004 18:23:37 -0000      1.307
+++ E.h 15 Jul 2004 23:31:00 -0000      1.308
@@ -1809,6 +1809,7 @@
 void                EwinBorderUpdateState(EWin * ewin);
 void                EwinEventDestroy(EWin * ewin);
 void                EwinEventMap(EWin * ewin);
+void                EwinEventVisibility(EWin * ewin, int on);
 void                EwinEventUnmap(EWin * ewin);
 void                MoveEwinToArea(EWin * ewin, int ax, int ay);
 int                 EwinGetDesk(const EWin * ewin);
@@ -2118,6 +2119,7 @@
 void                HandleFocusIn(XEvent * ev);
 void                HandleFocusOut(XEvent * ev);
 void                HandleExpose(XEvent * ev);
+void                HandleVisibilityNotify(XEvent * ev);
 void                HandleDestroy(XEvent * ev);
 void                HandleUnmap(XEvent * ev);
 void                HandleMap(XEvent * ev);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -3 -r1.217 -r1.218
--- borders.c   15 Jul 2004 18:23:53 -0000      1.217
+++ borders.c   15 Jul 2004 23:31:00 -0000      1.218
@@ -1630,6 +1630,11 @@
    EwinWithdraw(ewin);
 }
 
+void
+EwinEventVisibility(EWin * ewin __UNUSED__, int state __UNUSED__)
+{
+}
+
 static void
 EwinBorderSetTo(EWin * ewin, Border * b)
 {
@@ -1830,7 +1835,7 @@
 {
    int                 x, y;
 
-   if (ewin->state != EWIN_STATE_MAPPED)
+   if (!EwinIsMapped(ewin))
       return;
 
    x = ewin->x;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- events.c    31 May 2004 19:47:34 -0000      1.68
+++ events.c    15 Jul 2004 23:31:01 -0000      1.69
@@ -169,6 +169,7 @@
      case NoExpose:            /* 14 */
        break;
      case VisibilityNotify:    /* 15 */
+       HandleVisibilityNotify(ev);
        break;
      case CreateNotify:        /* 16 */
        break;
@@ -654,8 +655,10 @@
      case Expose:
      case GraphicsExpose:
      case NoExpose:
-     case VisibilityNotify:
        goto case_common;
+     case VisibilityNotify:
+       Eprintf("EV-%s win=%#lx state=%d\n", name, win, ev->xvisibility.state);
+       break;
      case CreateNotify:
      case DestroyNotify:
      case UnmapNotify:
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -3 -r1.172 -r1.173
--- evhandlers.c        15 Jul 2004 18:23:53 -0000      1.172
+++ evhandlers.c        15 Jul 2004 23:31:01 -0000      1.173
@@ -687,6 +687,23 @@
 }
 
 void
+HandleVisibilityNotify(XEvent * ev)
+{
+   Window              win = ev->xvisibility.window;
+   EWin               *ewin;
+
+   EDBUG(5, "HandleVisibilityNotify");
+
+   ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   if (ewin)
+     {
+       EwinEventVisibility(ewin, ev->xvisibility.state);
+     }
+
+   EDBUG_RETURN_;
+}
+
+void
 HandleDestroy(XEvent * ev)
 {
    Window              win = ev->xdestroywindow.window;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- focus.c     12 Jul 2004 23:24:36 -0000      1.74
+++ focus.c     15 Jul 2004 23:31:01 -0000      1.75
@@ -33,7 +33,7 @@
    if (ewin->skipfocus || ewin->neverfocus || ewin->shaded || ewin->iconified)
       return 0;
 
-   if (ewin->state != EWIN_STATE_MAPPED)
+   if (!EwinIsMapped(ewin))
       return 0;
 
    return EwinIsOnScreen(ewin);
@@ -280,7 +280,10 @@
 
    /* NB! ewin != NULL */
 
-   if (ewin->iconified || ewin->neverfocus)
+   if (ewin->neverfocus)
+      EDBUG_RETURN_;
+
+   if (ewin->iconified)
       EDBUG_RETURN_;
 
    if (!ewin->client.need_input)
@@ -328,11 +331,11 @@
    if (Mode.focuswin)
       FocusEwinSetActive(Mode.focuswin, 0);
    ICCCM_Cmap(ewin);
-   ICCCM_Focus(ewin);
    Mode.focuswin = ewin;
    /* Set new focus window (if any) highlighting */
    if (Mode.focuswin)
       FocusEwinSetActive(Mode.focuswin, 1);
+   ICCCM_Focus(ewin);
 
    EDBUG_RETURN_;
 }
@@ -435,47 +438,6 @@
       FocusToEWin(NULL, FOCUS_SET);
 }
 
-#if 0                          /* Remove old code */
-void
-FocusHandleEnter(XEvent * ev)
-{
-   /*
-    * multi screen handling -- root windows receive
-    * enter / leave notify
-    */
-   if (ev->xany.window == VRoot.win)
-     {
-       if (!Mode.focuswin || Conf.focus.mode == MODE_FOCUS_POINTER)
-          HandleFocusWindow(0);
-     }
-   else
-     {
-       HandleFocusWindow(ev->xcrossing.window);
-     }
-}
-
-void
-FocusHandleLeave(XEvent * ev)
-{
-   /*
-    * If we are leaving the root window, we are switching
-    * screens on a multi screen system - need to unfocus
-    * to allow other desk to grab focus...
-    */
-   if (ev->xcrossing.window == VRoot.win)
-     {
-       if (ev->xcrossing.mode == NotifyNormal
-           && ev->xcrossing.detail != NotifyInferior && Mode.focuswin)
-          HandleFocusWindow(0);
-       else
-          HandleFocusWindow(ev->xcrossing.window);
-     }
-/* THIS caused the "emacs focus bug" ? */
-/*      else */
-/*      HandleFocusWindow(ev->xcrossing.window); */
-}
-#endif
-
 void
 FocusHandleClick(Window win)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- icccm.c     13 Jul 2004 17:15:20 -0000      1.75
+++ icccm.c     15 Jul 2004 23:31:01 -0000      1.76
@@ -71,7 +71,7 @@
 }
 
 static void
-ICCCM_ClientMessageSend(Window win, Atom atom)
+ICCCM_ClientMessageSend(Window win, Atom atom, Time ts)
 {
    XEvent              ev;
 
@@ -80,7 +80,7 @@
    ev.xclient.message_type = E_XA_WM_PROTOCOLS;
    ev.xclient.format = 32;
    ev.xclient.data.l[0] = atom;
-   ev.xclient.data.l[1] = CurrentTime;
+   ev.xclient.data.l[1] = ts;
    XSendEvent(disp, win, False, 0, &ev);
 }
 
@@ -197,7 +197,8 @@
      }
 
    if (ewin->client.delete_window)
-      ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_DELETE_WINDOW);
+      ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_DELETE_WINDOW,
+                             CurrentTime);
    else
       XKillClient(disp, (XID) ewin->client.win);
 
@@ -212,7 +213,8 @@
    if (ewin->internal)
       EDBUG_RETURN_;
 
-   ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_SAVE_YOURSELF);
+   ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_SAVE_YOURSELF,
+                          CurrentTime);
 
    EDBUG_RETURN_;
 }
@@ -224,10 +226,10 @@
 
    EDBUG(6, "ICCCM_Iconify");
 
+   EUnmapWindow(disp, ewin->client.win);
    XChangeProperty(disp, ewin->client.win, E_XA_WM_STATE, E_XA_WM_STATE,
                   32, PropModeReplace, (unsigned char *)c, 2);
    AddItem(ewin, "ICON", ewin->client.win, LIST_TYPE_ICONIFIEDS);
-   EUnmapWindow(disp, ewin->client.win);
 
    EDBUG_RETURN_;
 }
@@ -239,10 +241,10 @@
 
    EDBUG(6, "ICCCM_DeIconify");
 
+   EMapWindow(disp, ewin->client.win);
    XChangeProperty(disp, ewin->client.win, E_XA_WM_STATE, E_XA_WM_STATE,
                   32, PropModeReplace, (unsigned char *)c, 2);
    RemoveItem("ICON", ewin->client.win, LIST_FINDBY_BOTH, LIST_TYPE_ICONIFIEDS);
-   EMapWindow(disp, ewin->client.win);
 
    EDBUG_RETURN_;
 }
@@ -481,6 +483,15 @@
 {
    EDBUG(6, "ICCCM_Focus");
 
+   if (EventDebug(EDBUG_TYPE_FOCUS))
+     {
+       if (ewin)
+          Eprintf("ICCCM_Focus %#lx %s\n", ewin->client.win,
+                  EwinGetTitle(ewin));
+       else
+          Eprintf("ICCCM_Focus None\n");
+     }
+
    if (!ewin)
      {
        XSetInputFocus(disp, VRoot.win, RevertToPointerRoot, CurrentTime);
@@ -489,8 +500,13 @@
      }
 
    if (ewin->client.take_focus)
-      ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_TAKE_FOCUS);
+     {
+       ICCCM_ClientMessageSend(ewin->client.win, E_XA_WM_TAKE_FOCUS,
+                               CurrentTime);
+     }
+
    XSetInputFocus(disp, ewin->client.win, RevertToPointerRoot, CurrentTime);
+
    HintsSetActiveWindow(ewin->client.win);
 
    EDBUG_RETURN_;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- menus.c     14 Jul 2004 19:05:30 -0000      1.146
+++ menus.c     15 Jul 2004 23:31:02 -0000      1.147
@@ -2376,7 +2376,7 @@
        if (!m || m->num <= 0)
           break;
        ewin = FindEwinByMenu(m);
-       if (ewin == NULL || ewin->state != EWIN_STATE_MAPPED)
+       if (ewin == NULL || !EwinIsMapped(ewin))
           break;
        mi = m->items[0];
        goto check_menu;




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to