Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c
Log Message:
focus is much happier all round now.. not it's not done properly. i just
figured the cases to "punt off" that i'm seeing as problems.. and alls fine
now... :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- e_border.c 23 Dec 2004 16:23:39 -0000 1.33
+++ e_border.c 25 Dec 2004 13:13:36 -0000 1.34
@@ -385,12 +385,20 @@
if ((focused != bd) && (focused))
e_border_focus_set(focused, 0, 0);
if (bd->client.icccm.take_focus)
- ecore_x_icccm_take_focus_send(bd->client.win,
ECORE_X_CURRENT_TIME);
+ {
+ printf("take focus!\n");
+ ecore_x_icccm_take_focus_send(bd->client.win,
ECORE_X_CURRENT_TIME);
+ ecore_x_window_focus(bd->client.win);
+ }
else
- ecore_x_window_focus(bd->client.win);
+ {
+ printf("set focus\n");
+ ecore_x_window_focus(bd->client.win);
+ }
}
else
{
+ printf("remove focus\n");
ecore_x_window_focus(bd->container->manager->win);
}
}
@@ -983,6 +991,18 @@
e = ev;
bd = e_border_find_by_client_window(e->win);
if (!bd) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_NORMAL) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR)) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_GRAB) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR)) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_GRAB) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR)) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_GRAB) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL)) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR)) return 1;
+ if ((e->mode == ECORE_X_EVENT_MODE_WHILE_GRABBED) &&
+ (e->detail == ECORE_X_EVENT_DETAIL_ANCESTOR)) return 1;
printf("f OUT %i | %i\n", e->mode, e->detail);
e_border_focus_set(bd, 0, 0);
return 1;
@@ -1267,13 +1287,16 @@
bd->client.icccm.title,
modes[ev->mode],
details[ev->detail]);
-
- if (ev->mode != ECORE_X_EVENT_MODE_GRAB)
- e_border_focus_set(bd, 0, 1);
- else
- {
- printf("OUT GRAB!\n");
- }
+
+ if ((ev->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
+ (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
+ return 1;
+ if ((ev->mode == ECORE_X_EVENT_MODE_NORMAL) &&
+ (ev->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL))
+ return 1;
+ if (ev->mode == ECORE_X_EVENT_MODE_GRAB)
+ return 1;
+ e_border_focus_set(bd, 0, 1);
}
if (ev->win != bd->event_win) return 1;
bd->mouse.current.mx = ev->root.x;
-------------------------------------------------------
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