Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: focus.c Log Message: Fix focus at startup. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -3 -r1.87 -r1.88 --- focus.c 9 Jan 2005 22:36:00 -0000 1.87 +++ focus.c 10 Jan 2005 23:32:22 -0000 1.88 @@ -348,6 +348,11 @@ SoundPlay("SOUND_FOCUS_SET"); done: + + /* Quit if pointer is not on our screen */ + if (!PointerAt(NULL, NULL)) + EDBUG_RETURN_; + /* Unset old focus window (if any) highlighting */ if (Mode.focuswin) FocusEwinSetActive(Mode.focuswin, 0); @@ -376,6 +381,23 @@ DesktopsEventsConfigure(0); } +static void +FocusInit(void) +{ + EWin *ewin; + + /* Set the mouse-over window */ + ewin = GetEwinByCurrentPointer(); + Mode.mouse_over_ewin = ewin; + + FocusToEWin(NULL, FOCUS_DESK_ENTER); +} + +static void +FocusExit(void) +{ +} + void FocusNewDesk(void) { @@ -491,6 +513,24 @@ } } +/* + * Focus Module + */ + +static void +FocusSighan(int sig, void *prm __UNUSED__) +{ + switch (sig) + { + case ESIGNAL_START: + FocusInit(); + break; + case ESIGNAL_EXIT: + FocusExit(); + break; + } +} + static void FocusIpc(const char *params, Client * c __UNUSED__) { @@ -622,7 +662,7 @@ */ EModule ModFocus = { "focus", NULL, - NULL, + FocusSighan, {N_IPC_FUNCS, FocusIpcArray}, {N_CFG_ITEMS, FocusCfgItems} }; ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs