e_client/e_policy/e_zone: change code to use ec->maximize_type instead of e_config... 54/300454/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 25 Oct 2023 05:10:38 +0000 (14:10 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 25 Oct 2023 07:50:08 +0000 (16:50 +0900)
Change-Id: I713731fb129336873caba9a0cfe74de1e4e943b9

src/bin/e_client.c
src/bin/e_comp_wl_shell.c
src/bin/e_policy_wl.c
src/bin/e_xdg_shell_v6.c
src/bin/e_zone.c

index 8fe284f..6101354 100644 (file)
@@ -6256,7 +6256,7 @@ e_client_unfullscreen(E_Client *ec)
                                            ec->saved.w, ec->saved.h);
 
    if (ec->saved.maximized)
-     e_client_maximize(ec, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+     e_client_maximize(ec, (ec->maximize_type & E_MAXIMIZE_TYPE) |
                        ec->saved.maximized);
 
    e_client_layer_set(ec, ec->saved.layer);
index 9664a8f..8e2240c 100644 (file)
@@ -575,7 +575,7 @@ _e_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct w
      {
         unsigned int edges = 0;
 
-        e_client_maximize(ec, ((e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+        e_client_maximize(ec, ((ec->maximize_type & E_MAXIMIZE_TYPE) |
                                E_MAXIMIZE_BOTH));
 
         edges = (WL_SHELL_SURFACE_RESIZE_TOP | WL_SHELL_SURFACE_RESIZE_LEFT);
@@ -1127,7 +1127,7 @@ _e_xdg_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, stru
    if (!ec->lock_user_maximize)
      {
         e_client_maximize(ec,
-                          ((e_config->maximize_policy & E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH));
+                          ((ec->maximize_type & E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH));
      }
 }
 
index a811ff5..9691e09 100644 (file)
@@ -4893,8 +4893,11 @@ _tzsh_iface_cb_srv_create(struct wl_client *client, struct wl_resource *res_tzsh
                                   tzsh_srv,
                                   _tzsh_cb_srv_destroy);
 
-   if (tzsh_srv->ec->maximized)
-     e_client_maximize(ec, E_MAXIMIZE_FULLSCREEN | E_MAXIMIZE_BOTH);
+   if (tzsh_srv->ec && tzsh_srv->ec->maximized)
+     {
+        tzsh_srv->ec->maximize_type = E_MAXIMIZE_TYPE_FULLSCREEN;
+        e_client_maximize(tzsh_srv->ec, tzsh_srv->ec->maximize_type | E_MAXIMIZE_BOTH);
+     }
 
    if (role == TZSH_SRV_ROLE_QUICKPANEL_SYSTEM_DEFAULT)
      e_service_quickpanel_client_add(tzsh_srv->ec, E_SERVICE_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
index 11d3758..9c21489 100644 (file)
@@ -820,7 +820,7 @@ _e_xdg_toplevel_cb_maximized_set(struct wl_client *client, struct wl_resource *r
           {
              e_client_layout_apply(ec, EINA_FALSE);
 
-             max = (e_config->maximize_policy & E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
+             max = ec->maximize_type | E_MAXIMIZE_BOTH;
              e_client_maximize(ec, max);
           }
      }
index b289e5f..fe22bf2 100644 (file)
@@ -1204,7 +1204,7 @@ _e_zone_cb_hook_client_unfullscreen(void *d, E_Client *ec)
                                            ec->saved.w, ec->saved.h);
 
    if (ec->saved.maximized)
-     e_client_maximize(ec, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+     e_client_maximize(ec, (ec->maximize_type & E_MAXIMIZE_TYPE) |
                        ec->saved.maximized);
 
    e_client_layer_set(ec, ec->saved.layer);