e_comp_wl: Simplify if condition 64/318264/1
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 14 Jan 2025 07:33:49 +0000 (16:33 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 15 Jan 2025 00:34:48 +0000 (09:34 +0900)
No need to check `mapped` becasue it's also checked in the function,
e_client_hide().

Change-Id: I2e7ae004d77fdde8cad58dc60bad804d750bfbe1

src/bin/server/e_comp_wl.c

index fbb0d8cf57ce39fa0626ad9929b5504d5626dcc9..0ff204afffdf39c2755d704ddfaa314711d23a26 100644 (file)
@@ -2974,22 +2974,13 @@ _e_comp_wl_client_map_update(E_Client *ec)
    Eina_Bool pixmap_usable = e_pixmap_usable_get(ec->pixmap);
    Eina_Bool hide_by_request = e_client_hide_by_request_get(ec);
 
-   /* map or unmap ec */
-   if (!pixmap_usable || hide_by_request)
-     {
-        /* unmap ec */
-        if (ec->comp_data->mapped)
-          {
-             ELOGF("COMP", "Unmap. pixmap_usable:%d", ec, pixmap_usable);
+   ELOGF("COMP", "Update map state. pixmap_usable:%d, hide_by_reuqest:%d",
+         ec, pixmap_usable, hide_by_request);
 
-             e_client_hide(ec);
-          }
-     }
+   if (pixmap_usable && !hide_by_request)
+     e_client_show(ec);
    else
-     {
-        /* map ec */
-        e_client_show(ec);
-     }
+     e_client_hide(ec);
 }
 
 static void