#include <bluetooth.h>
#include <bluetooth_internal.h>
#include <feedback.h>
-#include "bt-syspopup-m.h"
#include <notification.h>
#include <bundle.h>
#include <app_control.h>
#include <glib.h>
#include <gio/gio.h>
#include <gio/giotypes.h>
+#include <efl_util.h>
+#include <Ecore_Wayland.h>
+
+#include "bt-syspopup-m.h"
static void __bluetooth_delete_input_view(struct bt_popup_appdata *ad);
static void __bluetooth_win_del(void *data);
static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad);
-//static void __bluetooth_set_win_level(Evas_Object *parent);
+static void __bluetooth_set_win_level(Evas_Object *parent);
static void __popup_terminate(void);
elm_object_style_set(ad->popup, "transparent");
/*set window level to HIGH*/
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
layout = elm_layout_add(ad->popup);
elm_layout_file_set(layout, CUSTOM_POPUP_PATH, "auth_popup");
elm_popup_align_set(ad->popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
/*set window level to HIGH*/
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
#ifdef TIZEN_REDWOOD
elm_object_style_set(ad->popup, "transparent");
evas_object_size_hint_weight_set(passpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
/*set window level to HIGH*/
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
elm_object_part_text_set(passpopup, "title,text", title);
elm_popup_align_set(ad->popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
/*set window level to HIGH*/
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
if (title != NULL)
elm_object_part_text_set(ad->popup, "title,text", title);
eext_object_event_callback_add(ad->popup, EEXT_CALLBACK_BACK, func, ad);
/*set window level to HIGH*/
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
if (title)
elm_object_part_text_set(ad->popup, "title,text", title);
elm_object_part_text_set(ad->popup, "elm.text.content", toast_text);
evas_object_smart_callback_add(ad->popup, "block,clicked", __bluetooth_popup_block_clicked_cb, NULL);
-// __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
evas_object_show(ad->popup);
FN_END;
BT_DBG("+");
}
-/* utilx and ecore_x APIs are unnecessary in Tizen 3.x based on wayland */
-#if 0
static void __bluetooth_set_win_level(Evas_Object *parent)
{
ret_if(!parent);
- Ecore_X_Window xwin;
- int lock_state;
+ BT_DBG("Setting window type");
- xwin = elm_win_xwindow_get(parent);
- if (xwin == 0) {
- BT_ERR("elm_win_xwindow_get is failed");
- } else {
- BT_DBG("Setting window type");
- ecore_x_netwm_window_type_set(xwin,
- ECORE_X_WINDOW_TYPE_NOTIFICATION);
- if (vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock_state) != 0)
- BT_ERR("Fail to get the lock_state value");
-
- /*
- Issue: Pairing request pop appears in the Lock screen when DUT is locked
- and observed inconsistency. (TMWC-746)
- In platform image, don't have the additional logic to handle this.
- So just the set notification level as LOW.
- */
- if (lock_state == VCONFKEY_IDLE_UNLOCK) {
- utilx_set_system_notification_level(ecore_x_display_get(),
- xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
- } else
- utilx_set_system_notification_level(ecore_x_display_get(),
- xwin, UTILX_NOTIFICATION_LEVEL_LOW);
- }
+ Ecore_Wl_Window * wl_win = NULL;
+
+ wl_win = elm_win_wl_window_get(parent);
+ ret_if(!wl_win);
+
+ ecore_wl_window_type_set(wl_win, ECORE_WL_WINDOW_TYPE_NOTIFICATION);
+ efl_util_set_notification_window_level(parent, EFL_UTIL_NOTIFICATION_LEVEL_HIGH);
}
-#endif
static Evas_Object *__bluetooth_create_win(const char *name)
{
BT_ERR("__bt_syspopup_init_app_signal failed");
}
+#if 0
static void __bluetooth_vconf_change_cb(keynode_t *key, void *data)
{
retm_if(NULL == key, "key is NULL");
retm_if(NULL == data, "data is NULL");
-#if 0
+
struct bt_popup_appdata *ad = data;
char *vconf_name = vconf_keynode_get_name(key);
if (!g_strcmp0(vconf_name, VCONFKEY_IDLE_LOCK_STATE) &&
ad->popup)
- __bluetooth_set_win_level(ad->popup);
-#endif
+ __bluetooth_set_win_level(ad->win_main);
}
+#endif
static bool __bluetooth_create(void *data)
{
Evas_Object *win = NULL;
Evas_Object *conformant = NULL;
Evas_Object *layout = NULL;
- int ret;
BT_DBG("__bluetooth_create() start.");
ecore_imf_init();
__bluetooth_session_init(ad);
+#if 0
+{
+ int ret;
+
ret = vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_STATE,
__bluetooth_vconf_change_cb, ad);
if (ret != 0)
BT_ERR("vconf_notify_key_changed fail!");
-
+}
+#endif
if (bt_initialize() != BT_ERROR_NONE)
BT_ERR("bt_initialize is failed");
__bluetooth_notify_event(ad);
/* Change LCD brightness */
- ret = device_display_change_state(DISPLAY_STATE_NORMAL);
+ ret = display_change_state(LCD_NORMAL);
if (ret != 0)
BT_ERR("Fail to change LCD");
}
__bluetooth_notify_event(ad);
/* Change LCD brightness */
- ret = device_display_change_state(DISPLAY_STATE_NORMAL);
+ ret = display_change_state(LCD_NORMAL);
if (ret != 0)
BT_ERR("Fail to change LCD");
}
#include <app_control_internal.h>
#include <glib.h>
#include <gio/gio.h>
+#include <efl_util.h>
+#include <Ecore_Wayland.h>
#define COLOR_TABLE "/usr/apps/org.tizen.bt-syspopup/shared/res/tables/com.samsung.bt-syspopup_ChangeableColorTable.xml"
#define FONT_TABLE "/usr/apps/org.tizen.bt-syspopup/shared/res/tables/com.samsung.bt-syspopup_FontInfoTable.xml"
static void __bluetooth_set_win_level(Evas_Object *parent)
{
-#if 0
- Ecore_X_Window xwin;
- xwin = elm_win_xwindow_get(parent);
- if (xwin == 0) {
- BT_ERR("elm_win_xwindow_get is failed");
- } else {
- BT_DBG("Setting window type");
- ecore_x_netwm_window_type_set(xwin,
- ECORE_X_WINDOW_TYPE_NOTIFICATION);
- utilx_set_system_notification_level(ecore_x_display_get(),
- xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
- }
-#endif
+ Ecore_Wl_Window * wl_win = NULL;
+
+ wl_win = (void *)elm_win_wl_window_get(parent);
+ ret_if(!wl_win);
+
+ ecore_wl_window_type_set(wl_win, ECORE_WL_WINDOW_TYPE_NOTIFICATION);
+ efl_util_set_notification_window_level(parent, EFL_UTIL_NOTIFICATION_LEVEL_HIGH);
}
static void __bluetooth_popup_hide_cb(void *data, Evas_Object *obj, void *event_info)
evas_object_smart_callback_add(ad->popup, "dismissed",
__bluetooth_popup_hide_finished_cb, NULL);
- __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
layout = elm_layout_add(ad->popup);
elm_layout_theme_set(layout, "layout", "popup",
"content/circle/buttons1");
eext_object_event_callback_add(ad->popup, EEXT_CALLBACK_BACK, __bluetooth_popup_hide_cb, NULL);
evas_object_smart_callback_add(ad->popup, "dismissed", __bluetooth_popup_hide_finished_cb, NULL);
- __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
layout = elm_layout_add(ad->popup);
elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
eext_object_event_callback_add(ad->popup, EEXT_CALLBACK_BACK, __bluetooth_popup_hide_cb, NULL);
evas_object_smart_callback_add(ad->popup, "dismissed", __bluetooth_popup_hide_finished_cb, NULL);
- __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
layout = elm_layout_add(ad->popup);
elm_layout_file_set(layout, CUSTOM_POPUP_PATH, "no_button_passkey_confirm_popup");
evas_object_smart_callback_add(ad->popup, "block,clicked", __bluetooth_popup_block_clicked_cb, NULL);
elm_object_part_text_set(ad->popup, "elm.text", toast_text);
- __bluetooth_set_win_level(ad->popup);
+ __bluetooth_set_win_level(ad->win_main);
evas_object_show(ad->popup);
evas_object_show(ad->win_main);
BT_INFO("Block mode is not set");
/* Change LCD brightness */
- if (device_display_change_state(DISPLAY_STATE_NORMAL) != 0)
+ if (display_change_state(LCD_NORMAL) != 0)
BT_ERR("Fail to change LCD");
if (ad->event_type == BT_EVENT_PASSKEY_CONFIRM_REQUEST ||