aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-04-18 12:55:35 -0500
committerChris Michael <cp.michael@samsung.com>2018-06-12 08:12:47 -0400
commit1fccd31c73696e5950ae3eb170f52a3337fe1c48 (patch)
tree2ed82a1b234c635ab76af03d02c0993485745fab
parente thumb - be consistent and use safe run for restarting thumbnailer (diff)
downloadenlightenment-1fccd31c73696e5950ae3eb170f52a3337fe1c48.tar.gz
Defer initial xdg configure for iconified wayland clients
Under wayland, if a client declares itself iconified before its first commit, we should wait until it's no longer iconified before sending it a configure. This way it can avoid uselessly rendering buffers that will never be displayed. ref https://phab.enlightenment.org/T6834
-rw-r--r--src/bin/e_comp_wl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 1c0bdccd5..a9adad104 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1559,7 +1559,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
ec->want_focus |= ec->icccm.accepts_focus && (!ec->override);
}
}
- else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface)
+ else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface && !ec->iconic)
_e_comp_wl_configure_send(ec, 0);
state->sx = 0;
@@ -2980,6 +2980,17 @@ end:
_e_comp_wl_gl_shutdown();
}
+static Eina_Bool
+_e_comp_wl_cb_uniconify(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ E_Event_Client *ev = event;
+ E_Client *ec = ev->ec;
+
+ if (ec->comp_data->need_xdg_configure)
+ ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, 0, 0, 0);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
/* public functions */
/**
@@ -3038,6 +3049,9 @@ e_comp_wl_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE,
_e_comp_wl_cb_mouse_move, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_UNICONIFY,
+ _e_comp_wl_cb_uniconify, NULL);
+
/* add hooks to catch e_client events */
e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_wl_client_cb_new, NULL);
e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_wl_client_cb_del, NULL);