e_client: change code not to access directly to E_Client structure in e_client.h 26/314426/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 11 Jul 2024 10:36:01 +0000 (19:36 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 11 Jul 2024 11:27:39 +0000 (20:27 +0900)
Change-Id: Iba3b37d04a11914e98df7adb150f55739a39abe1

src/bin/windowmgr/e_focus_policy_history.c
src/bin/windowmgr/e_focus_policy_topmost.c
src/include/e_client.h

index af099eafb9be91a3fc016df30dde6c2b231d88b4..a38d6815b5879f9d7b83004589dcbdf8c5a993db 100644 (file)
@@ -507,7 +507,7 @@ _focus_policy_history_cb_client_mouse_down(struct wl_listener *listener, void *d
    focused_ec = history_policy->focused_ec;
    if ((focused_ec) && (ec != focused_ec))
      {
-        if (e_client_focus_policy_click(ec) ||
+        if (((ec->focus_policy_override == E_FOCUS_CLICK) || (e_config->focus_policy == E_FOCUS_CLICK)) ||
             e_config->always_click_to_focus)
           {
              ELOGF("FOCUS_HISTORY", "focus set   | mouse down", ec);
index e6b3962cf95880db32816157af02028eeca8c2ee..4fdcf1547e12372c8a8ba4a5b67c90144644e91f 100644 (file)
@@ -250,7 +250,7 @@ _focus_policy_topmost_cb_client_mouse_down(struct wl_listener *listener, void *d
    focused_ec = topmost_policy->focused_ec;
    if ((focused_ec) && (ec != focused_ec))
      {
-        if (e_client_focus_policy_click(ec) ||
+        if (((ec->focus_policy_override == E_FOCUS_CLICK) || (e_config->focus_policy == E_FOCUS_CLICK)) ||
             e_config->always_click_to_focus)
           {
              if (ec->floating)
index 1bfae156010018a7edfb652d72208aa77dba3cfd..5c6a51780af996d5a7a8f77a8beffa4acdd9f528 100644 (file)
@@ -1018,21 +1018,7 @@ struct _E_Client
    } fps;
 };
 
-#define e_client_focus_policy_click(ec) \
-  ((ec->focus_policy_override == E_FOCUS_CLICK) || (e_config->focus_policy == E_FOCUS_CLICK))
-
-/* macro for finding misuse of changed flag */
-#if 0
-# define EC_CHANGED(EC) \
-  do { \
-     if (e_object_is_del(E_OBJECT(EC))) \
-       EINA_LOG_CRIT("CHANGED SET ON DELETED CLIENT!"); \
-     EC->changed = 1; \
-     INF("%s:%d - EC CHANGED: %p", __FILE__, __LINE__, EC); \
-  } while (0)
-#else
-# define EC_CHANGED(EC) EC->changed = 1
-#endif
+#define EC_CHANGED(EC) e_client_changed_set(EC, EINA_TRUE)
 
 #define E_CLIENT_FOREACH(EC) \
   for (EC = e_client_bottom_get(); EC; EC = e_client_above_get(EC))