e_policy_wl: add callback functions for set/unset pin mode 73/289373/1 accepted/tizen/unified/20230307.101624
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 6 Mar 2023 11:23:07 +0000 (20:23 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 6 Mar 2023 22:33:48 +0000 (07:33 +0900)
Change-Id: I3e4f8442a525b77bb542213eeebfd2ed104012dc

src/bin/e_policy_wl.c

index d67bc20b9330b751a43a36572af85d273e0e5c5b..261b53ec66430c2439721d191c6cfdc2569ef27d 100644 (file)
@@ -3513,6 +3513,33 @@ _tzpol_iface_cb_set_maximize_direction(struct wl_client *client EINA_UNUSED, str
      }
 }
 
+static void
+_e_policy_set_pin_mode(E_Client *ec, Eina_Bool pinned)
+{
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+   EINA_SAFETY_ON_NULL_RETURN(ec->frame);
+
+   ELOGF("TZPOL", "Set Pin mode to %d", ec, pinned);
+   e_client_pinned_set(ec, pinned);
+}
+
+static void
+_tzpol_iface_cb_set_pin_mode(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
+{
+   E_Client *ec;
+
+   ec = wl_resource_get_user_data(surf);
+   _e_policy_set_pin_mode(ec, EINA_TRUE);
+}
+
+static void
+_tzpol_iface_cb_unset_pin_mode(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
+{
+   E_Client *ec;
+
+   ec = wl_resource_get_user_data(surf);
+   _e_policy_set_pin_mode(ec, EINA_FALSE);
+}
 
 // --------------------------------------------------------
 // tizen_policy_interface
@@ -3564,6 +3591,8 @@ static const struct tizen_policy_interface _tzpol_iface =
    _tzpol_iface_cb_set_transient_for_below,
    _tzpol_iface_cb_set_parent_with_below,
    _tzpol_iface_cb_set_maximize_direction,
+   _tzpol_iface_cb_set_pin_mode,
+   _tzpol_iface_cb_unset_pin_mode,
 };
 
 static void