From 44b34b4b8911a7aa77b5f29eb7286951444259dd Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 19 Nov 2004 05:49:16 +0000 Subject: [PATCH] disable this for now... see comment. SVN revision: 12223 --- legacy/ecore/src/lib/ecore_x/Ecore_X.h | 1 + legacy/ecore/src/lib/ecore_x/ecore_x_events.c | 4 ++++ legacy/ecore/src/lib/ecore_x/ecore_x_window.c | 17 +++++++++++++++++ .../ecore/src/lib/ecore_x/ecore_x_window_prop.c | 4 ++-- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_x/Ecore_X.h b/legacy/ecore/src/lib/ecore_x/Ecore_X.h index 028e7e4701..a5a28b3d1f 100644 --- a/legacy/ecore/src/lib/ecore_x/Ecore_X.h +++ b/legacy/ecore/src/lib/ecore_x/Ecore_X.h @@ -789,6 +789,7 @@ void ecore_x_window_resize(Ecore_X_Window win, int w, int h); void ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h); void ecore_x_window_focus(Ecore_X_Window win); void ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t); +Ecore_X_Window ecore_x_window_focus_get(void); void ecore_x_window_raise(Ecore_X_Window win); void ecore_x_window_lower(Ecore_X_Window win); void ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y); diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x_events.c b/legacy/ecore/src/lib/ecore_x/ecore_x_events.c index 21ebf7fa51..3b0376e5b8 100644 --- a/legacy/ecore/src/lib/ecore_x/ecore_x_events.c +++ b/legacy/ecore/src/lib/ecore_x/ecore_x_events.c @@ -820,6 +820,9 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent) void _ecore_x_event_handle_property_notify(XEvent *xevent) { +#if 0 /* for now i disabled this. nice idea though this is - it leaves a lot + * to be desired for efficiency that is better left to the app layer + */ if (xevent->xproperty.atom == _ecore_x_atom_wm_class) { Ecore_X_Event_Window_Prop_Name_Class_Change *e; @@ -908,6 +911,7 @@ _ecore_x_event_handle_property_notify(XEvent *xevent) ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL); } else +#endif { Ecore_X_Event_Window_Property *e; diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x_window.c b/legacy/ecore/src/lib/ecore_x/ecore_x_window.c index c049bd4df7..b834b6d63c 100644 --- a/legacy/ecore/src/lib/ecore_x/ecore_x_window.c +++ b/legacy/ecore/src/lib/ecore_x/ecore_x_window.c @@ -420,6 +420,23 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t) XSetInputFocus(_ecore_x_disp, win, RevertToNone, t); } +/** + * gets the focus to the window @p win. + * @return The window that has focus. + * @ingroup Ecore_X_Window_Focus_Functions + */ +Ecore_X_Window +ecore_x_window_focus_get(void) +{ + Window win; + int revert_mode; + + win = 0; + + XGetInputFocus(_ecore_x_disp, &win, &revert_mode); + return win; +} + /** * @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions * diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x_window_prop.c b/legacy/ecore/src/lib/ecore_x/ecore_x_window_prop.c index 82d2c82777..43b82bf79c 100644 --- a/legacy/ecore/src/lib/ecore_x/ecore_x_window_prop.c +++ b/legacy/ecore/src/lib/ecore_x/ecore_x_window_prop.c @@ -249,8 +249,8 @@ ecore_x_window_prop_title_get(Ecore_X_Window win) { char *title; - title = ecore_x_window_prop_string_get(win, _ecore_x_atom_net_wm_name); - if (!title) title = ecore_x_window_prop_string_get(win, _ecore_x_atom_wm_name); +/* title = ecore_x_window_prop_string_get(win, _ecore_x_atom_net_wm_name);*/ + title = ecore_x_window_prop_string_get(win, _ecore_x_atom_wm_name); return title; }