unset wl client placed value on first commit to force placement
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 11 Feb 2015 22:57:43 +0000 (17:57 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 11 Feb 2015 22:58:27 +0000 (17:58 -0500)
many clients still have not had a first commit prior to running new_client placement,
so this will force a second run of that algo to prevent placing as though a client's
size = 1x1

src/bin/e_comp_wl.c

index c63c1c386750ff701b379a24864ce38cf6ed9071..c4ecfb857977d15c504498a131ce2d6b3f096c84 100644 (file)
@@ -2503,12 +2503,14 @@ e_comp_wl_surface_commit(E_Client *ec)
    E_Pixmap *ep;
    Eina_Rectangle *dmg;
    Eina_Tiler *src, *tmp;
+   Eina_Bool first;
 
    if (!(ep = ec->pixmap)) return EINA_FALSE;
    _e_comp_wl_client_evas_init(ec);
    if (ec->focused && ec->comp_data->focus_update)
      _e_comp_wl_client_focus(ec);
 
+   first = !e_pixmap_usable_get(ep);
    /* mark the pixmap as usable or not */
    e_pixmap_usable_set(ep, (ec->comp_data->pending.buffer != NULL));
 
@@ -2577,6 +2579,12 @@ e_comp_wl_surface_commit(E_Client *ec)
           e_client_util_move_resize_without_frame(ec, x, y, nw, nh);
         if (ec->new_client)
           ec->placed = placed;
+        else if (first && ec->placed)
+          {
+             ec->x = ec->y = 0;
+             ec->placed = 0;
+             ec->new_client = 1;
+          }
      }
 
    if (!ec->comp_data->mapped)