Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_container.c e_focus.c e_grabinput.c e_grabinput.h
e_int_menus.c e_manager.c e_win.c e_win.h
Log Message:
oh for gods sake! now all day was sunk into getting focus fixed for dialogs.
argh! i'll have to do the app cache after this... grrr....x
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.411
retrieving revision 1.412
diff -u -3 -r1.411 -r1.412
--- e_border.c 23 Sep 2005 18:58:35 -0000 1.411
+++ e_border.c 24 Sep 2005 09:04:39 -0000 1.412
@@ -1155,18 +1155,25 @@
{
if (bd->focused)
{
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus))
- e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_NO_INPUT);
- else if ((bd->client.icccm.accepts_focus) &&
- (bd->client.icccm.take_focus))
- e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_LOCALLY_ACTIVE);
- else if ((!bd->client.icccm.accepts_focus) &&
- (bd->client.icccm.take_focus))
- e_grabinput_focus(bd->client.win,
E_FOCUS_METHOD_GLOBALLY_ACTIVE);
- else if ((bd->client.icccm.accepts_focus) &&
+ if (bd->internal)
+ {
+ e_grabinput_focus(bd->win, E_FOCUS_METHOD_PASSIVE);
+ }
+ else
+ {
+ if ((!bd->client.icccm.accepts_focus) &&
(!bd->client.icccm.take_focus))
- e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_PASSIVE);
+ e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_NO_INPUT);
+ else if ((bd->client.icccm.accepts_focus) &&
+ (bd->client.icccm.take_focus))
+ e_grabinput_focus(bd->client.win,
E_FOCUS_METHOD_LOCALLY_ACTIVE);
+ else if ((!bd->client.icccm.accepts_focus) &&
+ (bd->client.icccm.take_focus))
+ e_grabinput_focus(bd->client.win,
E_FOCUS_METHOD_GLOBALLY_ACTIVE);
+ else if ((bd->client.icccm.accepts_focus) &&
+ (!bd->client.icccm.take_focus))
+ e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_PASSIVE);
+ }
}
else
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -3 -r1.83 -r1.84
--- e_container.c 22 Sep 2005 12:47:45 -0000 1.83
+++ e_container.c 24 Sep 2005 09:04:39 -0000 1.84
@@ -1017,7 +1017,7 @@
{
bd = e_border_focused_get();
if (bd) e_focus_event_mouse_out(bd);
- evas_event_feed_mouse_in(con->bg_evas, ev->time, NULL);
+ evas_event_feed_mouse_in(con->bg_evas, ev->time, NULL);
}
return 1;
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_focus.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_focus.c 22 Sep 2005 12:47:45 -0000 1.15
+++ e_focus.c 24 Sep 2005 09:04:39 -0000 1.16
@@ -54,8 +54,17 @@
{
if (e_config->focus_policy == E_FOCUS_MOUSE)
{
- if (!bd->lock_focus_in)
- e_border_focus_set(bd, 0, 1);
+ /* FIXME: this is such a hack. its a big hack around x's async events
+ * as we dont know always exactly what action causes what event
+ * so by waiting more than 0.2 secs before reverting focus to nothing
+ * since we entered root, we are ignoring mouse in's on the root
+ * container for a bit after the mosue may have entered it
+ */
+ if ((ecore_time_get() - e_grabinput_last_focus_time_get()) > 0.2)
+ {
+ if (!bd->lock_focus_in)
+ e_border_focus_set(bd, 0, 1);
+ }
}
if (bd->raise_timer)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_grabinput.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_grabinput.c 10 Jul 2005 10:48:08 -0000 1.2
+++ e_grabinput.c 24 Sep 2005 09:04:39 -0000 1.3
@@ -7,10 +7,11 @@
static void _e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method);
/* local subsystem globals */
-Ecore_X_Window grab_mouse_win = 0;
-Ecore_X_Window grab_key_win = 0;
-Ecore_X_Window focus_win = 0;
-E_Focus_Method focus_method = E_FOCUS_METHOD_NO_INPUT;
+static Ecore_X_Window grab_mouse_win = 0;
+static Ecore_X_Window grab_key_win = 0;
+static Ecore_X_Window focus_win = 0;
+static E_Focus_Method focus_method = E_FOCUS_METHOD_NO_INPUT;
+static double last_focus_time = 0.0;
/* externally accessible functions */
int
@@ -87,6 +88,12 @@
_e_grabinput_focus(win, method);
}
+double
+e_grabinput_last_focus_time_get(void)
+{
+ return last_focus_time;
+}
+
/* local subsystem functions */
static void
_e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method)
@@ -108,4 +115,5 @@
default:
break;
}
+ last_focus_time = ecore_time_get();
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_grabinput.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_grabinput.h 10 Jul 2005 10:48:08 -0000 1.2
+++ e_grabinput.h 24 Sep 2005 09:04:39 -0000 1.3
@@ -20,6 +20,7 @@
EAPI void e_grabinput_get(Ecore_X_Window mouse_win, int
confine_mouse, Ecore_X_Window key_win);
EAPI void e_grabinput_release(Ecore_X_Window mouse_win,
Ecore_X_Window key_win);
EAPI void e_grabinput_focus(Ecore_X_Window win, E_Focus_Method
method);
-
+EAPI double e_grabinput_last_focus_time_get(void);
+
#endif
#endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- e_int_menus.c 22 Sep 2005 08:05:15 -0000 1.96
+++ e_int_menus.c 24 Sep 2005 09:04:39 -0000 1.97
@@ -720,7 +720,13 @@
if (!bd->lock_user_stacking)
e_border_raise(bd);
if (!bd->lock_focus_out)
- e_border_focus_set(bd, 1, 1);
+ {
+ if (e_config->focus_policy != E_FOCUS_CLICK)
+ ecore_x_pointer_warp(bd->zone->container->win,
+ bd->x + (bd->w / 2),
+ bd->y + (bd->h / 2));
+ e_border_focus_set(bd, 1, 1);
+ }
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_manager.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- e_manager.c 25 Aug 2005 13:48:32 -0000 1.39
+++ e_manager.c 24 Sep 2005 09:04:39 -0000 1.40
@@ -480,7 +480,7 @@
man = data;
e = ev;
-// printf("KEY %s [win=%x event_win=%x]\n", e->keyname, e->win,
e->event_win);
+ printf("KEY %s [win=%x event_win=%x]\n", e->keyname, e->win, e->event_win);
if (e->event_win != man->root) return 1;
if (e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER,
E_OBJECT(man), ev))
return 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_win.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_win.c 21 Sep 2005 04:53:12 -0000 1.5
+++ e_win.c 24 Sep 2005 09:04:39 -0000 1.6
@@ -42,8 +42,8 @@
if (!win) return NULL;
win->container = con;
/* TODO: Maybe use an own config for windows? */
- if (e_canvas_engine_decide(e_config->evas_engine_errors) ==
- E_EVAS_ENGINE_GL_X11)
+ win->engine = e_canvas_engine_decide(e_config->evas_engine_errors);
+ if (win->engine == E_EVAS_ENGINE_GL_X11)
{
win->ecore_evas = ecore_evas_gl_x11_new(NULL, con->manager->root,
0, 0, 1, 1);
@@ -95,6 +95,16 @@
if (!win->placed)
win->border->re_manage = 0;
win->border->internal = 1;
+ if (win->engine == E_EVAS_ENGINE_GL_X11)
+ {
+ ecore_evas_gl_x11_extra_event_window_add(win->ecore_evas,
win->border->win);
+ ecore_evas_gl_x11_extra_event_window_add(win->ecore_evas,
win->border->event_win);
+ }
+ else
+ {
+ ecore_evas_software_x11_extra_event_window_add(win->ecore_evas,
win->border->win);
+ ecore_evas_software_x11_extra_event_window_add(win->ecore_evas,
win->border->event_win);
+ }
}
e_border_show(win->border);
ecore_evas_show(win->ecore_evas);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_win.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_win.h 30 Aug 2005 01:16:48 -0000 1.2
+++ e_win.h 24 Sep 2005 09:04:39 -0000 1.3
@@ -16,6 +16,7 @@
E_Object e_obj_inherit;
int x, y, w, h;
+ int engine;
E_Container *container;
E_Border *border;
Ecore_Evas *ecore_evas;
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs