Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h desktops.c eobj.c menus.c Log Message: Fix menu event masker. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.345 retrieving revision 1.346 diff -u -3 -r1.345 -r1.346 --- E.h 12 Jan 2005 23:09:58 -0000 1.345 +++ E.h 21 Jan 2005 20:12:05 -0000 1.346 @@ -1548,11 +1548,10 @@ /* eobj.c */ void EobjInit(EObj * eo, int type, int x, int y, int w, int h); -#if USE_COMPOSITE -EObj *EobjCreate(Window win, int type); -void EobjDestroy(EObj * eo); EObj *EobjRegister(Window win, int type); void EobjUnregister(Window win); + +#if USE_COMPOSITE Pixmap EobjGetPixmap(const EObj * eo); void EobjChangeOpacity(EObj * eo, unsigned int opacity); #endif =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -3 -r1.113 -r1.114 --- desktops.c 12 Jan 2005 23:09:59 -0000 1.113 +++ desktops.c 21 Jan 2005 20:12:10 -0000 1.114 @@ -1310,10 +1310,6 @@ continue; _APPEND_TO_WIN_LIST(eo->win); -#if 0 /* FIXME */ - if (EoGetWin(ewin) == Mode.menus.win_covered) - _APPEND_TO_WIN_LIST(Mode.menus.cover_win); -#endif } if (EventDebug(EDBUG_TYPE_STACKING)) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/eobj.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- eobj.c 11 Jan 2005 23:29:04 -0000 1.8 +++ eobj.c 21 Jan 2005 20:12:11 -0000 1.9 @@ -158,8 +158,7 @@ #endif } -#if USE_COMPOSITE -EObj * +static EObj * EobjCreate(Window win, int type) { EObj *eo; @@ -167,8 +166,10 @@ if (!XGetWindowAttributes(disp, win, &attr)) return NULL; +#if 0 if (!attr.override_redirect) return NULL; +#endif eo = Ecalloc(1, sizeof(EObj)); @@ -179,7 +180,7 @@ return eo; } -void +static void EobjDestroy(EObj * eo) { _EFREE(eo->name); @@ -219,15 +220,20 @@ eo = EobjListStackFind(win); if (!eo) return; +#if 0 if (eo->type != EOBJ_TYPE_OVERR) return; +#endif if (EventDebug(EDBUG_TYPE_EWINS)) Eprintf("EobjUnregister: %#lx %s\n", win, eo->name); EobjListStackDel(eo); + + EobjDestroy(eo); } +#if USE_COMPOSITE Pixmap EobjGetPixmap(const EObj * eo) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v retrieving revision 1.159 retrieving revision 1.160 diff -u -3 -r1.159 -r1.160 --- menus.c 9 Jan 2005 22:36:01 -0000 1.159 +++ menus.c 21 Jan 2005 20:12:11 -0000 1.160 @@ -1013,22 +1013,24 @@ ewin = FindEwinByMenu(m); if ((ewin) && (!Mode_menus.cover_win)) { - Window parent; - Window wl[2]; + EObj *eo; - parent = ewin->parent; Mode_menus.cover_win = - ECreateEventWindow(parent, 0, 0, VRoot.w, VRoot.h); + ECreateEventWindow(ewin->parent, 0, 0, VRoot.w, VRoot.h); Mode_menus.win_covered = EoGetWin(ewin); - wl[0] = Mode_menus.win_covered; - wl[1] = Mode_menus.cover_win; + eo = EobjRegister(Mode_menus.cover_win, EOBJ_TYPE_OTHER); + EobjSetDesk(eo, EoGetDesk(ewin)); + EobjSetLayer(eo, 20); + EobjListStackLower(eo); XSelectInput(disp, Mode_menus.cover_win, ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask); - XRestackWindows(disp, wl, 2); EMapWindow(disp, Mode_menus.cover_win); EventCallbackRegister(Mode_menus.cover_win, 0, MenuMaskerHandleEvents, NULL); +#if 1 /* FIXME - Too expensive */ + StackDesktop(EoGetDesk(ewin)); +#endif } } @@ -1037,6 +1039,7 @@ { if (Mode_menus.cover_win) { + EobjUnregister(Mode_menus.cover_win); EDestroyWindow(disp, Mode_menus.cover_win); Mode_menus.cover_win = 0; Mode_menus.win_covered = 0; ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs