Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h ewins.c icccm.c iconify.c Log Message: Shape is not icccm. Cleanups. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.462 retrieving revision 1.463 diff -u -3 -r1.462 -r1.463 --- E.h 8 Jul 2005 16:48:04 -0000 1.462 +++ E.h 9 Jul 2005 16:42:26 -0000 1.463 @@ -1616,6 +1616,7 @@ EWin *GetFocusEwin(void); EWin *GetContextEwin(void); void SetContextEwin(EWin * ewin); +void EwinUpdateShapeInfo(EWin * ewin); void EwinPropagateShapes(EWin * ewin); void EwinStateUpdate(EWin * ewin); void AddToFamily(EWin * ewin, Window win); @@ -1896,7 +1897,6 @@ void ICCCM_GetGeoms(EWin * ewin, Atom atom_change); void ICCCM_GetInfo(EWin * ewin, Atom atom_change); void ICCCM_GetHints(EWin * ewin, Atom atom_change); -void ICCCM_GetShapeInfo(EWin * ewin); void ICCCM_SetIconSizes(void); void ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -3 -r1.82 -r1.83 --- ewins.c 9 Jul 2005 15:42:04 -0000 1.82 +++ ewins.c 9 Jul 2005 16:42:27 -0000 1.83 @@ -480,6 +480,19 @@ } void +EwinUpdateShapeInfo(EWin * ewin) +{ + EGrabServer(); + ewin->state.shaped = EShapeCopy(ewin->win_container, ewin->client.win); + EUngrabServer(); + +#if 0 /* Debug */ + Eprintf("EwinUpdateShapeInfo %#lx cont=%#lx shaped=%d\n", + ewin->client.win, ewin->win_container, ewin->client.shaped); +#endif +} + +void EwinPropagateShapes(EWin * ewin) { if (!EoIsShown(ewin)) @@ -533,7 +546,7 @@ ICCCM_AdoptStart(ewin); ICCCM_GetTitle(ewin, 0); ICCCM_GetInfo(ewin, 0); - ICCCM_GetShapeInfo(ewin); + EwinUpdateShapeInfo(ewin); ICCCM_GetGeoms(ewin, 0); if (!EwinIsInternal(ewin)) { @@ -1072,13 +1085,11 @@ static void EwinEventConfigureRequest(EWin * ewin, XEvent * ev) { - Window win, winrel; + Window winrel; EWin *ewin2; int x = 0, y = 0, w = 0, h = 0; XWindowChanges xwc; - win = ev->xconfigurerequest.window; - if (ewin) { x = EoGetX(ewin); @@ -1110,30 +1121,7 @@ else if (xwc.stack_mode == Below) LowerEwin(ewin); } - /* else - * XConfigureWindow(disp, EoGetWin(ewin), - * ev->xconfigurerequest.value_mask & - * (CWSibling | CWStackMode), &xwc); */ } -#if 0 /* Let's try disabling this */ - /* this ugly workaround here is because x11amp is very brain-dead */ - /* and sets its minunum and maximm sizes the same - fair enough */ - /* to ensure it doesnt get resized - BUT hwne it shades itself */ - /* it resizes down to a smaller size - of course keeping the */ - /* minimum and maximim size same - E unconditionally disallows any */ - /* client window to be resized outside of its constraints */ - /* (any client could do this resize - not just x11amp thus E is */ - /* imposing the hints x11amp set up - this works around by */ - /* modifying the constraints to fit what the app requested */ - if (w < ewin->client.width.min) - ewin->client.width.min = w; - if (w > ewin->client.width.max) - ewin->client.width.max = w; - if (h < ewin->client.height.min) - ewin->client.height.min = h; - if (h > ewin->client.height.max) - ewin->client.height.max = h; -#endif if (ev->xconfigurerequest.value_mask & (CWX | CWY)) { @@ -1146,19 +1134,6 @@ Mode.move.check = 0; /* Don't restrict client requests */ MoveResizeEwin(ewin, x, y, w, h); Mode.move.check = 1; -#if 0 /* FIXME - Remove? */ - { - char pshaped; - - pshaped = ewin->client.shaped; - ICCCM_GetShapeInfo(ewin); - if (pshaped != ewin->client.shaped) - { - ewin->shapedone = 0; - EwinPropagateShapes(ewin); - } - } -#endif ReZoom(ewin); } else @@ -1170,51 +1145,29 @@ xwc.border_width = ev->xconfigurerequest.border_width; xwc.sibling = ev->xconfigurerequest.above; xwc.stack_mode = ev->xconfigurerequest.detail; - EConfigureWindow(win, ev->xconfigurerequest.value_mask, &xwc); + EConfigureWindow(ev->xconfigurerequest.window, + ev->xconfigurerequest.value_mask, &xwc); } } static void EwinEventResizeRequest(EWin * ewin, XEvent * ev) { - Window win; - int w, h; - - win = ev->xresizerequest.window; - if (ewin) { - w = ev->xresizerequest.width; - h = ev->xresizerequest.height; - ResizeEwin(ewin, w, h); -#if 0 /* FIXME - Remove? */ - { - char pshaped; - - pshaped = ewin->client.shaped; - ICCCM_GetShapeInfo(ewin); - if (pshaped != ewin->client.shaped) - { - ewin->shapedone = 0; - EwinPropagateShapes(ewin); - } - } -#endif + ResizeEwin(ewin, ev->xresizerequest.width, ev->xresizerequest.height); ReZoom(ewin); } else { - EResizeWindow(win, ev->xresizerequest.width, ev->xresizerequest.height); + EResizeWindow(ev->xresizerequest.window, + ev->xresizerequest.width, ev->xresizerequest.height); } } static void EwinEventCirculateRequest(EWin * ewin, XEvent * ev) { - Window win; - - win = ev->xcirculaterequest.window; - if (ewin) { if (ev->xcirculaterequest.place == PlaceOnTop) @@ -1225,9 +1178,9 @@ else { if (ev->xcirculaterequest.place == PlaceOnTop) - ERaiseWindow(win); + ERaiseWindow(ev->xcirculaterequest.window); else - ELowerWindow(win); + ELowerWindow(ev->xcirculaterequest.window); } } @@ -1248,7 +1201,7 @@ static void EwinEventShapeChange(EWin * ewin) { - ICCCM_GetShapeInfo(ewin); + EwinUpdateShapeInfo(ewin); ewin->update.shape = 1; EwinPropagateShapes(ewin); } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -3 -r1.100 -r1.101 --- icccm.c 8 Jul 2005 16:48:07 -0000 1.100 +++ icccm.c 9 Jul 2005 16:42:27 -0000 1.101 @@ -728,19 +728,6 @@ } void -ICCCM_GetShapeInfo(EWin * ewin) -{ - EGrabServer(); - ewin->state.shaped = EShapeCopy(ewin->win_container, ewin->client.win); - EUngrabServer(); - -#if 0 /* Debug */ - Eprintf("ICCCM_GetShapeInfo %#lx cont=%#lx shaped=%d\n", - ewin->client.win, ewin->win_container, ewin->client.shaped); -#endif -} - -void ICCCM_SetIconSizes(void) { XIconSize *is; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.163 retrieving revision 1.164 diff -u -3 -r1.163 -r1.164 --- iconify.c 9 Jul 2005 12:09:39 -0000 1.163 +++ iconify.c 9 Jul 2005 16:42:27 -0000 1.164 @@ -1458,19 +1458,6 @@ EUnmapWindow(ib->arrow2_win); break; } - -#if 0 /* FIXME - Remove? */ - EShapePropagate(ib->win); - if (ib->ewin) - { - const Border *b; - - b = ib->ewin->border; - ICCCM_GetShapeInfo(ib->ewin); - if (ib->ewin->border == b) - EwinPropagateShapes(ib->ewin); - } -#endif } static void @@ -1723,7 +1710,7 @@ EUnmapWindow(ib->icon_win); } EShapePropagate(ib->win); - ICCCM_GetShapeInfo(ib->ewin); + EwinUpdateShapeInfo(ib->ewin); ib->ewin->update.shape = 1; EwinPropagateShapes(ib->ewin); } ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs