Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Tag: branch-exp E.h comms.c desktops.c events.c ewins.c focus.c grabs.c moveresize.c session.c setup.c x.c Log Message: Merge+fix. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.314.2.63 retrieving revision 1.314.2.64 diff -u -3 -r1.314.2.63 -r1.314.2.64 --- E.h 23 Nov 2004 23:46:20 -0000 1.314.2.63 +++ E.h 28 Nov 2004 17:51:33 -0000 1.314.2.64 @@ -2222,6 +2222,9 @@ Display *EDisplayOpen(const char *dstr); void EDisplayClose(void); void EDisplayDisconnect(void); + +void ERegisterWindow(Window win); +void EUnregisterWindow(Window win); typedef void (EventCallbackFunc) (XEvent * ev, void *prm); void EventCallbackRegister(Window win, int type, EventCallbackFunc * func, void *prm); @@ -2237,8 +2240,6 @@ void EMoveResizeWindow(Display * d, Window win, int x, int y, int w, int h); void EDestroyWindow(Display * d, Window win); -void ERegisterWindow(Display * d, Window win); -void EUnregisterWindow(Display * d, Window win); void EMapWindow(Display * d, Window win); void EUnmapWindow(Display * d, Window win); void EShapeCombineMask(Display * d, Window win, int dest, int x, =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/comms.c,v retrieving revision 1.62.2.4 retrieving revision 1.62.2.5 diff -u -3 -r1.62.2.4 -r1.62.2.5 --- comms.c 10 Oct 2004 11:17:36 -0000 1.62.2.4 +++ comms.c 28 Nov 2004 17:51:34 -0000 1.62.2.5 @@ -55,7 +55,7 @@ Esnprintf(st, sizeof(st), "%8x", (int)win); c->name = Estrdup(st); c->win = win; - ERegisterWindow(disp, win); + ERegisterWindow(win); EventCallbackRegister(win, 0, ClientHandleEvents, c); AddItem(c, st, win, LIST_TYPE_CLIENT); XSelectInput(disp, win, StructureNotifyMask | SubstructureNotifyMask); @@ -76,7 +76,7 @@ win = c->win; RemoveItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT); EventCallbackUnregister(win, 0, ClientHandleEvents, c); - EUnregisterWindow(disp, win); + EUnregisterWindow(win); if (c->name) Efree(c->name); if (c->msg) @@ -266,7 +266,7 @@ EDBUG(5, "CommsSetup"); comms_win = XCreateSimpleWindow(disp, VRoot.win, -100, -100, 5, 5, 0, 0, 0); - ERegisterWindow(disp, comms_win); + ERegisterWindow(comms_win); XSelectInput(disp, comms_win, StructureNotifyMask | SubstructureNotifyMask); EventCallbackRegister(comms_win, 0, ClientHandleEvents, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v retrieving revision 1.95.2.30 retrieving revision 1.95.2.31 diff -u -3 -r1.95.2.30 -r1.95.2.31 --- desktops.c 26 Nov 2004 16:42:58 -0000 1.95.2.30 +++ desktops.c 28 Nov 2004 17:51:34 -0000 1.95.2.31 @@ -1399,12 +1399,12 @@ { ActionClass *ac; - XUngrabPointer(disp, CurrentTime); - /* Don't handle desk bindings while doing stuff */ if (Mode.mode) return; + GrabPointerRelease(); + ac = FindItem("DESKBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS); if (ac) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v retrieving revision 1.69.2.20 retrieving revision 1.69.2.21 diff -u -3 -r1.69.2.20 -r1.69.2.21 --- events.c 26 Nov 2004 16:42:58 -0000 1.69.2.20 +++ events.c 28 Nov 2004 17:51:34 -0000 1.69.2.21 @@ -183,8 +183,27 @@ case KeyRelease: case ButtonPress: case ButtonRelease: + goto do_stuff; case EnterNotify: + Mode.context_win = ev->xany.window; + if (ev->xcrossing.mode == NotifyGrab && + ev->xcrossing.detail == NotifyInferior) + { + Mode.grabs.pointer_grab_window = ev->xany.window; + if (!Mode.grabs.pointer_grab_active) + Mode.grabs.pointer_grab_active = 2; + } + goto do_stuff; case LeaveNotify: + if (ev->xcrossing.mode == NotifyGrab && + ev->xcrossing.detail == NotifyInferior) + { + Mode.grabs.pointer_grab_window = None; + Mode.grabs.pointer_grab_active = 0; + } + goto do_stuff; + + do_stuff: TooltipsHandleEvent(); /* TBD */ #if 0 /* FIXME - Why? */ @@ -275,7 +294,7 @@ ActionsHandleMotion(); break; case EnterNotify: /* 7 */ - Mode.context_win = ev->xany.window; + break; case LeaveNotify: /* 8 */ break; case MapRequest: /* 20 */ @@ -331,7 +350,7 @@ #if 1 /* Do this here? */ case DestroyNotify: - EUnregisterWindow(disp, ev->xdestroywindow.window); + EUnregisterWindow(ev->xdestroywindow.window); break; #endif } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v retrieving revision 1.1.2.30 retrieving revision 1.1.2.31 diff -u -3 -r1.1.2.30 -r1.1.2.31 --- ewins.c 23 Nov 2004 23:46:26 -0000 1.1.2.30 +++ ewins.c 28 Nov 2004 17:51:34 -0000 1.1.2.31 @@ -134,7 +134,7 @@ EventCallbackRegister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin); EventCallbackRegister(ewin->win_container, 0, EwinHandleEventsContainer, ewin); - ERegisterWindow(disp, ewin->client.win); + ERegisterWindow(ewin->client.win); EventCallbackRegister(ewin->client.win, 0, EwinHandleEventsClient, ewin); ModulesSignal(ESIGNAL_EWIN_CREATE, ewin); @@ -157,6 +157,8 @@ RemoveItem(NULL, ewin->client.win, LIST_FINDBY_ID, LIST_TYPE_EWIN); EventCallbackUnregister(ewin->client.win, 0, EwinHandleEventsClient, ewin); + if (!EwinIsInternal(ewin)) + EUnregisterWindow(ewin->client.win); EobjListStackDel(&ewin->o); EobjListFocusDel(&ewin->o); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v retrieving revision 1.81.2.11 retrieving revision 1.81.2.12 diff -u -3 -r1.81.2.11 -r1.81.2.12 --- focus.c 21 Nov 2004 22:15:21 -0000 1.81.2.11 +++ focus.c 28 Nov 2004 17:51:34 -0000 1.81.2.12 @@ -472,6 +472,8 @@ FocusToEWin(ewin, FOCUS_CLICK); /* allow click to pass thorugh */ + if (EventDebug(EDBUG_TYPE_GRABS)) + Eprintf("FocusHandleClick %#lx %#lx\n", win, ewin->win_container); if (win == ewin->win_container) { ecore_x_sync(); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/grabs.c,v retrieving revision 1.17.2.6 retrieving revision 1.17.2.7 diff -u -3 -r1.17.2.6 -r1.17.2.7 --- grabs.c 20 Nov 2004 20:48:57 -0000 1.17.2.6 +++ grabs.c 28 Nov 2004 17:51:34 -0000 1.17.2.7 @@ -43,9 +43,6 @@ int ret = -1; Window confine_to = (confine) ? win : None; - if (Mode.grabs.pointer_grab_active) - goto done; - ret = XGrabPointer(disp, win, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask, @@ -55,7 +52,6 @@ Mode.grabs.pointer_grab_window = win; Mode.grabs.pointer_grab_active = 1; - done: if (EventDebug(EDBUG_TYPE_GRABS)) Eprintf("GrabPointerSet: %#lx, ret=%d\n", Mode.grabs.pointer_grab_window, ret); @@ -66,12 +62,8 @@ void GrabPointerRelease(void) { - if (!Mode.grabs.pointer_grab_active) - goto done; - XUngrabPointer(disp, CurrentTime); - done: if (EventDebug(EDBUG_TYPE_GRABS)) Eprintf("GrabPointerRelease: %#lx\n", Mode.grabs.pointer_grab_window); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v retrieving revision 1.22.2.14 retrieving revision 1.22.2.15 diff -u -3 -r1.22.2.14 -r1.22.2.15 --- moveresize.c 26 Nov 2004 16:42:58 -0000 1.22.2.14 +++ moveresize.c 28 Nov 2004 17:51:34 -0000 1.22.2.15 @@ -257,7 +257,7 @@ int ActionResizeStart(EWin * ewin, int grab, int hv) { - int x, y, w, h; + int x, y, w, h, ww, hh; EDBUG(6, "DoResize"); @@ -288,6 +288,9 @@ y = Mode.y - EoGetY(ewin); w = EoGetW(ewin) >> 1; h = EoGetH(ewin) >> 1; + ww = EoGetW(ewin) / 6; + hh = EoGetH(ewin) / 6; + if ((x < w) && (y < h)) Mode.resize_detail = 0; if ((x >= w) && (y < h)) @@ -300,22 +303,22 @@ /* The following four if statements added on 07/22/04 by Josh Holtrop. * They allow strictly horizontal or vertical resizing when the * cursor is towards the middle of an edge of a window. */ - if ((abs(x - w) < (w >> 1)) && (y < (h >> 1))) + if ((abs(x - w) < (w >> 1)) && (y < hh)) { Mode.mode = MODE_RESIZE_V; Mode.resize_detail = 0; } - else if ((abs(x - w) < (w >> 1)) && (y > (h + (h >> 1)))) + else if ((abs(x - w) < (w >> 1)) && (y > (EoGetH(ewin) - hh))) { Mode.mode = MODE_RESIZE_V; Mode.resize_detail = 1; } - else if ((abs(y - h) < (h >> 1)) && (x < (w >> 1))) + else if ((abs(y - h) < (h >> 1)) && (x < ww)) { Mode.mode = MODE_RESIZE_H; Mode.resize_detail = 0; } - else if ((abs(y - h) < (h >> 1)) && (x > (w + (w >> 1)))) + else if ((abs(y - h) < (h >> 1)) && (x > (EoGetW(ewin) - ww))) { Mode.mode = MODE_RESIZE_H; Mode.resize_detail = 1; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v retrieving revision 1.75.2.16 retrieving revision 1.75.2.17 diff -u -3 -r1.75.2.16 -r1.75.2.17 --- session.c 23 Nov 2004 23:46:42 -0000 1.75.2.16 +++ session.c 28 Nov 2004 17:51:35 -0000 1.75.2.17 @@ -387,12 +387,12 @@ Eprintf("set_save_props\n"); programProp.name = (char *)SmProgram; - programProp.type = (char *)SmLISTofARRAY8; + programProp.type = (char *)SmARRAY8; programProp.num_vals = 1; programProp.vals = &programVal; userIDProp.name = (char *)SmUserID; - userIDProp.type = (char *)SmLISTofARRAY8; + userIDProp.type = (char *)SmARRAY8; userIDProp.num_vals = 1; userIDProp.vals = &userIDVal; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v retrieving revision 1.139.2.17 retrieving revision 1.139.2.18 diff -u -3 -r1.139.2.17 -r1.139.2.18 --- setup.c 25 Sep 2004 16:15:35 -0000 1.139.2.17 +++ setup.c 28 Nov 2004 17:51:35 -0000 1.139.2.18 @@ -226,7 +226,7 @@ VRoot.depth = RRoot.depth; VRoot.cmap = RRoot.cmap; - ERegisterWindow(disp, RRoot.win); + ERegisterWindow(RRoot.win); if (Mode.wm.window) { @@ -246,7 +246,7 @@ CWOverrideRedirect | CWSaveUnder | CWBackingStore | CWColormap | CWBackPixel | CWBorderPixel, &attr); - ERegisterWindow(disp, VRoot.win); + ERegisterWindow(VRoot.win); xtp.encoding = XA_STRING; xtp.format = 8; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v retrieving revision 1.71.2.14 retrieving revision 1.71.2.15 diff -u -3 -r1.71.2.14 -r1.71.2.15 --- x.c 26 Nov 2004 16:42:58 -0000 1.71.2.14 +++ x.c 28 Nov 2004 17:51:36 -0000 1.71.2.15 @@ -157,7 +157,7 @@ xid = EXidFind(win); if (!xid) - ERegisterWindow(disp, win); + ERegisterWindow(win); xid = EXidFind(win); #if 0 Eprintf("EventCallbackRegister: %p %#lx\n", xid, win); @@ -366,7 +366,7 @@ } void -ERegisterWindow(Display * d, Window win) +ERegisterWindow(Window win) { EXID *xid; Window rr; @@ -377,13 +377,13 @@ if (xid) return; - XGetGeometry(d, win, &rr, &x, &y, &w, &h, &bw, &depth); + XGetGeometry(disp, win, &rr, &x, &y, &w, &h, &bw, &depth); xid = EXidSet(win, None, x, y, w, h, depth); xid->attached = 1; } void -EUnregisterWindow(Display * d __UNUSED__, Window win) +EUnregisterWindow(Window win) { EXidDelete(win); } ------------------------------------------------------- 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://productguide.itmanagersjournal.com/ _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs