Support 'focus_skip_set' request - set ec->icccm.accepts_focus as zero 95/40295/2
authorDuna Oh <duna.oh@samsung.com>
Tue, 2 Jun 2015 04:15:48 +0000 (13:15 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 2 Jun 2015 10:37:18 +0000 (03:37 -0700)
Change-Id: Ieeb74d2ca16977e51582bedd5c868d5f40a9ce0a
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/bin/e_client.c
src/bin/e_comp_object.c
src/bin/e_comp_wl.c
src/bin/e_comp_wl.h
src/bin/e_pixmap.c
src/modules/wl_desktop_shell/e_mod_main.c

index c599e78534603d2025f9facc0dc97d8a983164f2..a278ff29f8f8c79fe0094f611a99e06663b2d81f 100644 (file)
@@ -3562,12 +3562,9 @@ e_client_focus_set_with_pointer(E_Client *ec)
    /* note: this is here as it seems there are enough apps that do not even
     * expect us to emulate a look of focus but not actually set x input
     * focus as we do - so simply abort any focuse set on such windows */
-   if (e_pixmap_is_x(ec->pixmap))
-     {
-        /* be strict about accepting focus hint */
-        if ((!ec->icccm.accepts_focus) &&
-            (!ec->icccm.take_focus)) return;
-     }
+   /* be strict about accepting focus hint */
+   if ((!ec->icccm.accepts_focus) &&
+       (!ec->icccm.take_focus)) return;
    if (ec->lock_focus_out) return;
    if (ec == focused) return;
    evas_object_focus_set(ec->frame, 1);
index e6b253d84105214a71071ad3852ad33421f7ab19..7bfc7dabadd188012d8fdee1bcbe3af944f54e57 100644 (file)
@@ -1517,12 +1517,9 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus)
     * expect us to emulate a look of focus but not actually set x input
     * focus as we do - so simply abort any focuse set on such windows */
    /* be strict about accepting focus hint */
-   if (e_pixmap_is_x(ec->pixmap))
-     {
-        /* be strict about accepting focus hint */
-        if ((!ec->icccm.accepts_focus) &&
-            (!ec->icccm.take_focus)) return;
-     }
+   /* be strict about accepting focus hint */
+   if ((!ec->icccm.accepts_focus) &&
+       (!ec->icccm.take_focus)) return;
    if (focus && ec->lock_focus_out) return;
    if (e_object_is_del(E_OBJECT(ec)) && focus)
      CRI("CAN'T FOCUS DELETED CLIENT!");
index 84f60cce82e2872715398991deb56a7f45708bf0..2ebbfa6454d023661c11aec28b21ff8fb53f3746 100644 (file)
@@ -2573,6 +2573,10 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
    ec->comp_data->scaler.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
    ec->comp_data->scaler.buffer_viewport.surface.width = -1;
 
+   E_Comp_Client_Data *p_cdata = e_pixmap_cdata_get(ec->pixmap);
+   EINA_SAFETY_ON_NULL_RETURN(p_cdata);
+   ec->comp_data->accepts_focus = p_cdata->accepts_focus;
+
    /* add this client to the hash */
    /* eina_hash_add(clients_win_hash, &win, ec); */
    e_hints_client_list_set();
index 659f13a602616997aa9b0c2c933e2a2f8f83df2f..83514fc62276f540018c88cc0d8eabe1e0e8cc85 100644 (file)
@@ -324,6 +324,7 @@ struct _E_Comp_Wl_Client_Data
    Eina_Bool set_win_type : 1;
    Eina_Bool frame_update : 1;
    Eina_Bool focus_update : 1;
+   unsigned char accepts_focus : 1;
 };
 
 struct _E_Comp_Wl_Output
index d7a59e0bc326ebaa7a836811df4e94202bff7449..a9268acee3d7798f62e6819c433d02c0fc446780 100644 (file)
@@ -162,6 +162,7 @@ _e_pixmap_new(E_Pixmap_Type type)
    cp->cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
    cp->cdata->pending.buffer_viewport.surface.width = -1;
    cp->cdata->pending.buffer_viewport.changed = 0;
+   cp->cdata->accepts_focus = 1;
 #endif
    return cp;
 }
index 91c9b75345cb946cbf3dda6f71db83da343246f0..ad9665808831e21c38e7b8fa1696cd1840733a70 100644 (file)
@@ -1211,6 +1211,10 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
    ec->border.changed = ec->changes.border = !ec->borderless;
    ec->netwm.type = E_WINDOW_TYPE_NORMAL;
    ec->comp_data->set_win_type = EINA_TRUE;
+
+   E_Comp_Client_Data *p_cdata = e_pixmap_cdata_get(ep);
+   EINA_SAFETY_ON_NULL_RETURN(p_cdata);
+   ec->icccm.accepts_focus = ec->icccm.take_focus = p_cdata->accepts_focus;
 }
 
 static void