raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=230569da1a3cd4facedeab3c5538bde763e392ed

commit 230569da1a3cd4facedeab3c5538bde763e392ed
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat Oct 17 22:52:11 2020 +0100

    winlist - support window thumbnails if theme supports it
---
 src/modules/winlist/e_winlist.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c
index 24e5ad5f7..4533590c9 100644
--- a/src/modules/winlist/e_winlist.c
+++ b/src/modules/winlist/e_winlist.c
@@ -8,6 +8,7 @@ struct _E_Winlist_Win
 {
    Evas_Object  *bg_object;
    Evas_Object  *icon_object;
+   Evas_Object  *win_object;
    E_Client     *client;
    unsigned char was_iconified E_BITFIELD;
    unsigned char was_shaded E_BITFIELD;
@@ -41,6 +42,7 @@ static E_Zone *_winlist_zone = NULL;
 static Evas_Object *_bg_object = NULL;
 static Evas_Object *_list_object = NULL;
 static Evas_Object *_icon_object = NULL;
+static Evas_Object *_win_object = NULL;
 static Eina_List *_wins = NULL;
 static Eina_List *_win_selected = NULL;
 static E_Desk *_last_desk = NULL;
@@ -266,6 +268,7 @@ e_winlist_hide(void)
      }
    _win_selected = NULL;
    _icon_object = NULL;
+   _win_object = NULL;
 
    evas_object_del(_winlist);
    e_client_focus_track_thaw();
@@ -674,6 +677,16 @@ _e_winlist_client_add(E_Client *ec, E_Zone *zone, E_Desk 
*desk)
         edje_object_part_swallow(ww->bg_object, "e.swallow.icon", o);
         evas_object_show(o);
      }
+   if (edje_object_part_exists(ww->bg_object, "e.swallow.win"))
+     {
+        o = e_comp_object_util_mirror_add(ec->frame);
+        ww->win_object = o;
+        e_comp_object_util_del_list_append(_winlist, o);
+        evas_object_size_hint_aspect_set(o, EVAS_ASPECT_CONTROL_BOTH,
+                                         ec->client.w, ec->client.h);
+        edje_object_part_swallow(ww->bg_object, "e.swallow.win", o);
+        evas_object_show(o);
+     }
    if (ec->shaded)
      edje_object_signal_emit(ww->bg_object, "e,state,shaded", "e");
    else if (ec->iconic)
@@ -720,6 +733,11 @@ _e_winlist_client_del(E_Client *ec)
                   e_comp_object_util_del_list_remove(_winlist, 
ww->icon_object);
                   evas_object_del(ww->icon_object);
                }
+             if (ww->win_object)
+               {
+                  e_comp_object_util_del_list_remove(_winlist, ww->win_object);
+                  evas_object_del(ww->win_object);
+               }
              E_FREE(ww);
              _wins = eina_list_remove_list(_wins, l);
              return;
@@ -847,6 +865,23 @@ _e_winlist_activate(void)
         edje_object_part_swallow(_bg_object, "e.swallow.icon", o);
         evas_object_show(o);
      }
+   if (_win_object)
+     {
+        e_comp_object_util_del_list_remove(_winlist, _win_object);
+        evas_object_del(_win_object);
+        _win_object = NULL;
+     }
+   if (edje_object_part_exists(_bg_object, "e.swallow.win"))
+     {
+        o = e_comp_object_util_mirror_add(ww->client->frame);
+        _win_object = o;
+        e_comp_object_util_del_list_append(_winlist, o);
+        evas_object_size_hint_aspect_set(o, EVAS_ASPECT_CONTROL_BOTH,
+                                         ww->client->client.w,
+                                         ww->client->client.h);
+        edje_object_part_swallow(_bg_object, "e.swallow.win", o);
+        evas_object_show(o);
+     }
 
    edje_object_signal_emit(_bg_object, "e,state,selected", "e");
 }

-- 


Reply via email to