Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
Tag: branch-exp
E.h actions.c borders.c comms.c dialog.c econfig.c events.c
evhandlers.c ewins.c focus.c ipc.c main.c menus.c session.c
x.c
Log Message:
Use callbacks in client management.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.22
retrieving revision 1.314.2.23
diff -u -3 -r1.314.2.22 -r1.314.2.23
--- E.h 21 Aug 2004 09:09:03 -0000 1.314.2.22
+++ E.h 22 Aug 2004 01:30:07 -0000 1.314.2.23
@@ -1214,8 +1214,9 @@
Window button_proxy_win;
const XEvent *current_event;
Window last_bpress;
- int last_button;
+ unsigned int last_button;
Time last_time;
+ char double_click;
char queue_up;
}
EMode;
@@ -1742,13 +1743,6 @@
void HandleMouseDown(XEvent * ev);
void HandleMouseUp(XEvent * ev);
void HandleMotion(XEvent * ev);
-void HandleMouseIn(XEvent * ev);
-void HandleMouseOut(XEvent * ev);
-void HandleVisibilityNotify(XEvent * ev);
-void HandleDestroy(XEvent * ev);
-void HandleUnmap(XEvent * ev);
-void HandleMap(XEvent * ev);
-void HandleMapRequest(XEvent * ev);
void HandleConfigureNotify(XEvent * ev);
void HandleConfigureRequest(XEvent * ev);
void HandleResizeRequest(XEvent * ev);
@@ -1787,10 +1781,6 @@
void EwinWithdraw(EWin * ewin);
void EwinReparent(EWin * ewin, Window parent);
void SyncBorderToEwin(EWin * ewin);
-void EwinEventDestroy(EWin * ewin);
-void EwinEventMap(EWin * ewin);
-void EwinEventVisibility(EWin * ewin, int on);
-void EwinEventUnmap(EWin * ewin);
int EwinGetDesk(const EWin * ewin);
const char *EwinGetTitle(const EWin * ewin);
const char *EwinGetIconName(const EWin * ewin);
@@ -1800,6 +1790,7 @@
void EwinChangesStart(EWin * ewin);
void EwinChangesProcess(EWin * ewin);
+void EwinsInit(void);
void EwinsEventsConfigure(int mode);
void EwinsSetFree(void);
@@ -1923,9 +1914,9 @@
void FocusEwinSetGrabs(EWin * ewin);
void FocusFix(void);
void FocusToEWin(EWin * ewin, int why);
-void FocusHandleEnter(XEvent * ev);
-void FocusHandleLeave(XEvent * ev);
-void FocusHandleClick(Window win);
+void FocusHandleEnter(EWin * ewin, XEvent * ev);
+void FocusHandleLeave(EWin * ewin, XEvent * ev);
+void FocusHandleClick(EWin * ewin, Window win);
void FocusNewDeskBegin(void);
void FocusNewDesk(void);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.174.2.8
retrieving revision 1.174.2.9
diff -u -3 -r1.174.2.8 -r1.174.2.9
--- actions.c 21 Aug 2004 09:09:04 -0000 1.174.2.8
+++ actions.c 22 Aug 2004 01:30:07 -0000 1.174.2.9
@@ -560,7 +560,7 @@
}
static int
-spawnMenu(EWin * ewin, const char *params)
+spawnMenu(EWin * ewin __UNUSED__, const char *params)
{
char s[1024];
char s2[1024];
@@ -636,12 +636,14 @@
ShowNamedMenu(s2);
}
- if (((ewin) && (ewin->win == Mode.context_win))
- || (ewin = FindEwinByChildren(Mode.context_win)))
+#if 0 /* FIXME - Hmmm */
+ if ((ewin && (ewin->win == Mode.context_win)) ||
+ (ewin = FindEwinByChildren(Mode.context_win)))
{
if ((ewin) && (Mode.menus.current_depth > 0) && (Mode.menus.list[0]))
ewin->shownmenu = MenuGetWindow(Mode.menus.list[0]);
}
+#endif
if (!MenusActive())
EDBUG_RETURN(0);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.221.2.8
retrieving revision 1.221.2.9
diff -u -3 -r1.221.2.8 -r1.221.2.9
--- borders.c 15 Aug 2004 16:25:32 -0000 1.221.2.8
+++ borders.c 22 Aug 2004 01:30:07 -0000 1.221.2.9
@@ -988,7 +988,7 @@
wbit->left = 0;
BorderWinpartChange(ewin, part, 0);
- if (wbit->win == Mode.context_win && ewin->border->part[part].aclass)
+ if (wbit->win == Mode.last_bpress && ewin->border->part[part].aclass)
EventAclass(ev, ewin, ewin->border->part[part].aclass);
}
@@ -1046,8 +1046,6 @@
goto done;
}
- Mode.context_win = Mode.last_bpress;
-
#if 0
if ( /*!Mode.menus.clicked && */ BordersEventMouseUp(ev))
goto done;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/comms.c,v
retrieving revision 1.62.2.2
retrieving revision 1.62.2.3
diff -u -3 -r1.62.2.2 -r1.62.2.3
--- comms.c 17 Aug 2004 22:47:02 -0000 1.62.2.2
+++ comms.c 22 Aug 2004 01:30:07 -0000 1.62.2.3
@@ -116,9 +116,13 @@
static int
ClientConfigure(Client * c, const char *str)
{
- char param[64], value[64];
-
- sscanf(str, "%60s %60s", param, value);
+ char param[64];
+ const char *value;
+ int len;
+
+ len = 0;
+ sscanf(str, "%*s %60s %n", param, &len);
+ value = str + len;
if (!strcmp(param, "clientname"))
{
@@ -243,7 +247,10 @@
if (!s)
EDBUG_RETURN_;
- if (!strncmp(s, "set ", 4) && !strchr(s, '.'))
+ if (EventDebug(EDBUG_TYPE_IPC))
+ Eprintf("ClientHandleComms: %s\n", s);
+
+ if (!strncmp(s, "set ", 4))
{
/* The old Client set command (used by epplets) */
if (ClientConfigure(c, s) == 0)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.91.2.5
retrieving revision 1.91.2.6
diff -u -3 -r1.91.2.5 -r1.91.2.6
--- dialog.c 10 Aug 2004 19:36:29 -0000 1.91.2.5
+++ dialog.c 22 Aug 2004 01:30:08 -0000 1.91.2.6
@@ -692,9 +692,11 @@
if (!d)
return;
- EDestroyWindow(disp, d->win);
+ EUnmapWindow(disp, d->win);
+
if (d->exit_func)
- (d->exit_func) (d->exit_val, d->exit_data);
+ d->exit_func(d->exit_val, d->exit_data);
+
RemoveItem(NULL, d->win, LIST_FINDBY_ID, LIST_TYPE_DIALOG);
}
@@ -2347,9 +2349,12 @@
static void
DialogEventMouseUp(Dialog * d, XEvent * ev)
{
- Window win = Mode.context_win;
+ Window win = ev->xbutton.window;
DItem *di, *dii;
+ if (win != Mode.last_bpress)
+ return;
+
di = DialogFindDItem(d, win);
if (!di)
return;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/econfig.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- econfig.c 9 Aug 2004 22:35:19 -0000 1.1.2.4
+++ econfig.c 22 Aug 2004 01:30:08 -0000 1.1.2.5
@@ -277,6 +277,9 @@
char item[1024];
unsigned int len, err;
+ if (!params)
+ return;
+
p = strchr(params, '.');
if (!p)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.69.2.6
retrieving revision 1.69.2.7
diff -u -3 -r1.69.2.6 -r1.69.2.7
--- events.c 18 Aug 2004 21:10:49 -0000 1.69.2.6
+++ events.c 22 Aug 2004 01:30:08 -0000 1.69.2.7
@@ -41,6 +41,8 @@
char throw_move_events_away = 0;
+#define DOUBLE_CLICK_TIME 250 /* Milliseconds */
+
void
EventsInit(void)
{
@@ -51,7 +53,7 @@
{
XShapeQueryVersion(disp, &major, &minor);
if (Mode.debug)
- Eprintf("Found extension Shape version %d.%d\n"
+ Eprintf("Found extension Shape version %d.%d -"
" Event/error base = %d/%d\n",
major, minor, event_base_shape, error_base_shape);
}
@@ -72,7 +74,7 @@
{
XRRQueryVersion(disp, &major, &minor);
if (Mode.debug)
- Eprintf("Found extension RandR version %d.%d\n"
+ Eprintf("Found extension RandR version %d.%d -"
" Event/error base = %d/%d\n",
major, minor, event_base_randr, error_base_randr);
@@ -134,6 +136,17 @@
{
case ButtonPress: /* 4 */
SoundPlay("SOUND_BUTTON_CLICK");
+
+ Mode.double_click =
+ (((ev->xbutton.time - Mode.last_time) < DOUBLE_CLICK_TIME) &&
+ (ev->xbutton.button == Mode.last_button));
+
+ Mode.last_bpress = ev->xbutton.window;
+ Mode.last_time = ev->xbutton.time;
+ Mode.last_button = ev->xbutton.button;
+
+ if (Mode.double_click)
+ ev->xbutton.time = 0;
HandleMouseDown(ev);
break;
case ButtonRelease: /* 5 */
@@ -145,27 +158,8 @@
HandleMotion(ev);
break;
case EnterNotify: /* 7 */
- HandleMouseIn(ev);
- break;
+ Mode.context_win = ev->xany.window;
case LeaveNotify: /* 8 */
- HandleMouseOut(ev);
- break;
- case VisibilityNotify: /* 15 */
- HandleVisibilityNotify(ev);
- break;
- case CreateNotify: /* 16 */
- break;
- case DestroyNotify: /* 17 */
- HandleDestroy(ev);
- break;
- case UnmapNotify: /* 18 */
- HandleUnmap(ev);
- break;
- case MapNotify: /* 19 */
- HandleMap(ev);
- break;
- case MapRequest: /* 20 */
- HandleMapRequest(ev);
break;
case ConfigureNotify: /* 22 */
HandleConfigureNotify(ev);
@@ -203,6 +197,8 @@
{
case ButtonRelease: /* 5 */
/* This shouldn't be here */
+ GrabPointerRelease();
+
if (MenusActive() && (!Mode.justclicked))
MenusHide();
Mode.justclicked = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.173.2.13
retrieving revision 1.173.2.14
diff -u -3 -r1.173.2.13 -r1.173.2.14
--- evhandlers.c 17 Aug 2004 22:47:03 -0000 1.173.2.13
+++ evhandlers.c 22 Aug 2004 01:30:08 -0000 1.173.2.14
@@ -42,59 +42,16 @@
void
HandleMouseDown(XEvent * ev)
{
- Window win = ev->xbutton.window;
- EWin *ewin;
- char double_click = 0;
- float mode_double_click_time = 0.25;
-
EDBUG(5, "HandleMouseDown");
- /* DON'T handle clicks whilst moving/resizing things unless doing manual placement
*/
- if (Mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- if ((((float)(ev->xbutton.time - Mode.last_time) / 1000) <
- mode_double_click_time) &&
- ((int)(ev->xbutton.button) == (int)(Mode.last_button)))
- double_click = 1;
-
- Mode.last_time = ev->xbutton.time;
- Mode.last_button = ev->xbutton.button;
- Mode.last_bpress = win;
-
ModeGetXY(ev->xbutton.root, ev->xbutton.x_root, ev->xbutton.y_root);
- FocusHandleClick(win);
-
- if (double_click)
- ev->xbutton.time = 0;
-
- ewin = FindEwinByBase(win);
- if (ewin)
- {
- ActionClass *ac;
-
- ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
- LIST_TYPE_ACLASS);
- if (ac)
- {
- GrabPointerSet(ewin->win, ECSR_GRAB, 0);
- if (EventAclass(ev, ewin, ac))
- {
- goto done;
- }
- }
- }
-
- done:
EDBUG_RETURN_;
}
void
HandleMouseUp(XEvent * ev)
{
- Window win = ev->xbutton.window;
- EWin *ewin;
Slideout *pslideout;
EDBUG(5, "HandleMouseUp");
@@ -108,42 +65,12 @@
EDBUG_RETURN_;
}
- GrabPointerRelease();
-
ModeGetXY(ev->xbutton.root, ev->xbutton.x_root, ev->xbutton.y_root);
pslideout = Mode.slideout;
ActionsEnd(NULL);
- if (Mode.place)
- {
- Mode.place = 0;
- goto done;
- }
-
- Mode.context_win = Mode.last_bpress;
-
- if (Mode.action_inhibit)
- goto done;
-
- ewin = FindEwinByBase(win);
- if (ewin)
- {
- ActionClass *ac;
-
- ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
- LIST_TYPE_ACLASS);
- if (ac)
- {
- if (EventAclass(ev, ewin, ac))
- {
- goto done;
- }
- }
- }
-
- done:
if ((Mode.slideout) && (pslideout))
SlideoutHide(Mode.slideout);
@@ -177,129 +104,6 @@
}
void
-HandleMouseIn(XEvent * ev)
-{
- Window win = ev->xcrossing.window;
-
- EDBUG(5, "HandleMouseIn");
-
- if (Mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- if (win == VRoot.win)
- goto done;
-
- Mode.context_win = win;
-
- done:
- FocusHandleEnter(ev);
-
- EDBUG_RETURN_;
-}
-
-void
-HandleMouseOut(XEvent * ev)
-{
- Window win = ev->xcrossing.window;
-
- EDBUG(5, "HandleMouseOut");
-
- if (Mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- Mode.context_win = win;
-
- FocusHandleLeave(ev);
-
- EDBUG_RETURN_;
-}
-
-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;
- EWin *ewin;
-
- EDBUG(5, "HandleDestroy");
-
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- {
- EwinEventDestroy(ewin);
- EDBUG_RETURN_;
- }
-
- EDBUG_RETURN_;
-}
-
-void
-HandleUnmap(XEvent * ev)
-{
- Window win = ev->xunmap.window;
- EWin *ewin;
-
- EDBUG(5, "HandleUnmap");
-
- if (win == Mode.context_win)
- Mode.context_win = 0;
-
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- EwinEventUnmap(ewin);
-
- EDBUG_RETURN_;
-}
-
-void
-HandleMap(XEvent * ev)
-{
- Window win = ev->xmap.window;
- EWin *ewin;
-
- EDBUG(5, "HandleMap");
-
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- EwinEventMap(ewin);
-
- EDBUG_RETURN_;
-}
-
-void
-HandleMapRequest(XEvent * ev)
-{
- Window win = ev->xmaprequest.window;
- EWin *ewin;
-
- EDBUG(5, "HandleMapRequest");
-
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin && ewin->iconified)
- EwinDeIconify(ewin);
- else
- AddToFamily(ev->xmaprequest.window);
-
- EDBUG_RETURN_;
-}
-
-void
HandleConfigureNotify(XEvent * ev)
{
EDBUG(5, "HandleConfigureNotify");
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- ewins.c 18 Aug 2004 21:10:49 -0000 1.1.2.4
+++ ewins.c 22 Aug 2004 01:30:08 -0000 1.1.2.5
@@ -38,6 +38,10 @@
StructureNotifyMask | ResizeRedirectMask | \
PropertyChangeMask | ColormapChangeMask)
+static void EwinHandleEventsToplevel(XEvent * ev, void *prm);
+static void EwinHandleEventsContainer(XEvent * ev, void *prm);
+static void EwinHandleEventsClient(XEvent * ev, void *prm);
+
static void
EwinEventsConfigure(EWin * ewin, int mode)
{
@@ -126,6 +130,12 @@
if (EventDebug(EDBUG_TYPE_EWINS))
Eprintf("EwinCreate %#lx state=%d\n", ewin->client.win, ewin->state);
+ EventCallbackRegister(ewin->win, 0, EwinHandleEventsToplevel, ewin);
+ EventCallbackRegister(ewin->win_container, 0, EwinHandleEventsContainer,
+ ewin);
+ ERegisterWindow(disp, ewin->client.win);
+ EventCallbackRegister(ewin->client.win, 0, EwinHandleEventsClient, ewin);
+
EDBUG_RETURN(ewin);
}
@@ -143,6 +153,7 @@
Eprintf("EwinDestroy %#lx state=%d\n", ewin->client.win, ewin->state);
RemoveItem(NULL, ewin->client.win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ EUnregisterWindow(disp, ewin->client.win);
EwinListDelete(&EwinListStack, ewin);
EwinListDelete(&EwinListFocus, ewin);
@@ -943,7 +954,7 @@
EwinDestroy(ewin);
}
-void
+static void
EwinEventDestroy(EWin * ewin)
{
if (EventDebug(EDBUG_TYPE_EWINS))
@@ -953,7 +964,7 @@
EwinDestroy(ewin);
}
-void
+static void
EwinEventMap(EWin * ewin)
{
int old_state = ewin->state;
@@ -970,7 +981,7 @@
FocusToEWin(ewin, FOCUS_SET);
}
-void
+static void
EwinEventUnmap(EWin * ewin)
{
if (GetZoomEWin() == ewin)
@@ -1032,10 +1043,12 @@
EwinWithdraw(ewin);
}
-void
+#if 0
+static void
EwinEventVisibility(EWin * ewin __UNUSED__, int state __UNUSED__)
{
}
+#endif
void
EwinRefresh(EWin * ewin)
@@ -1483,3 +1496,133 @@
ewin->client.x, ewin->client.y);
}
}
+
+static int
+ActionsCheck(const char *which, EWin * ewin, XEvent * ev)
+{
+ ActionClass *ac;
+
+ if (Mode.action_inhibit) /* Probably not here */
+ return 0;
+
+ ac = FindItem(which, 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
+ if (!ac)
+ return 0;
+
+ if (ev->type == ButtonPress)
+ GrabPointerSet(ewin->win, ECSR_GRAB, 0);
+ else if (ev->type == ButtonRelease)
+ GrabPointerRelease();
+
+ return EventAclass(ev, ewin, ac);
+}
+
+#define DEBUG_EWIN_EVENTS 0
+static void
+EwinHandleEventsToplevel(XEvent * ev, void *prm)
+{
+ EWin *ewin = (EWin *) prm;
+
+ switch (ev->type)
+ {
+ case ButtonPress:
+ ActionsCheck("BUTTONBINDINGS", ewin, ev);
+ break;
+ case ButtonRelease:
+ ActionsCheck("BUTTONBINDINGS", ewin, ev);
+ break;
+ case EnterNotify:
+ FocusHandleEnter(ewin, ev);
+ break;
+ case LeaveNotify:
+ FocusHandleLeave(ewin, ev);
+ break;
+ case MotionNotify:
+ break;
+ default:
+#if DEBUG_EWIN_EVENTS
+ Eprintf("EwinHandleEventsToplevel: type=%2d win=%#lx: %s\n",
+ ev->type, ewin->client.win, EwinGetTitle(ewin));
+#endif
+ break;
+ }
+}
+
+static void
+EwinHandleEventsContainer(XEvent * ev, void *prm)
+{
+ EWin *ewin = (EWin *) prm;
+
+ switch (ev->type)
+ {
+ case ButtonPress:
+ FocusHandleClick(ewin, ev->xany.window);
+ break;
+ default:
+ Eprintf("EwinHandleEventsContainer: type=%2d win=%#lx: %s\n",
+ ev->type, ewin->client.win, EwinGetTitle(ewin));
+ break;
+ }
+}
+
+static void
+EwinHandleEventsClient(XEvent * ev, void *prm)
+{
+ EWin *ewin = (EWin *) prm;
+
+ switch (ev->type)
+ {
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ case FocusIn:
+ case FocusOut:
+ case ConfigureNotify:
+ case GravityNotify:
+ case PropertyNotify:
+ break;
+ case DestroyNotify:
+ EwinEventDestroy(ewin);
+ break;
+ case UnmapNotify:
+ EwinEventUnmap(ewin);
+ break;
+ case MapNotify:
+ EwinEventMap(ewin);
+ break;
+ default:
+#if DEBUG_EWIN_EVENTS
+ Eprintf("EwinHandleEventsClient: type=%2d win=%#lx: %s\n",
+ ev->type, ewin->client.win, EwinGetTitle(ewin));
+#endif
+ break;
+ }
+}
+
+static void
+EwinHandleEventsRoot(XEvent * ev, void *prm __UNUSED__)
+{
+ switch (ev->type)
+ {
+ case LeaveNotify:
+ FocusHandleLeave(NULL, ev);
+ break;
+ case MapRequest:
+ AddToFamily(ev->xmaprequest.window);
+ break;
+ default:
+#if 0
+ Eprintf("EwinHandleEventsRoot: type=%2d win=%#lx\n",
+ ev->type, ev->xany.window);
+#endif
+ break;
+ }
+}
+
+void
+EwinsInit(void)
+{
+ EventCallbackRegister(VRoot.win, 0, EwinHandleEventsRoot, NULL);
+}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.81.2.2
retrieving revision 1.81.2.3
diff -u -3 -r1.81.2.2 -r1.81.2.3
--- focus.c 15 Aug 2004 07:28:27 -0000 1.81.2.2
+++ focus.c 22 Aug 2004 01:30:08 -0000 1.81.2.3
@@ -401,23 +401,23 @@
*/
void
-FocusHandleEnter(XEvent * ev)
+FocusHandleEnter(EWin * ewin, XEvent * ev)
{
Window win = ev->xcrossing.window;
- EWin *ewin;
-
- EDBUG(5, "FocusHandleEnter");
- /* Entering root may mean entering this screen */
- if (win == VRoot.win &&
- (ev->xcrossing.mode == NotifyNormal &&
- ev->xcrossing.detail != NotifyInferior))
+ if (!ewin)
{
- FocusToEWin(NULL, FOCUS_DESK_ENTER);
- goto done;
+ /* Entering root may mean entering this screen */
+ if (win == VRoot.win &&
+ (ev->xcrossing.mode == NotifyNormal &&
+ ev->xcrossing.detail != NotifyInferior))
+ {
+ FocusToEWin(NULL, FOCUS_DESK_ENTER);
+ }
+ Mode.mouse_over_ewin = ewin;
+ return;
}
- ewin = GetEwinByCurrentPointer();
Mode.mouse_over_ewin = ewin;
switch (Conf.focus.mode)
@@ -436,13 +436,10 @@
FocusToEWin(ewin, FOCUS_ENTER);
break;
}
-
- done:
- EDBUG_RETURN_;
}
void
-FocusHandleLeave(XEvent * ev)
+FocusHandleLeave(EWin * ewin __UNUSED__, XEvent * ev)
{
Window win = ev->xcrossing.window;
@@ -454,8 +451,9 @@
}
void
-FocusHandleClick(Window win)
+FocusHandleClick(EWin * ewin, Window win)
{
+#if 0
EWin *ewin;
ewin = FindEwinByChildren(win);
@@ -463,6 +461,7 @@
ewin = FindEwinByBase(win);
if (!ewin)
return;
+#endif
if ((Conf.focus.clickraises) || (Conf.focus.mode == MODE_FOCUS_CLICK))
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.174.2.11
retrieving revision 1.174.2.12
diff -u -3 -r1.174.2.11 -r1.174.2.12
--- ipc.c 21 Aug 2004 09:09:20 -0000 1.174.2.11
+++ ipc.c 22 Aug 2004 01:30:08 -0000 1.174.2.12
@@ -5707,8 +5707,6 @@
char w[FILEPATH_LEN_MAX];
const IpcItem **lst, *ipc;
- if (EventDebug(EDBUG_TYPE_IPC))
- Eprintf("HandleIPC: %s\n", params);
IpcPrintInit();
lst = IPC_GetList(&num);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.99.2.9
retrieving revision 1.99.2.10
diff -u -3 -r1.99.2.9 -r1.99.2.10
--- main.c 21 Aug 2004 09:09:21 -0000 1.99.2.9
+++ main.c 22 Aug 2004 01:30:08 -0000 1.99.2.10
@@ -178,10 +178,6 @@
{
Mode.debug++;
}
-
- /* Set a default location for the "previous session" data when
- * we do not actually have a previous session. */
- SetSMFile(NULL);
}
if (!Mode.theme.path)
@@ -215,6 +211,7 @@
AlertInit(); /* Set up all the text bits that belong on the
GSOD */
SignalsSetup();
SetupX(dstr); /* This is where the we fork per screen */
+ SetSMFile(NULL); /* Set SM file if not already set (TBD) */
BlumFlimFrub();
ZoomInit();
SetupDirs();
@@ -226,6 +223,7 @@
MapUnmap(0);
UngrabX();
+ EwinsInit();
ModulesSignal(ESIGNAL_INIT);
/* make all of our fallback classes */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.147.2.6
retrieving revision 1.147.2.7
diff -u -3 -r1.147.2.6 -r1.147.2.7
--- menus.c 15 Aug 2004 10:00:21 -0000 1.147.2.6
+++ menus.c 22 Aug 2004 01:30:08 -0000 1.147.2.7
@@ -238,6 +238,7 @@
if (m->stuck)
{
+#if 0 /* FIXME - Fix or remove */
Button *button;
EWin *ewin99;
@@ -259,6 +260,7 @@
}
}
}
+#endif
EDBUG_RETURN_;
}
@@ -385,6 +387,7 @@
if (!FindMenu(m->win))
AddItem(m, m->name, m->win, LIST_TYPE_MENU);
+#if 0 /* FIXME - Fix or remove */
{
Button *button;
EWin *ewin99;
@@ -408,6 +411,7 @@
}
}
}
+#endif
m->shown = 1;
if (Mode.menus.current_depth == 0)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.75.2.4
retrieving revision 1.75.2.5
diff -u -3 -r1.75.2.4 -r1.75.2.5
--- session.c 21 Aug 2004 09:09:21 -0000 1.75.2.4
+++ session.c 22 Aug 2004 01:30:08 -0000 1.75.2.5
@@ -139,7 +139,7 @@
return def_prefix;
if (Mode.wm.window)
- Esnprintf(s, sizeof(s), "%s/...e_session-window", EDirUser());
+ Esnprintf(s, sizeof(s), "%s/e_config-window", EDirUser());
else
Esnprintf(s, sizeof(s), "%s/e_config-%s", EDirUser(), Mode.display.name);
def_prefix = Estrdup(s);
@@ -1021,7 +1021,7 @@
XCloseDisplay(disp);
disp = NULL;
}
- if (Mode.theme.path)
+ if (Conf.theme.name)
{
if (sm_client_id)
Esnprintf(s, sizeof(s),
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.71.2.5
retrieving revision 1.71.2.6
diff -u -3 -r1.71.2.5 -r1.71.2.6
--- x.c 17 Aug 2004 22:47:08 -0000 1.71.2.5
+++ x.c 22 Aug 2004 01:30:08 -0000 1.71.2.6
@@ -45,7 +45,7 @@
char mapped;
char in_use;
char do_del;
- char rsvd;
+ char attached;
int num_rect;
int ord;
XRectangle *rects;
@@ -125,7 +125,7 @@
return xid;
}
-static void
+static EXID *
EXidSet(Window win, Window parent, int x, int y, int w, int h,
int depth __UNUSED__)
{
@@ -143,6 +143,8 @@
Eprintf("EXidSet: %#lx\n", xid->win);
#endif
EXidAdd(xid);
+
+ return xid;
}
void
@@ -377,12 +379,18 @@
void
ERegisterWindow(Display * d, Window win)
{
+ EXID *xid;
Window rr;
int x, y;
unsigned int w, h, bw, depth;
+ xid = EXidFind(win);
+ if (xid)
+ return;
+
XGetGeometry(d, win, &rr, &x, &y, &w, &h, &bw, &depth);
- EXidSet(win, None, x, y, w, h, depth);
+ xid = EXidSet(win, None, x, y, w, h, depth);
+ xid->attached = 1;
}
void
@@ -581,7 +589,7 @@
EXID *xid;
xid = EXidFind(win);
- if (xid)
+ if (xid && !xid->attached)
{
XRectangle *r;
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs