Fix prevent issues 27/46827/7
authortaeyoon <taeyoon0.lee@samsung.com>
Tue, 25 Aug 2015 07:12:14 +0000 (16:12 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 1 Sep 2015 13:57:05 +0000 (06:57 -0700)
 - Fix xiEvent.mask, xiEvent.mask_len
 - oss = ""+keepUpdateStatus+"":"" to oss = ""; oss+= (keepUpdatingStatus?"":"");

Change-Id: Iba01850958c432e73da5b49fbaf3fc9dddcc4ea8

adaptors/base/update-thread.cpp
adaptors/x11/ecore-x-event-handler.cpp

index 451d301ae86ea5d0ee950c123ae61ab19deb596f..ce8003795900ca2f5586c990507ea7ff63b9278e 100644 (file)
@@ -190,7 +190,8 @@ void UpdateThread::UpdateStatusLogging( unsigned int keepUpdatingStatus )
 
   if ( !(++mStatusLogCount % mStatusLogInterval) )
   {
-    oss = "UpdateStatusLogging keepUpdating: " + keepUpdatingStatus ? "true":"false";
+    oss = "UpdateStatusLogging keepUpdating: ";
+    oss += (keepUpdatingStatus ? "true":"false");
 
     if ( keepUpdatingStatus )
     {
index 39296acfa111415b8dc26ef071749111b2601a84..739ed0b61a5d72d1933a8c3de3c4af32387ba912 100644 (file)
@@ -372,10 +372,14 @@ struct EventHandler::Impl
             mXiDeviceId = xiEventMask.deviceid;
 
             // SelectXi2Event
-            xiEventMask.mask = (unsigned char*)(calloc( 1, XIMaskLen( XI_LASTEVENT ) ) );
+            Dali::Vector< unsigned char > mask;
+            std::size_t xiMaskLen = XIMaskLen( XI_LASTEVENT );
+            mask.Reserve( xiMaskLen );
+            xiEventMask.mask = mask.Begin();
+
             XISetMask( xiEventMask.mask, XI_RawMotion );
 
-            xiEventMask.mask_len = sizeof( xiEventMask.mask );
+            xiEventMask.mask_len = xiMaskLen * sizeof( unsigned char );
 
             int ret = XISelectEvents( display, rootWindow, &xiEventMask, 1 );
             if( ret == 0 )
@@ -387,8 +391,6 @@ struct EventHandler::Impl
             {
               DALI_LOG_INFO( gImfLogging, Debug::General, "Failed to Select Events\n" );
             }
-
-            free( xiEventMask.mask );
           }
 
           if( deviceInfo != NULL )