LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
eina_hash_del(_windows, _ecore_wl_window_id_str_get(win->id), win);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
input = win->keyboard_device;
ecore_wl_window_update_location(win, x, y);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
input = win->keyboard_device;
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
if (win->surface) wl_surface_damage(win->surface, x, y, w, h);
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
if ((win->surface))// && (win->has_buffer))
wl_surface_commit(win->surface);
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
switch (win->buffer_type)
{
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
+
if (win->surface) return win->surface;
if (_ecore_wl_disp->wl.session_recovery)
session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win);
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
if (win->xdg_surface) xdg_surface_destroy(win->xdg_surface);
win->xdg_surface = NULL;
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
/* FIXME: This should raise the xdg surface also */
if (win->shell_surface)
wl_shell_surface_set_toplevel(win->shell_surface);
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
return win->maximized;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
return win->fullscreen;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->transparent = transparent;
if (!win->transparent)
ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y,
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
return win->alpha;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->alpha = alpha;
if (!win->alpha)
ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y,
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
return win->transparent;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->allocation.w = w;
win->allocation.h = h;
if ((!ecore_wl_window_maximized_get(win)) && (!win->fullscreen))
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->allocation.x = x;
win->allocation.y = y;
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
+
return win->surface;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
+
return win->shell_surface;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
+
return win->xdg_surface;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->type = type;
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
win->pointer.surface = surface;
win->pointer.hot_x = hot_x;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
win->pointer.set = EINA_FALSE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
win->pointer.set = EINA_FALSE;
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->parent = parent;
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
if (iconified)
{
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE);
+
return win->minimized;
}
Ecore_Wl_Window *win = NULL;
void *data;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
+
itr = eina_hash_iterator_data_new(_windows);
while (eina_iterator_next(itr, &data))
{
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
win->input.x = x;
win->input.y = y;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
win->opaque.x = x;
win->opaque.y = y;
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
win->rotation = rotation;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return 0;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, 0);
+
return win->rotation;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return 0;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, 0);
+
return win->id;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return 0;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, 0);
+
return win->surface_id;
}
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
eina_stringshare_replace(&win->title, title);
if ((win->xdg_surface) && (win->title))
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return;
+ EINA_SAFETY_ON_NULL_RETURN(win);
+
eina_stringshare_replace(&win->class_name, class_name);
if ((win->xdg_surface) && (win->class_name))
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!win) return 0;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(win, 0);
+
return win->keyboard_device;
}