m_event_callback = NULL;
m_display = NULL;
m_uuid = NULL;
+
+ m_window_created = FALSE;
+ m_window_creation_defer_flag = FALSE;
}
CSCLCoreImpl::~CSCLCoreImpl()
}
}
- ret = m_core_ui.create_main_window();
+ if (!m_window_creation_defer_flag) {
+ LOGD("defer_flag FALSE, creating main window");
+ m_window_created = m_core_ui.create_main_window();
+ ret = m_window_created;
+ }
if (ret) {
m_connection.open_connection(m_display);
}
sclwindow CSCLCoreImpl::get_main_window()
{
+ if (!m_window_created) {
+ LOGD("create main window\n");
+ m_window_created = m_core_ui.create_main_window();
+ }
+
return m_core_ui.get_main_window();
}
void CSCLCoreImpl::set_floating_drag_enabled(sclboolean enabled)
{
m_core_ui.set_floating_drag_enabled(enabled);
-}
\ No newline at end of file
+}
+
+void CSCLCoreImpl::set_window_creation_defer_flag(sclboolean flag)
+{
+ LOGD("defer_flag %d", flag);
+ m_window_creation_defer_flag = flag;
+}
void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
void set_floating_mode(sclboolean floating_mode);
void set_floating_drag_enabled(sclboolean enabled);
+
+ void set_window_creation_defer_flag(sclboolean flag);
private:
ISCLCoreEventCallback *m_event_callback;
CSCLConnection m_connection;
CSCLCoreUI m_core_ui;
sclchar *m_uuid;
+
+ sclboolean m_window_creation_defer_flag;
+ sclboolean m_window_created;
};
}
#include <vconf-keys.h>
#include <glib.h>
+#include <malloc.h>
#ifdef WAYLAND
#include <Ecore_Wayland.h>
#include <input-method-client-protocol.h>
&set, 1);
ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF");
+#else
+ evas_object_show(main_window);
#endif
Evas_Coord win_w = 0, win_h = 0;
landscape.height = win_w / 3;
set_keyboard_size_hints(portrait, landscape);
+#ifdef WAYLAND
+ evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, NULL);
+ evas_object_show(main_window);
+#else
+ Ecore_Event_Handler *XClientMsgHandler =
+ ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this);
+#endif
return TRUE;
}
int CSCLCoreUIEFL::create(void *data)
{
- Evas_Object *main_window = NULL;
+ LOGD("");
+
CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
if (impl) {
if (!impl->prepare()) {
appcore_efl_fini();
return -1;
}
-
- main_window = NATIVE_WINDOW_CAST(impl->get_main_window());
- if (!main_window) {
- LOGW("Main window does not exist!");
- appcore_efl_fini();
- return -1;
- }
}
appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, language_changed_cb, NULL);
language_changed_cb(NULL, NULL);
accessibility_changed_cb(NULL, NULL);
-#ifdef WAYLAND
- evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, NULL);
-#else
- Ecore_Event_Handler *XClientMsgHandler =
- ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this);
-#endif
-
signal(SIGQUIT, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
signal(SIGHUP, signal_handler);
-#ifdef WAYLAND
- evas_object_show(main_window);
-#endif
-
return 0;
}
static int app_create_cb(void *data)
{
CSCLCoreUIEFL *sclui = static_cast<CSCLCoreUIEFL *>(data);
- if (sclui)
- return sclui->create(data);
+ if (sclui) {
+ int ret = sclui->create(data);
+ elm_cache_all_flush();
+ malloc_trim(0);
+ return ret;
+ }
return -1;
}