Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c Log Message: ok - try this instead. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.645 retrieving revision 1.646 diff -u -3 -r1.645 -r1.646 --- e_border.c 7 Aug 2008 03:09:46 -0000 1.645 +++ e_border.c 7 Aug 2008 04:16:21 -0000 1.646 @@ -1398,6 +1398,8 @@ EAPI void e_border_focus_set(E_Border *bd, int focus, int set) { + int focus_changed = 0; + E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); /* note: this is here as it seems there are enough apps that do not even @@ -1406,9 +1408,9 @@ /* be strict about accepting focus hint */ // printf("e_border_focus_set(%p, %s, %i %i);\n", bd, bd->client.icccm.name, focus, set); // printf(" accept:%i take:%i\n", bd->client.icccm.accepts_focus, bd->client.icccm.take_focus); - if (!bd->client.icccm.accepts_focus) return; -// if ((!bd->client.icccm.accepts_focus) && -// (!bd->client.icccm.take_focus)) return; +// if (!bd->client.icccm.accepts_focus) return; + if ((!bd->client.icccm.accepts_focus) && + (!bd->client.icccm.take_focus)) return; /* dont focus an iconified window. that's silly! */ if ((focus) && (bd->iconic)) return; if ((bd->modal) && (bd->modal != bd)) @@ -1421,7 +1423,7 @@ e_border_focus_set(bd->leader->modal, focus, set); return; } -/* + if ((focus) && (set) && (!bd->focused)) { if ((bd->client.icccm.accepts_focus) && @@ -1451,7 +1453,7 @@ return; } } - */ + if ((bd->visible) && (bd->changes.visible)) { if ((bd->want_focus) && (set) && (!focus)) @@ -1495,6 +1497,8 @@ bd->raise_timer = NULL; } } + if (((bd->focused) && (!focus)) || ((!bd->focused) && (focus))) + focus_changed = 1; bd->focused = focus; if (set) { @@ -1586,15 +1590,15 @@ e_hints_active_window_set(bd->zone->container->manager, NULL); } #endif - if (bd->focused) + if (focus_changed) { - E_Event_Border_Focus_In *ev; - - focused = bd; - //printf("set focused to %p\n", focused); - - if (focus && set) - { + if (bd->focused) + { + E_Event_Border_Focus_In *ev; + + focused = bd; + //printf("set focused to %p\n", focused); + // Let send the focus event iff the focus is set explicitly, // not via callback ev = calloc(1, sizeof(E_Event_Border_Focus_In)); @@ -1604,16 +1608,13 @@ ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev, _e_border_event_border_focus_in_free, NULL); } - } - else if ((!bd->focused) && (focused == bd)) - { - E_Event_Border_Focus_Out *ev; + else + { + E_Event_Border_Focus_Out *ev; - focused = NULL; - //printf("set focused to %p\n", focused); + focused = NULL; + //printf("set focused to %p\n", focused); - if (set) - { // Let send the focus event iff the focus is set explicitly, // not via callback ev = calloc(1, sizeof(E_Event_Border_Focus_Out)); ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs