discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=6e5e51c2b8647a41f156e2854be409780492a679

commit 6e5e51c2b8647a41f156e2854be409780492a679
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Oct 23 12:56:56 2015 -0400

    when maximizing a wayland client with csd, use window geometry
    
    wayland clients which have csd must be resized according to window geometry,
    not client (surface) geometry. this is somewhat tricky to handle because x11
    clients which have csd work the exact opposite way and must continue to be
    managed using client geometry
    
    this is not my ideal solution for this issue, but I can't think of a
    better one at this time which fully fixes wayland client maximization
---
 src/bin/e_client.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 142a767..abd5c89 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -1606,8 +1606,13 @@ _e_client_maximize(E_Client *ec, E_Maximize max)
 
         evas_object_smart_callback_call(ec->frame, "maximize", NULL);
         e_client_resize_limit(ec, &w, &h);
-        e_comp_object_frame_xy_unadjust(ec->frame, ec->x, ec->y, &ecx, &ecy);
-        e_comp_object_frame_wh_unadjust(ec->frame, ec->w, ec->h, &ecw, &ech);
+        if (e_comp_object_frame_allowed(ec->frame))
+          {
+             e_comp_object_frame_xy_unadjust(ec->frame, ec->x, ec->y, &ecx, 
&ecy);
+             e_comp_object_frame_wh_unadjust(ec->frame, ec->w, ec->h, &ecw, 
&ech);
+          }
+        else
+          ecx = ec->x, ecy = ec->y, ecw = ec->w, ech = ec->h;
 
         if (ecw < zw)
           w = ecw;
@@ -3745,13 +3750,19 @@ e_client_maximize(E_Client *ec, E_Maximize max)
      {
         /* Horizontal hasn't been set */
         ec->saved.x = ec->client.x - ec->zone->x;
-        ec->saved.w = ec->client.w;
+        if ((!e_comp_object_frame_allowed(ec->frame)) && 
(!e_pixmap_is_x(ec->pixmap)))
+          ec->saved.w = ec->w;
+        else
+          ec->saved.w = ec->client.w;
      }
    if (!(ec->maximized & E_MAXIMIZE_VERTICAL))
      {
         /* Vertical hasn't been set */
         ec->saved.y = ec->client.y - ec->zone->y;
-        ec->saved.h = ec->client.h;
+        if ((!e_comp_object_frame_allowed(ec->frame)) && 
(!e_pixmap_is_x(ec->pixmap)))
+          ec->saved.h = ec->h;
+        else
+          ec->saved.h = ec->client.h;
      }
 
    ec->saved.zone = ec->zone->num;

-- 


Reply via email to