Check X display to avoid crash
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 7 Mar 2013 06:47:12 +0000 (15:47 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 7 Mar 2013 07:18:17 +0000 (16:18 +0900)
Change-Id: I19eed03fc83113893591b018f214be6ebe8cf8db

configure.ac
ism/extras/efl_panel/isf_panel_efl.cpp
packaging/isf.spec
releasenote.txt

index 7f61c2d..48a1914 100755 (executable)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script
 #AC_INIT(scim, 1.4.7, suzhe@tsinghua.org.cn)
-AC_INIT(isf, 2.4.6306, isf@samsung.com)
+AC_INIT(isf, 2.4.6307, isf@samsung.com)
 AC_CONFIG_SRCDIR([ism/src/scim.h])
 m4_pattern_allow([^AS_])
 
@@ -11,7 +11,7 @@ m4_pattern_allow([^AS_])
 # ISF version
 ISF_MAJOR_VERSION=2
 ISF_MINOR_VERSION=4
-ISF_MICRO_VERSION=6306
+ISF_MICRO_VERSION=6307
 
 ISF_VERSION=$ISF_MAJOR_VERSION.$ISF_MINOR_VERSION.$ISF_MICRO_VERSION
 
index d1418cf..75a2947 100644 (file)
@@ -170,7 +170,7 @@ static void       slot_will_hide_ack                   (void);
 
 static Eina_Bool  panel_agent_handler                  (void *data, Ecore_Fd_Handler *fd_handler);
 
-static void       efl_create_control_window            (void);
+static Eina_Bool  efl_create_control_window            (void);
 static Ecore_X_Window efl_get_app_window               (void);
 
 /////////////////////////////////////////////////////////////////////////////
@@ -1759,14 +1759,19 @@ static Evas_Object *efl_create_window (const char *strWinName, const char *strEf
 /**
  * @brief Create elementary control window.
  *
- * @return The window pointer
+ * @return EINA_TRUE if successful, otherwise return EINA_FALSE
  */
-static void efl_create_control_window (void)
+static Eina_Bool efl_create_control_window (void)
 {
     /* WMSYNC, #1 Creating and registering control window */
+    if (ecore_x_display_get () == NULL)
+        return EINA_FALSE;
+
     Ecore_X_Window root = ecore_x_window_root_first_get ();
     _control_window = ecore_x_window_input_new (root, -100, -100, 1, 1);
     ecore_x_e_virtual_keyboard_control_window_set (root, _control_window, 0, EINA_TRUE);
+
+    return EINA_TRUE;
 }
 
 /**
@@ -3658,15 +3663,15 @@ int main (int argc, char *argv [])
     /* Connect the configuration reload signal. */
     _config->signal_connect_reload (slot (config_reload_cb));
 
-    if (!check_system_ready ())
-    {
+    if (!check_system_ready ()) {
             std::cerr << "[ISF-PANEL-EFL] Timeout. cannot check the state of system....\n";
     }
 
     elm_init (argc, argv);
     check_time ("elm_init");
 
-    efl_create_control_window();
+    if (!efl_create_control_window ())
+        goto cleanup;
 
     efl_get_screen_resolution (_screen_width, _screen_height);
 
index 1525642..17b0c91 100755 (executable)
@@ -3,7 +3,7 @@
 
 Name:       isf
 Summary:    Input Service Framework
-Version:    2.4.6306
+Version:    2.4.6307
 Release:    1
 Group:      System Environment/Libraries
 License:    LGPL
index bcc96d0..7cbbb6c 100644 (file)
@@ -1,3 +1,9 @@
+ISF 2.4.6307 :
+ 1. Split SMACK rule from manifest file
+ 2. Add SMACK rule
+ 3. [panel] Check X display to avoid crash
+
+
 ISF 2.4.6306 :
  1. [systemd] Fix Smack labels for systemd units
  2. [isfcontrol] Add isf_control_set_active_ise_to_default API