From: devilhorns Date: Thu, 12 Jan 2012 11:41:38 +0000 (+0000) Subject: Ecore_X(cb): Fix my focus issues with Sloppy focus. X-Git-Tag: 2.0_alpha~86^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=881717fe4bb81d03c1fd6a0b59dab5c2c042f6fc;p=framework%2Fuifw%2Fecore.git Ecore_X(cb): Fix my focus issues with Sloppy focus. Add a check for valid connection in ecore_xcb_icccm.c NB: For some reason, XCB does not like ecore's timestamp which is being passed in. Since all the calls to ecore_x_window_focus_at_time are being passed the current timestamp anyway, just use XCB_CURRENT_TIME until I have more available 'free time' to dig deeper into this. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@67136 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_x/xcb/ecore_xcb_icccm.c b/src/lib/ecore_x/xcb/ecore_xcb_icccm.c index 6459db7..37bda9f 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_icccm.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_icccm.c @@ -1452,6 +1452,7 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, XCB_EVENT_MASK_NO_EVENT, diff --git a/src/lib/ecore_x/xcb/ecore_xcb_window.c b/src/lib/ecore_x/xcb/ecore_xcb_window.c index 2616c93..27bceaf 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_window.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_window.c @@ -783,13 +783,14 @@ ecore_x_window_focus(Ecore_X_Window win) */ EAPI void ecore_x_window_focus_at_time(Ecore_X_Window win, - Ecore_X_Time time) + Ecore_X_Time time __UNUSED__) { LOGFN(__FILE__, __LINE__, __FUNCTION__); CHECK_XCB_CONN; if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root; - xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_PARENT, win, time); + xcb_set_input_focus(_ecore_xcb_conn, + XCB_INPUT_FOCUS_PARENT, win, XCB_CURRENT_TIME); // ecore_x_flush(); }