summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-20 14:59:53 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-20 15:04:07 -0500
commita3266d5d8996c38f7df8bbe05d0987853d9723a7 (patch)
treeab6a5c0591e5181084ce5286f8634d5127dba2ce
parentd659b86478494ba76903100a06f681e32d0ebc6a (diff)
ref clients while a wayland shell surface exists
in the case where a client is deleted, it's possible that the shell surface may persist longer than the duration of the normal client delete cycle, so it's necessary to ensure that the client will continue to exist until the shell surface has been destroyed
-rw-r--r--src/modules/wl_desktop_shell/e_mod_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c
index b817f2b91..040c427d6 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -98,6 +98,7 @@ _e_shell_surface_destroy(struct wl_resource *resource)
98 /* get the client for this resource */ 98 /* get the client for this resource */
99 if ((ec = wl_resource_get_user_data(resource))) 99 if ((ec = wl_resource_get_user_data(resource)))
100 { 100 {
101 if (!e_object_unref(E_OBJECT(ec))) return;
101 if (e_object_is_del(E_OBJECT(ec))) return; 102 if (e_object_is_del(E_OBJECT(ec))) return;
102 103
103 if (ec->comp_data) 104 if (ec->comp_data)
@@ -572,6 +573,8 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso
572 &_e_shell_surface_interface, 573 &_e_shell_surface_interface,
573 ec, _e_shell_surface_cb_destroy); 574 ec, _e_shell_surface_cb_destroy);
574 575
576 e_object_ref(E_OBJECT(ec));
577
575 cdata->shell.configure_send = _e_shell_surface_configure_send; 578 cdata->shell.configure_send = _e_shell_surface_configure_send;
576 cdata->shell.configure = _e_shell_surface_configure; 579 cdata->shell.configure = _e_shell_surface_configure;
577 cdata->shell.ping = _e_shell_surface_ping; 580 cdata->shell.ping = _e_shell_surface_ping;
@@ -1120,6 +1123,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
1120 &_e_xdg_surface_interface, ec, 1123 &_e_xdg_surface_interface, ec,
1121 _e_shell_surface_cb_destroy); 1124 _e_shell_surface_cb_destroy);
1122 1125
1126 e_object_ref(E_OBJECT(ec));
1127
1123 cdata->shell.configure_send = _e_xdg_shell_surface_configure_send; 1128 cdata->shell.configure_send = _e_xdg_shell_surface_configure_send;
1124 cdata->shell.configure = _e_xdg_shell_surface_configure; 1129 cdata->shell.configure = _e_xdg_shell_surface_configure;
1125 cdata->shell.ping = _e_xdg_shell_surface_ping; 1130 cdata->shell.ping = _e_xdg_shell_surface_ping;
@@ -1207,6 +1212,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource
1207 wl_resource_set_implementation(cdata->shell.surface, 1212 wl_resource_set_implementation(cdata->shell.surface,
1208 &_e_xdg_popup_interface, ec, NULL); 1213 &_e_xdg_popup_interface, ec, NULL);
1209 1214
1215 e_object_ref(E_OBJECT(ec));
1216
1210 cdata->shell.configure_send = _e_xdg_shell_surface_configure_send; 1217 cdata->shell.configure_send = _e_xdg_shell_surface_configure_send;
1211 cdata->shell.configure = _e_xdg_shell_surface_configure; 1218 cdata->shell.configure = _e_xdg_shell_surface_configure;
1212 cdata->shell.ping = _e_xdg_shell_surface_ping; 1219 cdata->shell.ping = _e_xdg_shell_surface_ping;