summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c66
1 files changed, 2 insertions, 64 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index b1ab702a01..d69c43009c 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -434,68 +434,6 @@ _drm_size_step_set(Ecore_Evas *ee, int w, int h)
434} 434}
435 435
436static void 436static void
437_drm_object_cursor_del(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
438{
439 Ecore_Evas *ee;
440
441 ee = data;
442 if (ee) ee->prop.cursor.object = NULL;
443}
444
445static void
446_drm_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
447{
448 Evas_Object *old;
449 int x, y;
450
451 old = ee->prop.cursor.object;
452 if (!obj)
453 {
454 ee->prop.cursor.object = NULL;
455 ee->prop.cursor.layer = 0;
456 ee->prop.cursor.hot.x = 0;
457 ee->prop.cursor.hot.y = 0;
458 goto end;
459 }
460
461 ee->prop.cursor.object = obj;
462 ee->prop.cursor.layer = layer;
463 ee->prop.cursor.hot.x = hot_x;
464 ee->prop.cursor.hot.y = hot_y;
465
466 ecore_evas_pointer_xy_get(ee, &x, &y);
467
468 if (obj != old)
469 {
470 evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
471 evas_object_pass_events_set(ee->prop.cursor.object, 1);
472 if (evas_pointer_inside_get(ee->evas))
473 evas_object_show(ee->prop.cursor.object);
474 evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
475 _drm_object_cursor_del, ee);
476 }
477
478 evas_object_move(ee->prop.cursor.object, x - ee->prop.cursor.hot.x,
479 y - ee->prop.cursor.hot.y);
480
481end:
482 if ((old) && (obj != old))
483 {
484 evas_object_event_callback_del_full
485 (old, EVAS_CALLBACK_DEL, _drm_object_cursor_del, ee);
486 evas_object_del(old);
487 }
488}
489
490static void
491_drm_object_cursor_unset(Ecore_Evas *ee)
492{
493 evas_object_event_callback_del_full(ee->prop.cursor.object,
494 EVAS_CALLBACK_DEL,
495 _drm_object_cursor_del, ee);
496}
497
498static void
499_drm_layer_set(Ecore_Evas *ee, int layer) 437_drm_layer_set(Ecore_Evas *ee, int layer)
500{ 438{
501 if (layer < 1) layer = 1; 439 if (layer < 1) layer = 1;
@@ -747,8 +685,8 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
747 _drm_size_max_set, 685 _drm_size_max_set,
748 _drm_size_base_set, 686 _drm_size_base_set,
749 _drm_size_step_set, 687 _drm_size_step_set,
750 _drm_object_cursor_set, 688 NULL,
751 _drm_object_cursor_unset, 689 NULL,
752 _drm_layer_set, 690 _drm_layer_set,
753 NULL, //void (*fn_focus_set) (Ecore_Evas *ee, Eina_Bool on); 691 NULL, //void (*fn_focus_set) (Ecore_Evas *ee, Eina_Bool on);
754 _drm_iconified_set, 692 _drm_iconified_set,