Ecore_X(cb): Fix my focus issues with Sloppy focus.
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 11:41:38 +0000 (11:41 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 11:41:38 +0000 (11:41 +0000)
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

src/lib/ecore_x/xcb/ecore_xcb_icccm.c
src/lib/ecore_x/xcb/ecore_xcb_window.c

index 6459db7..37bda9f 100644 (file)
@@ -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,
index 2616c93..27bceaf 100644 (file)
@@ -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();
 }