static Eina_Bool _pol_cb_client_move(void *data EINA_UNUSED, int type, void *event);
static Eina_Bool _pol_cb_client_resize(void *data EINA_UNUSED, int type, void *event);
static Eina_Bool _pol_cb_client_stack(void *data EINA_UNUSED, int type, void *event);
-#ifndef HAVE_WAYLAND_ONLY
static Eina_Bool _pol_cb_client_property(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
+static Eina_Bool _pol_cb_client_vis_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED);
+#ifndef HAVE_WAYLAND_ONLY
static Eina_Bool _pol_cb_window_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Property *ev);
+static Eina_Bool _pol_cb_window_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Configure_Request *ev);
#endif
static void
return EINA_FALSE;
}
+static Eina_Bool
+_pol_cb_client_vis_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
+{
+#ifdef HAVE_WAYLAND_ONLY
+ e_mod_pol_wl_win_scrmode_apply();
+#endif
+ return ECORE_CALLBACK_PASS_ON;
+}
+
#ifndef HAVE_WAYLAND_ONLY
static Eina_Bool
_pol_cb_window_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Property *ev)
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_RESIZE, _pol_cb_client_resize, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_STACK, _pol_cb_client_stack, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_PROPERTY, _pol_cb_client_property, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_VISIBILITY_CHANGE, _pol_cb_client_vis_change, NULL);
+
#ifndef HAVE_WAYLAND_ONLY
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_PROPERTY, _pol_cb_window_property, NULL);
static Eina_Hash *hash_policy_conformants = NULL;
static Eina_Hash *hash_window_screen_modes = NULL;
static Eina_List *_window_screen_modes = NULL;
-static Eina_List *_handlers = NULL;
static Pol_Wayland*
_pol_wayland_get_info(E_Pixmap *cp)
}
static void
-_window_screen_mode_apply(void)
-{
- //traversal e_client loop
- // if e_client is visible then apply screen_mode
- // if all e_clients are default mode then set default screen_mode
- return;
-}
-
-static void
_pol_surface_parent_set(E_Client *ec, struct wl_resource *parent_resource)
{
E_Pixmap *pp;
wsm->surface = surface;
wsm->interface = resource;
- _window_screen_mode_apply();
+ e_mod_pol_wl_win_scrmode_apply();
/* Add other error handling code on window_screen send done. */
tizen_policy_send_window_screen_mode_done(resource, surface, mode, TIZEN_POLICY_ERROR_STATE_NONE);
wl_resource_set_implementation(res, &_e_tizen_policy_interface, cdata, NULL);
}
-static Eina_Bool
-_cb_client_visibility_change(void *data EINA_UNUSED,
- int type EINA_UNUSED,
- void *event)
+void
+e_mod_pol_wl_win_scrmode_apply(void)
{
- //E_Event_Client *ev;
- //ev = event;
-
- _window_screen_mode_apply();
-
- return ECORE_CALLBACK_PASS_ON;
+ // TODO: update screen mode for ec which was changed to be visible
+ ;
}
Eina_Bool
hash_policy_conformants = eina_hash_pointer_new(free);
hash_window_screen_modes = eina_hash_pointer_new(free);
- E_LIST_HANDLER_APPEND(_handlers, E_EVENT_CLIENT_VISIBILITY_CHANGE,
- _cb_client_visibility_change, NULL);
-
return EINA_TRUE;
}
E_FREE_FUNC(hash_policy_conformants, eina_hash_free);
eina_list_free(_window_screen_modes);
- E_FREE_LIST(_handlers, ecore_event_handler_del);
E_FREE_FUNC(hash_window_screen_modes, eina_hash_free);
}
/* notification */
void e_mod_pol_wl_notification_level_fetch(E_Client *ec);
void e_mod_pol_wl_keyboard_geom_broadcast(E_Client *ec);
+
+/* window screenmode */
+void e_mod_pol_wl_win_scrmode_apply(void);
+
#endif /* HAVE_WAYLAND_ONLY */
#endif /* E_MOD_WL_H */