aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-04-05 20:52:50 (GMT)
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-04-05 20:52:50 (GMT)
commitae7af6b8ef7a29968fafe01017179b12638970fb (patch)
tree35609d19fe002465a0d86499169479610e6a702b
parentredo xdg shell to enforce double buffering of client-side configure serials (diff)
downloadenlightenment-ae7af6b8ef7a29968fafe01017179b12638970fb.tar.gz
add E_Client->saved.frame to handle mismatched csd states
if csd exists in only one of (before || after) a maximize/fullscreen, this provides info so that the right size can be used when restoring geometry
-rw-r--r--src/bin/e_client.c27
-rw-r--r--src/bin/e_client.h1
2 files changed, 22 insertions, 6 deletions
diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 2ef6a2f..8ad3d04 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -3796,6 +3796,7 @@ e_client_maximize(E_Client *ec, E_Maximize max)
}
ec->saved.zone = ec->zone->num;
+ ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));
_e_client_maximize(ec, max);
@@ -3911,13 +3912,19 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
ec->maximize_override = 1;
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
e_client_resize_limit(ec, &w, &h);
- e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
- e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
+ if (ec->saved.frame &&
+ (e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame))))
+ {
+ e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
+ e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
+ }
_e_client_maximize_run(ec, x, y, w, h);
if (vert)
ec->saved.h = ec->saved.y = 0;
if (horiz)
ec->saved.w = ec->saved.x = 0;
+ if (vert && horiz)
+ ec->saved.frame = 0;
}
e_hints_window_maximized_set(ec, ec->maximized & E_MAXIMIZE_HORIZONTAL,
ec->maximized & E_MAXIMIZE_VERTICAL);
@@ -3961,6 +3968,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
ec->saved.y = ec->client.y - ec->zone->y;
ec->saved.w = ec->client.w;
ec->saved.h = ec->client.h;
+ ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));
}
ec->saved.maximized = ec->maximized;
ec->saved.zone = ec->zone->num;
@@ -3972,6 +3980,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
ec->saved.y = y;
ec->saved.w = w;
ec->saved.h = h;
+ ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));
}
ec->saved.layer = ec->layer;
@@ -4029,10 +4038,16 @@ e_client_unfullscreen(E_Client *ec)
_e_client_frame_update(ec);
ec->fullscreen_policy = 0;
evas_object_smart_callback_call(ec->frame, "unfullscreen", NULL);
- e_client_util_move_resize_without_frame(ec, ec->zone->x + ec->saved.x,
- ec->zone->y + ec->saved.y,
- ec->saved.w, ec->saved.h);
-
+ if (ec->saved.frame &&
+ (e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame))))
+ e_client_util_move_resize_without_frame(ec, ec->zone->x + ec->saved.x,
+ ec->zone->y + ec->saved.y,
+ ec->saved.w, ec->saved.h);
+ else
+ evas_object_geometry_set(ec->frame, ec->zone->x + ec->saved.x,
+ ec->zone->y + ec->saved.y,
+ ec->saved.w, ec->saved.h);
+ ec->saved.frame = 0;
if (ec->saved.maximized)
e_client_maximize(ec, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
ec->saved.maximized);
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 13d24fd..c73c3db 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -309,6 +309,7 @@ struct E_Client
E_Layer layer;
int zone;
E_Maximize maximized;
+ Eina_Bool frame : 1;
} saved;
struct