Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h hints.c menus.c 


Log Message:
Menu tweaks.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -3 -r1.372 -r1.373
--- E.h 16 Feb 2005 19:48:14 -0000      1.372
+++ E.h 22 Feb 2005 17:40:04 -0000      1.373
@@ -1713,8 +1713,6 @@
 EWin               *FindEwinByDecoration(Window win);
 Button             *FindButton(Window win);
 ActionClass        *FindActionClass(Window win);
-Menu               *FindMenu(Window win);
-EWin               *FindEwinByMenu(Menu * m);
 Group             **ListWinGroups(EWin * ewin, char group_select, int *num);
 EWin              **ListWinGroupMembersForEwin(EWin * ewin, int action,
                                               char nogroup, int *num);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- hints.c     12 Feb 2005 16:16:29 -0000      1.32
+++ hints.c     22 Feb 2005 17:40:15 -0000      1.33
@@ -164,8 +164,7 @@
    GNOME_SetEwinDesk(ewin);
 #endif
 #if ENABLE_EWMH
-   if (ewin->type != EWIN_TYPE_MENU)
-      EWMH_SetWindowDesktop(ewin);
+   EWMH_SetWindowDesktop(ewin);
 #endif
 }
 
@@ -184,8 +183,7 @@
    GNOME_SetHint(ewin);
 #endif
 #if ENABLE_EWMH
-   if (ewin->type != EWIN_TYPE_MENU)
-      EWMH_SetWindowState(ewin);
+   EWMH_SetWindowState(ewin);
 #endif
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- menus.c     20 Feb 2005 23:08:43 -0000      1.169
+++ menus.c     22 Feb 2005 17:40:15 -0000      1.170
@@ -74,6 +74,7 @@
 {
    char               *name;
    char               *title;
+   EWin               *ewin;
    MenuStyle          *style;
    int                 num;
    MenuItem          **items;
@@ -132,7 +133,7 @@
 #endif
 }
 
-Menu               *
+static Menu        *
 FindMenu(Window win)
 {
    Menu               *menu = NULL;
@@ -153,7 +154,8 @@
    return menu;
 }
 
-EWin               *
+#if 0
+static EWin        *
 FindEwinByMenu(Menu * m)
 {
    EWin               *const *ewins;
@@ -168,18 +170,24 @@
 
    return NULL;
 }
+#else
+#define FindEwinByMenu(m) (m->ewin)
+#endif
 
 void
 MenuHide(Menu * m)
 {
-   if (m->win)
-     {
-       EUnmapWindow(m->win);
-       EReparentWindow(m->win, VRoot.win, 0, 0);
-     }
+   EWin               *ewin;
 
    MenuActivateItem(m, NULL);
 
+   ewin = FindEwinByMenu(m);
+   if (ewin)
+      HideEwin(ewin);
+   m->ewin = NULL;
+   if (m->win)
+      EReparentWindow(m->win, VRoot.win, 0, 0);
+
    m->stuck = 0;
    m->shown = 0;
 }
@@ -322,6 +330,7 @@
 
    ewin = AddInternalToFamily(m->win, m->style->border_name, EWIN_TYPE_MENU, m,
                              MenuEwinInit);
+   m->ewin = ewin;
    if (ewin)
      {
        ewin->client.event_mask |= KeyPressMask;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to