summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author“vijay.tiwari” <vijay.tiwari@samsung.com>2016-12-27 19:46:31 +0530
committer“vijay.tiwari” <vijay.tiwari@samsung.com>2016-12-27 20:00:10 +0530
commitf40715cd85fbe064825c75aed6a86a3449318c05 (patch)
tree5cf960d97a77388da2cc1557a01cf2ff5f074c5a
parentecdb4aa51a0f084bcf145b64c82f79fb414bb65b (diff)
downloadalarm-tizen_3.0.m2.tar.gz
alarm-tizen_3.0.m2.tar.bz2
alarm-tizen_3.0.m2.zip
[W-Alarm] TSAM-12190 Alarm is not responding, black screen when add max alarm in widgetsubmit/tizen_3.0/20161229.001234submit/tizen_3.0/20161228.074545submit/tizen_3.0/20161227.143432tizen_3.0.m2
Change-Id: Ib2d4c84a33ff5ea849f02613afb72361af5eaf80
-rwxr-xr-xalarm_widget/inc/main.h1
-rwxr-xr-xalarm_widget/src/main.c26
2 files changed, 13 insertions, 14 deletions
diff --git a/alarm_widget/inc/main.h b/alarm_widget/inc/main.h
index 181b981..0fc2800 100755
--- a/alarm_widget/inc/main.h
+++ b/alarm_widget/inc/main.h
@@ -45,6 +45,7 @@ typedef struct widget_instance_data {
int root_height;
int port_id_alarm;
int db_id;
+ int mouse_count;
alarm_details* alm_details;
bundle* content;
widget_context_h context;
diff --git a/alarm_widget/src/main.c b/alarm_widget/src/main.c
index 8fac8d1..0dfb061 100755
--- a/alarm_widget/src/main.c
+++ b/alarm_widget/src/main.c
@@ -27,7 +27,7 @@
#include "widget_log.h"
#define POPUP_DURATION 4.0
-#define IGNORE_MOUSE_MOVE_COUNT 7
+#define IGNORE_MOUSE_MOVE_COUNT 5
#if !defined(APP_CONTROL_DATA_ALARM_WIDGET_ALARM_DB_ID)
#define APP_CONTROL_DATA_ALARM_WIDGET_ALARM_DB_ID "http://tizen.org/appcontrol/data/alarm_widget/db_id"
@@ -43,8 +43,6 @@
#define ALARM_BUNDLE_DB_ID "alarm.bundle.db.id"
-int new_alarm_move = 0;
-
#if !defined(ALARM_APP_ID)
#define ALARM_APP_ID "org.tizen.alarm.app"
@@ -96,23 +94,25 @@ static void _reply_from_alarm(app_control_h request, app_control_h reply, app_co
static void __alm_widget_new_alarm_mouse_up_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
{
Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *)event_info;
+ widget_instance_data_s *wid = (widget_instance_data_s *)data;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) {
_D("EVAS_EVENT_FLAG_ON_HOLD - Need to ignore this event");
+ wid->mouse_count = 0;
return;
}
- _D("__alm_widget_new_alarm_mouse_up_cb new_alarm_move:%d", new_alarm_move);
- widget_instance_data_s *wid = (widget_instance_data_s *)data;
+ _D("__alm_widget_new_alarm_mouse_up_cb wid->mouse_count:%d", wid->mouse_count);
ret_if(!wid);
- if (new_alarm_move > IGNORE_MOUSE_MOVE_COUNT) {
- _D("__alm_widget_new_alarm_mouse_up_cb ignore since its a mouse move");
- new_alarm_move = 0;
+ if (wid->mouse_count > IGNORE_MOUSE_MOVE_COUNT) {
+ wid->mouse_count = 0;
return;
}
- new_alarm_move = 0;
+ wid->mouse_count = 0;
- if(wid->db_id == 0) {
+ int ret = 1;
+ ret = read_alarm_details(wid->db_id, &wid->alm_details);
+ if(wid->db_id == 0 || ret) {
elm_object_signal_emit(wid->layout, "clipper.no_alarm.default", "*");
app_control_h app_control;
@@ -147,18 +147,16 @@ static void __alm_widget_new_alarm_mouse_move_cb(void *data, Evas * e, Evas_Obje
widget_instance_data_s *wid = (widget_instance_data_s *)data;
ret_if(!wid);
elm_object_signal_emit(wid->layout, "clipper.no_alarm.default", "*");
-
- new_alarm_move++;
+ wid->mouse_count++;
}
static void __alm_widget_new_alarm_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
{
_ALM_WIDGET_ENTER_;
widget_instance_data_s *wid = (widget_instance_data_s *)data;
+ wid->mouse_count = 0;
ret_if(!wid);
- new_alarm_move = 0;
-
elm_object_signal_emit(wid->layout, "clipper.no_alarm.pressed", "*");
}