summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2016-10-05 18:19:42 -0400
committerzmike <michael.blumenkrantz@gmail.com>2016-10-05 18:20:32 -0400
commit00af2f5fbe0b372a3dafeb1c5240a8bdc8e2777e (patch)
tree8157ea781c3e9e3f60401579299f65c3866ec65e
parentf3e02cd99220a9cee346bbae79bb48b61f1197d8 (diff)
lock overlay to visible while a menu is open
-rw-r--r--src/bin/empc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c
index 076ca02..3f3afd8 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -38,6 +38,7 @@ static Evas_Object *bg[2] = {NULL};
38static Evas_Object *layout = NULL; 38static Evas_Object *layout = NULL;
39static Evas_Object *layout_filesystem = NULL; 39static Evas_Object *layout_filesystem = NULL;
40 40
41static Eina_Bool ctxpopup_locked_overlay = EINA_FALSE;
41static Eina_Bool overlay_locked_state = EINA_FALSE; 42static Eina_Bool overlay_locked_state = EINA_FALSE;
42static Eina_Bool lyrics_visible = EINA_FALSE; 43static Eina_Bool lyrics_visible = EINA_FALSE;
43static Eina_Bool empd_connected = EINA_FALSE; 44static Eina_Bool empd_connected = EINA_FALSE;
@@ -431,6 +432,12 @@ ctxpopup_dismiss(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA
431{ 432{
432 if (ctxpopup == obj) 433 if (ctxpopup == obj)
433 ctxpopup = NULL; 434 ctxpopup = NULL;
435 if (ctxpopup_locked_overlay)
436 {
437 ctxpopup_locked_overlay = EINA_FALSE;
438 if (overlay_locked_state)
439 elm_object_signal_emit(layout, "empc,overlay,toggle", "empc");
440 }
434 evas_object_del(obj); 441 evas_object_del(obj);
435} 442}
436 443
@@ -450,6 +457,11 @@ ctxpopup_add(Evas_Object *obj, const char *style)
450 evas_object_event_callback_add(ctx, EVAS_CALLBACK_MOUSE_MOVE, ctxpopup_mouse, NULL); 457 evas_object_event_callback_add(ctx, EVAS_CALLBACK_MOUSE_MOVE, ctxpopup_mouse, NULL);
451 elm_object_style_set(ctx, style); 458 elm_object_style_set(ctx, style);
452 evas_object_smart_callback_add(ctx, "dismissed", ctxpopup_dismiss, NULL); 459 evas_object_smart_callback_add(ctx, "dismissed", ctxpopup_dismiss, NULL);
460 if (!overlay_locked_state)
461 {
462 elm_object_signal_emit(layout, "empc,overlay,toggle", "empc");
463 ctxpopup_locked_overlay = EINA_TRUE;
464 }
453 return ctx; 465 return ctx;
454} 466}
455 467