summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-02-10 17:23:44 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-02-10 17:24:13 -0500
commit8f3c9dd796576e00fe2ddf2878b8655d9e69e4e1 (patch)
tree143de65ab8bb1a877abd2a5e02024755f70d0c22
parent476305563cdc07df9bedc3e922421c7a39415aa0 (diff)
downloadenlightenment-8f3c9dd796576e00fe2ddf2878b8655d9e69e4e1.tar.gz
do not use new_client to determine placement-related paths during wl client commit
this is a remnant from xdg5-only code where new_client meant "first buffer". with xdg6, this is no longer the case since a surface can receive infinite commits without ever having a buffer attached ref 9a82f7bcb0650000e31fc34f299af8c7080313ae
-rw-r--r--src/bin/e_comp_wl.c14
-rw-r--r--src/bin/e_comp_wl.h3
2 files changed, 9 insertions, 8 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index f01a7b41d2..e636ce94c6 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1314,7 +1314,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
{
Eina_Bool first = EINA_FALSE;
Eina_Rectangle *dmg;
- Eina_Bool placed = EINA_TRUE;
int x = 0, y = 0, w, h;
first = !e_pixmap_usable_get(ec->pixmap);
@@ -1393,13 +1392,11 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
else
{
x = ec->client.x, y = ec->client.y;
- if (ec->new_client)
+ if (first)
x -= ec->comp_data->shell.window.x, y -= ec->comp_data->shell.window.y;
}
- if (ec->new_client) placed = ec->placed;
-
- if (first && e_client_has_xwindow(ec))
+ if ((!ec->comp_data->buffer_commit) && e_client_has_xwindow(ec))
/* use client geometry to avoid race condition from x11 configure request */
x = ec->x, y = ec->y;
else
@@ -1493,9 +1490,10 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
e_client_util_move_resize_without_frame(ec, x, y, w, h);
}
- if (ec->new_client)
+ if ((!ec->comp_data->sub.data) && (!ec->comp_data->buffer_commit))
{
- ec->placed = placed;
+ if (!ec->internal_elm_win)
+ ec->placed = (!e_client_has_xwindow(ec)) && (ec->netwm.type != E_WINDOW_TYPE_NORMAL);
ec->want_focus |= ec->icccm.accepts_focus && (!ec->override);
}
}
@@ -1504,6 +1502,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
state->sx = 0;
state->sy = 0;
+ if (state->new_attach)
+ ec->comp_data->buffer_commit = 1;
state->new_attach = EINA_FALSE;
/* insert state frame callbacks into comp_data->frames
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index dd7fc0eba0..b0421ae242 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -355,7 +355,8 @@ struct _E_Comp_Wl_Client_Data
Eina_Bool maximizing : 1;
Eina_Bool in_commit : 1;
Eina_Bool is_xdg_surface : 1;
- Eina_Bool grab;
+ Eina_Bool grab : 1;
+ Eina_Bool buffer_commit : 1;
};
struct _E_Comp_Wl_Output