modified code not to map window when the pixmap's size is different from the ec's...
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 28 Mar 2016 02:12:01 +0000 (11:12 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Mar 2016 12:41:23 +0000 (21:41 +0900)
 - there is flickering problem when the window is first shown.
   because the application window request to commit wrong pixmap size.
   we changed code that e does not map window in this case.

Change-Id: If9f63c7133200e1fb3e46c85507178bcde478854

src/bin/e_client.c
src/modules/Makefile.mk
src/modules/wl_desktop_shell/e_mod_main.c

index 8e2e16ba1933f7665f2e703a41bf2226b9acdf70..f8ed7b2519a9ff4056d062f96358055b9b88e88f 100644 (file)
@@ -1628,6 +1628,8 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
 
    if (ec->new_client || ec->iconic) return;
    _e_client_event_simple(ec, E_EVENT_CLIENT_HIDE);
+
+   EC_CHANGED(ec);
 }
 
 static void
@@ -1729,7 +1731,9 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
 static void
 _e_client_cb_evas_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
+   E_Client *ec = data;
    _e_client_event_simple(data, E_EVENT_CLIENT_SHOW);
+   EC_CHANGED(ec);
 }
 
 static void
@@ -2614,7 +2618,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone)
         /* TODO: need to check whether window intersects with entire screen, not zone. */
         /* if (!E_INTERSECTS(ec->x, ec->y, ec->w, ec->h, zone->x, zone->y, zone->w, zone->h)) continue; */
         /* check if internal animation is running */
-        if (e_comp_object_is_animating(ec->frame)) continue;
+        //if (e_comp_object_is_animating(ec->frame)) continue;
         /* check if external animation is running */
         if (evas_object_data_get(ec->frame, "effect_running")) continue;
 
@@ -2813,6 +2817,7 @@ e_client_idler_before(void)
    if (_e_client_layout_cb)
      _e_client_layout_cb();
 
+   Eina_Bool calc_visibility = EINA_FALSE;
    // pass 3 - hide windows needing hide and eval (main eval)
    E_CLIENT_FOREACH(ec)
      {
@@ -2827,9 +2832,7 @@ e_client_idler_before(void)
         if (ec->changed)
           {
              _e_client_eval(ec);
-
-             /* calculate visibility of clients */
-             e_client_visibility_calculate();
+             calc_visibility = EINA_TRUE;
           }
 
         if ((ec->changes.visible) && (ec->visible) && (!ec->changed))
@@ -2837,9 +2840,16 @@ e_client_idler_before(void)
              evas_object_show(ec->frame);
              ec->changes.visible = !evas_object_visible_get(ec->frame);
              ec->changed = ec->changes.visible;
+             calc_visibility = EINA_TRUE;
           }
      }
 
+   if (calc_visibility)
+     {
+        /* calculate visibility of clients */
+        e_client_visibility_calculate();
+     }
+
    TRACE_DS_END();
 }
 
index 12360a5ff05903fd4374d2f7a8bac8e9c12ea842..cdc9f37ca14f893197f21bb78ef113cf96556e80 100644 (file)
@@ -1,6 +1,6 @@
 MDIR = $(libdir)/enlightenment/modules
 MOD_LDFLAGS = -module -avoid-version
-MOD_CPPFLAGS = -I. \
+MOD_CPPFLAGS = -I. -DE_LOGGING=1 \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -I$(top_builddir)/src/bin \
index 4f51de54db2c3cf3c22a2096419ebb1ce21fe65c..4b9b5d4bf95547816d5e993bda7460c944da983a 100644 (file)
@@ -1109,10 +1109,25 @@ _e_xdg_shell_surface_map(struct wl_resource *resource)
 
    if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
      {
-        /* map this surface if needed */
-        ec->visible = EINA_TRUE;
-        evas_object_show(ec->frame);
-        ec->comp_data->mapped = EINA_TRUE;
+        int pw = 0;
+        int ph = 0;
+        e_pixmap_size_get(ec->pixmap, &pw, &ph);
+        if (pw != ec->w || ph != ec->h)
+          {
+             // skip. because the pixmap's size doesnot same to ec's size
+             ELOGF("SHELL",
+                   "Deny Map |win:0x%08x|ec_size:%d,%d|pix_size:%d,%d",
+                   ec->pixmap, ec,
+                   (unsigned int)e_client_util_win_get(ec),
+                   ec->w, ec->h, pw, ph);
+          }
+        else
+          {
+             /* map this surface if needed */
+             ec->visible = EINA_TRUE;
+             evas_object_show(ec->frame);
+             ec->comp_data->mapped = EINA_TRUE;
+          }
 
         /* FIXME: sometimes popup surfaces Do Not raise above their
          * respective parents... */