forked from enlightenment/enlightenment
always create new client for wl shell surfaces
this should be a more correct way of handling (shell) surfaces since there's never a time when we won't want to create a new client
This commit is contained in:
parent
bb436e6750
commit
3e4d5ddfc3
|
@ -562,19 +562,15 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso
|
|||
/* find the client for this pixmap */
|
||||
ec = e_pixmap_client_get(ep);
|
||||
|
||||
if (!ec)
|
||||
if (ec) e_pixmap_ref(ec->pixmap);
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 1)))
|
||||
{
|
||||
/* no client found. not internal window. maybe external client app ? */
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 0)))
|
||||
{
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
|
||||
ec->netwm.ping = EINA_TRUE;
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
ec->netwm.ping = EINA_TRUE;
|
||||
|
||||
/* get the client data */
|
||||
if (!(cdata = ec->comp_data))
|
||||
|
@ -1140,16 +1136,13 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
|
|||
/* find the client for this pixmap */
|
||||
ec = e_pixmap_client_get(ep);
|
||||
|
||||
if (!ec)
|
||||
if (ec) e_pixmap_ref(ec->pixmap);
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 1)))
|
||||
{
|
||||
/* no client found. not internal window. maybe external client app ? */
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 0)))
|
||||
{
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
|
||||
ec->netwm.ping = EINA_TRUE;
|
||||
|
@ -1239,18 +1232,13 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource
|
|||
/* find the client for this pixmap */
|
||||
ec = e_pixmap_client_get(ep);
|
||||
|
||||
if (!ec)
|
||||
if (ec) e_pixmap_ref(ec->pixmap);
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 1)))
|
||||
{
|
||||
/* no client found. create one */
|
||||
if (!(ec = e_client_new(NULL, ep, 0, 1)))
|
||||
{
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
|
||||
/* e_pixmap_ref(ep); */
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"No Client For Pixmap");
|
||||
return;
|
||||
}
|
||||
|
||||
/* get the client data */
|
||||
|
|
Loading…
Reference in New Issue