1 #include "e_mod_move_shared_types.h"
2 #include "e_mod_move_debug.h"
3 #include "e_mod_move.h"
5 /* local subsystem functions */
6 static Eina_Bool _e_mod_move_indicator_widget_apptray_move_set(E_Move_Indicator_Widget *indi_widget, Eina_Bool state);
7 static Eina_Bool _e_mod_move_indicator_widget_quickpanel_move_set(E_Move_Indicator_Widget *indi_widget, Eina_Bool state);
8 static Eina_Bool _e_mod_move_indicator_widget_apptray_move_get(E_Move_Indicator_Widget *indi_widget);
9 static Eina_Bool _e_mod_move_indicator_widget_quickpanel_move_get(E_Move_Indicator_Widget *indi_widget);
10 static Eina_Bool _e_mod_move_indicator_widget_move_started_set(E_Move_Indicator_Widget *indi_widget, Eina_Bool state);
11 static Eina_Bool _e_mod_move_indicator_widget_move_started_get(E_Move_Indicator_Widget *indi_widget);
12 static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb);
13 static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb);
14 static Eina_Bool _e_mod_move_indicator_widget_quickpanel_flick_process(E_Move_Indicator_Widget *indi_widget, E_Move_Border *mb2, int angle, Eina_Bool state);
15 static Eina_Bool _e_mod_move_indicator_widget_apptray_flick_process(E_Move_Indicator_Widget *indi_widget, E_Move_Border *mb2, int angle, Eina_Bool state);
16 static Eina_Bool _e_mod_move_indicator_widget_home_region_release_check(E_Move_Indicator_Widget *indi_widget, Eina_Bool apptray_move, int angle, Evas_Point pos);
17 static Eina_Bool _e_mod_move_indicator_widget_cb_motion_start(void *data, void *event_info);
18 static Eina_Bool _e_mod_move_indicator_widget_cb_motion_move(void *data, void *event_info);
19 static Eina_Bool _e_mod_move_indicator_widget_cb_motion_end(void *data, void *event_info);
20 static void _e_mod_move_indicator_widget_obj_event_setup(E_Move_Indicator_Widget *indicator_widget, E_Move_Widget_Object *mwo);
21 static Eina_Bool _e_mod_move_indicator_widget_scrollable_object_movable_check(E_Move_Indicator_Widget *indi_widget, E_Move_Border *mb, Evas_Point pos);
22 static Eina_Bool _e_mod_move_indicator_widget_target_window_find_by_pointer(Ecore_X_Window *win, int x, int y);
23 static Ecore_X_Window _e_mod_move_indicator_widget_event_win_find(void *event_info);
24 static Eina_Bool _e_mod_move_indicator_widget_target_window_policy_check(E_Move_Border *mb);
25 static Eina_Bool _e_mod_move_indicator_widget_event_send_policy_check(E_Move_Indicator_Widget *indi_widget, Evas_Point pos);
26 static void _e_mod_move_indicator_widget_active_indicator_win_find_and_set(void);
28 /* local subsystem functions */
30 _e_mod_move_indicator_widget_apptray_move_set(E_Move_Indicator_Widget *indi_widget,
33 E_CHECK_RETURN(indi_widget, EINA_FALSE);
34 indi_widget->apptray_move = state;
39 _e_mod_move_indicator_widget_quickpanel_move_set(E_Move_Indicator_Widget *indi_widget,
42 E_CHECK_RETURN(indi_widget, EINA_FALSE);
43 indi_widget->quickpanel_move = state;
48 _e_mod_move_indicator_widget_apptray_move_get(E_Move_Indicator_Widget *indi_widget)
50 E_CHECK_RETURN(indi_widget, EINA_FALSE);
51 return indi_widget->apptray_move;
55 _e_mod_move_indicator_widget_quickpanel_move_get(E_Move_Indicator_Widget *indi_widget)
57 E_CHECK_RETURN(indi_widget, EINA_FALSE);
58 return indi_widget->quickpanel_move;
62 _e_mod_move_indicator_widget_move_started_set(E_Move_Indicator_Widget *indi_widget,
65 E_CHECK_RETURN(indi_widget, EINA_FALSE);
66 indi_widget->move_started = state;
71 _e_mod_move_indicator_widget_move_started_get(E_Move_Indicator_Widget *indi_widget)
73 E_CHECK_RETURN(indi_widget, EINA_FALSE);
74 return indi_widget->move_started;
78 _e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(E_Move_Border *at_mb)
81 E_Move_Border *find_mb = NULL;
82 Eina_Bool found = EINA_FALSE;
83 m = e_mod_move_util_get();
85 E_CHECK_RETURN(m, EINA_FALSE);
86 E_CHECK_RETURN(at_mb, EINA_FALSE);
87 E_CHECK_RETURN(TYPE_APPTRAY_CHECK(at_mb), EINA_FALSE);
88 E_CHECK_RETURN(at_mb->visible, EINA_FALSE);
89 E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(at_mb),
91 if (e_mod_move_apptray_objs_animation_state_get(at_mb)) return EINA_FALSE;
93 // check if notification window is on-screen.
94 EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
96 if (TYPE_INDICATOR_CHECK(find_mb)) continue;
98 && REGION_INTERSECTS_WITH_ZONE(find_mb, at_mb->bd->zone))
105 && (find_mb->bd->client.netwm.type == ECORE_X_WINDOW_TYPE_NOTIFICATION))
109 // check if notification window is on-screen.
111 e_mod_move_apptray_dim_show(at_mb);
112 e_mod_move_apptray_objs_add(at_mb);
114 // apptray_objs_animation_layer_set
115 e_mod_move_apptray_objs_animation_layer_set(at_mb);
121 _e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(E_Move_Border *qp_mb)
123 E_Move_Border *mini_apptray_mb = NULL;
125 E_CHECK_RETURN(qp_mb, EINA_FALSE);
126 E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(qp_mb), EINA_FALSE);
127 E_CHECK_RETURN(qp_mb->visible, EINA_FALSE);
128 E_CHECK_RETURN(e_mod_move_util_compositor_object_visible_get(qp_mb),
131 // Quickpanel is under rotation state.
132 // I think there is another exception case.
133 // It's posible that WM doesn't send rotation change request yet.
134 // In this case the value of wait_for_done is zero,
135 // it means quickpanel isn't rotating for now, but going to be rotated.
137 if (qp_mb->bd->client.e.state.rot.wait_for_done) return EINA_FALSE;
139 if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb)) return EINA_FALSE;
141 mini_apptray_mb = e_mod_move_mini_apptray_find();
142 if (e_mod_move_mini_apptray_objs_animation_state_get(mini_apptray_mb))
145 if (!(qp_mb->m->qp_scroll_with_clipping))
146 e_mod_move_quickpanel_dim_show(qp_mb);
148 // Set Composite Mode & Rotation Lock & Make below win's mirror object
149 e_mod_move_quickpanel_stage_init(qp_mb);
151 e_mod_move_quickpanel_objs_add(qp_mb);
157 _e_mod_move_indicator_widget_quickpanel_flick_process(E_Move_Indicator_Widget *indi_widget,
158 E_Move_Border *mb2, // mb2 : quickpanel
163 E_Move_Border *mb = NULL;
164 E_Move_Widget_Object *mwo = NULL;
167 int mx = 0, my = 0, ax = 0, ay = 0;
169 E_CHECK_RETURN(indi_widget, EINA_FALSE);
170 mb = e_mod_move_border_client_find(indi_widget->win);
171 E_CHECK_RETURN(mb, EINA_FALSE);
172 E_CHECK_RETURN(mb2, EINA_FALSE);
173 E_CHECK_RETURN(TYPE_QUICKPANEL_CHECK(mb2), EINA_FALSE);
174 E_CHECK_RETURN(state, EINA_FALSE);
179 EINA_LIST_FOREACH(indi_widget->objs, l, mwo) // indicator click unset
182 e_mod_move_event_click_set(mwo->event, EINA_FALSE);
185 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
186 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
189 if (mb->flick_data) e_mod_move_flick_data_free(mb);
195 if (m->qp_scroll_with_clipping)
197 ax = zone->x + mb2->w;
198 ay = zone->y + mb2->h;
206 mx = 0; my = zone->h - mb2->h;
207 if (m->qp_scroll_with_clipping)
209 ax = zone->x; ay = zone->y;
217 mx = zone->w - mb2->w; my = 0;
218 if (m->qp_scroll_with_clipping)
220 ax = zone->x; ay = zone->y;
230 if (m->qp_scroll_with_clipping)
232 ax = zone->x + mb2->w;
233 ay = zone->y + mb2->h;
242 e_mod_move_quickpanel_e_border_move(mb2, mx, my);
243 e_mod_move_quickpanel_objs_animation_move(mb2, ax, ay);
249 _e_mod_move_indicator_widget_apptray_flick_process(E_Move_Indicator_Widget *indi_widget,
250 E_Move_Border *mb2, // mb2 : apptray
254 E_Move_Border *mb = NULL;
255 E_Move_Widget_Object *mwo = NULL;
261 E_CHECK_RETURN(indi_widget, EINA_FALSE);
262 mb = e_mod_move_border_client_find(indi_widget->win);
263 E_CHECK_RETURN(mb, EINA_FALSE);
264 E_CHECK_RETURN(mb2, EINA_FALSE);
265 E_CHECK_RETURN(TYPE_APPTRAY_CHECK(mb2), EINA_FALSE);
266 E_CHECK_RETURN(state, EINA_FALSE);
270 EINA_LIST_FOREACH(indi_widget->objs, l, mwo) // indicator click unset
273 e_mod_move_event_click_set(mwo->event, EINA_FALSE);
276 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
277 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
280 if (mb->flick_data) e_mod_move_flick_data_free(mb);
290 y = zone->h - mb2->h;
293 x = zone->w - mb2->w;
303 e_mod_move_apptray_e_border_move(mb2, x, y);
304 e_mod_move_apptray_objs_animation_move(mb2, x, y);
310 _e_mod_move_indicator_widget_home_region_release_check(E_Move_Indicator_Widget *indi_widget,
311 Eina_Bool apptray_move /* if home button is pressd, then apptray_move set true */,
313 Evas_Point pos /* mouse up position */)
315 E_Move_Border *mb = NULL;
317 Eina_Bool ret = EINA_FALSE;
321 m = e_mod_move_util_get();
322 E_CHECK_RETURN(m, EINA_FALSE);
323 E_CHECK_RETURN(indi_widget, EINA_FALSE);
324 mb = e_mod_move_border_client_find(indi_widget->win);
325 E_CHECK_RETURN(mb, EINA_FALSE);
326 E_CHECK_RETURN(apptray_move, EINA_FALSE);
327 E_CHECK_RETURN(mb->bd, EINA_FALSE);
329 E_CHECK_RETURN(zone, EINA_FALSE);
334 region_check = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
335 if (pos.y < region_check) ret = EINA_TRUE;
338 region_check = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
339 if (pos.x < region_check) ret = EINA_TRUE;
342 region_check = zone->h - m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
343 if (pos.y > region_check) ret = EINA_TRUE;
346 region_check = zone->w - m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
347 if (pos.x > region_check) ret = EINA_TRUE;
351 "[MOVE] ev:%15.15s , invalid angle:%d, (%d,%d) %s()\n",
352 "EVAS_OBJ", angle, pos.x, pos.y,
360 _e_mod_move_indicator_widget_cb_motion_start(void *data,
364 E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
366 E_Move_Border *mb = NULL;
367 E_Move_Border *ev_mb = NULL;
368 E_Move_Border *qp_mb = NULL;
369 E_Move_Border *at_mb = NULL;
370 E_Move_Event_Motion_Info *info;
371 E_Move_Widget_Object *mwo = NULL;
372 Evas_Event_Mouse_Down *mouse_down_event = NULL;
373 Eina_Bool clicked = EINA_FALSE;
375 E_Move_Scroll_Region_Indicator scroll_region = E_MOVE_SCROLL_REGION_NONE;
376 Ecore_X_Window ev_win = 0;
378 info = (E_Move_Event_Motion_Info *)event_info;
379 m = e_mod_move_util_get();
381 E_CHECK_RETURN(indi_widget, EINA_FALSE);
383 // clicked window indicator policy check
384 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
387 ev_win = e_mod_move_event_win_get(mwo->event);
389 ev_mb = e_mod_move_border_client_find(ev_win);
390 E_CHECK_RETURN(_e_mod_move_indicator_widget_target_window_policy_check(ev_mb),
393 mb = e_mod_move_border_client_find(indi_widget->win);
395 if (!m || !mb || !indi_widget || !info) return EINA_FALSE;
397 mouse_down_event = info->event_info;
398 E_CHECK_RETURN(mouse_down_event, EINA_FALSE);
399 if (mouse_down_event->button != 1)
402 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
405 clicked = e_mod_move_event_click_get(mwo->event);
411 "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START (%4d,%4d)\n",
412 "EVAS_OBJ", mb->bd->win,
413 info->coord.x, info->coord.y);
415 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
416 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
418 /* check if apptray or quickpanel exists on the current zone */
419 at_mb = e_mod_move_apptray_find();
421 (REGION_INSIDE_ZONE(at_mb, mb->bd->zone)))
424 "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START %s\n",
425 "EVAS_OBJ", mb->bd->win,
426 "apptray exists. return.");
430 qp_mb = e_mod_move_quickpanel_find();
432 (REGION_INSIDE_ZONE(qp_mb, mb->bd->zone)))
435 "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_START %s\n",
436 "EVAS_OBJ", mb->bd->win,
437 "quickpanel exists. return.");
441 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
444 e_mod_move_event_click_set(mwo->event, EINA_TRUE);
447 E_CHECK_GOTO(e_mod_move_flick_data_new(mb), error_cleanup);
448 e_mod_move_flick_data_init(mb, info->coord.x, info->coord.y);
450 scroll_region = e_mod_move_indicator_region_scroll_check(mb->angle, info->coord);
452 if (scroll_region == E_MOVE_SCROLL_REGION_APPTRAY)
454 if (e_mod_move_panel_scrollable_get(mb, E_MOVE_PANEL_TYPE_APPTRAY))
456 if (_e_mod_move_indicator_widget_cb_motion_start_internal_apptray_check(at_mb))
458 e_mod_move_apptray_e_border_raise(at_mb);
459 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_TRUE);
460 e_mod_move_apptray_objs_animation_start_position_set(at_mb,
462 // send apptray to "move start message".
463 e_mod_move_apptray_anim_state_send(at_mb, EINA_TRUE);
467 else if (scroll_region == E_MOVE_SCROLL_REGION_QUICKPANEL)
469 if (e_mod_move_panel_scrollable_get(mb, E_MOVE_PANEL_TYPE_QUICKPANEL))
471 if (_e_mod_move_indicator_widget_cb_motion_start_internal_quickpanel_check(qp_mb))
473 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_TRUE);
474 e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
476 // send quickpanel to "move start message".
477 e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
482 indi_widget->pos = info->coord; // save mouse click position
488 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
491 e_mod_move_event_click_set(mwo->event, EINA_FALSE);
494 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
495 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
501 _e_mod_move_indicator_widget_cb_motion_move(void *data,
505 E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
506 E_Move_Border *mb = NULL;
507 E_Move_Border *qp_mb = NULL;
508 E_Move_Border *at_mb = NULL;
509 E_Move_Event_Motion_Info *info;
510 E_Move_Widget_Object *mwo = NULL;
513 Eina_Bool click = EINA_FALSE;
514 Eina_Bool need_move = EINA_FALSE;
515 Eina_Bool contents = EINA_FALSE;
521 info = (E_Move_Event_Motion_Info *)event_info;
522 m = e_mod_move_util_get();
524 E_CHECK_RETURN(indi_widget, EINA_FALSE);
525 mb = e_mod_move_border_client_find(indi_widget->win);
527 if (!m || !mb || !info) return EINA_FALSE;
530 "[MOVE] ev:%15.15s w:0x%08x INDI_WIDGET_MOTION_MOVE a:%d (%4d,%4d)\n",
531 "EVAS_OBJ", mb->bd->win, mb->angle,
532 info->coord.x, info->coord.y);
537 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
540 click = e_mod_move_event_click_get(mwo->event);
543 E_CHECK_RETURN(click, EINA_FALSE);
545 if (_e_mod_move_indicator_widget_quickpanel_move_get(indi_widget))
547 qp_mb = e_mod_move_quickpanel_find();
548 E_CHECK_RETURN(qp_mb, EINA_FALSE);
550 contents = e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch);
555 if (info->coord.y < qp_mb->h)
559 if (info->coord.y < ch)
561 y = info->coord.y - ch;
562 need_move = EINA_TRUE;
567 y = info->coord.y - qp_mb->h;
568 need_move = EINA_TRUE;
573 if (info->coord.x < qp_mb->w)
577 if (info->coord.x < cw)
579 x = info->coord.x - cw;
580 need_move = EINA_TRUE;
585 x = info->coord.x - qp_mb->w;
586 need_move = EINA_TRUE;
591 if (info->coord.y > (zone->h - qp_mb->h))
595 if (info->coord.y > cy)
597 y = info->coord.y - cy;
598 need_move = EINA_TRUE;
604 need_move = EINA_TRUE;
609 if (info->coord.x > (zone->w - qp_mb->w))
613 if (info->coord.x > cx)
615 x = info->coord.x - cx;
616 need_move = EINA_TRUE;
622 need_move = EINA_TRUE;
630 if (_e_mod_move_indicator_widget_scrollable_object_movable_check(indi_widget, mb, info->coord))
632 if (m->qp_scroll_with_clipping)
633 e_mod_move_quickpanel_objs_move(qp_mb,
639 e_mod_move_quickpanel_objs_move(qp_mb, x, y);
643 else if (_e_mod_move_indicator_widget_apptray_move_get(indi_widget))
645 at_mb = e_mod_move_apptray_find();
646 E_CHECK_RETURN(at_mb, EINA_FALSE);
651 if (info->coord.y < at_mb->h)
653 y = info->coord.y - at_mb->h;
654 need_move = EINA_TRUE;
658 if (info->coord.x < at_mb->w)
660 x = info->coord.x - at_mb->w;
661 need_move = EINA_TRUE;
665 if (info->coord.y > (zone->h - at_mb->h))
668 need_move = EINA_TRUE;
672 if (info->coord.x > (zone->w - at_mb->w))
675 need_move = EINA_TRUE;
682 e_mod_move_apptray_objs_move(at_mb, x, y);
685 indi_widget->pos = info->coord; // save mouse move position
691 _e_mod_move_indicator_widget_cb_motion_end(void *data,
695 E_Move_Indicator_Widget *indi_widget = (E_Move_Indicator_Widget *)data;
696 E_Move_Border *mb = NULL;
697 E_Move_Border *qp_mb = NULL;
698 E_Move_Border *at_mb = NULL;
699 E_Move_Event_Motion_Info *info;
700 E_Move_Widget_Object *mwo = NULL;
703 Evas_Event_Mouse_Up *mouse_up_event;
704 Eina_Bool click = EINA_FALSE;
705 Eina_Bool flick_state = EINA_FALSE;
706 Eina_Bool qp_mv_state = EINA_FALSE;
707 Eina_Bool at_mv_state = EINA_FALSE;
710 int check_h, check_w;
712 int mx = 0, my = 0, ax = 0, ay = 0;
714 info = (E_Move_Event_Motion_Info *)event_info;
715 m = e_mod_move_util_get();
717 E_CHECK_RETURN(indi_widget, EINA_FALSE);
718 mb = e_mod_move_border_client_find(indi_widget->win);
720 if (!m || !mb || !info) return EINA_FALSE;
722 mouse_up_event = info->event_info;
723 E_CHECK_RETURN(mouse_up_event, EINA_FALSE);
724 if (mouse_up_event->button != 1)
728 "[MOVE] ev:%15.15s w:0x%08x ,angle:%d, (%d,%d) %s()\n",
729 "EVAS_OBJ", mb->bd->win, mb->angle, info->coord.x, info->coord.y,
735 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
738 click = e_mod_move_event_click_get(mwo->event);
740 E_CHECK_GOTO(click, error_cleanup);
742 qp_mv_state = _e_mod_move_indicator_widget_quickpanel_move_get(indi_widget);
743 at_mv_state = _e_mod_move_indicator_widget_apptray_move_get(indi_widget);
744 if (!qp_mv_state && !at_mv_state) goto finish;
746 e_mod_move_flick_data_update(mb, info->coord.x, info->coord.y);
747 flick_state = e_mod_move_flick_state_get(mb, EINA_TRUE);
751 qp_mb = e_mod_move_quickpanel_find();
752 if (_e_mod_move_indicator_widget_quickpanel_flick_process(indi_widget, qp_mb,
760 at_mb = e_mod_move_apptray_find();
762 // if release position is on indicator's home button then, do not flick.
763 if (_e_mod_move_indicator_widget_home_region_release_check(indi_widget,
764 EINA_TRUE, /* upper if phrase check _e_mod_move_indicator_apptray_move_get(mb) value TURE or FALSE. */
768 flick_state = EINA_FALSE;
771 if (_e_mod_move_indicator_widget_apptray_flick_process(indi_widget, at_mb,
789 if (check_h) check_h /= 2;
790 if (info->coord.y < check_h)
799 if (check_h) check_h /= 2;
800 if (info->coord.y < check_h)
802 if (m->qp_scroll_with_clipping)
808 if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
811 if (check_h) check_h /= 2;
812 if (info->coord.y < check_h)
822 if (m->qp_scroll_with_clipping)
824 ax = zone->x + qp_mb->w,
825 ay = zone->y + qp_mb->h;
834 if (check_w) check_w /= 2;
835 if (info->coord.x < check_w)
844 if (check_w) check_w /= 2;
845 if (info->coord.x < check_w)
847 if (m->qp_scroll_with_clipping)
853 if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
856 if (check_w) check_w /= 2;
857 if (info->coord.x < check_w)
867 if (m->qp_scroll_with_clipping)
869 ax = zone->x + qp_mb->w;
870 ay = zone->y + qp_mb->h;
879 if (check_h) check_h /= 2;
880 if (info->coord.y > (zone->h - check_h))
887 my = zone->h - at_mb->h;
894 if (check_h) check_h /= 2;
895 if (info->coord.y > (zone->h - check_h))
897 if (m->qp_scroll_with_clipping)
900 ax = zone->x + qp_mb->w;
901 ay = zone->y + qp_mb->h;
905 if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
908 if (check_h) check_h /= 2;
909 if (info->coord.y > (cy + check_h))
923 if (check_w) check_w /= 2;
924 if (info->coord.x > (zone->w - check_w))
931 mx = zone->w - at_mb->w;
938 if (check_w) check_w /= 2;
939 if (info->coord.x > (zone->w - check_w))
941 if (m->qp_scroll_with_clipping)
944 ax = zone->x + qp_mb->w;
945 ay = zone->y + qp_mb->h;
949 if (e_mod_move_border_contents_rect_get(qp_mb, &cx, &cy ,&cw, &ch))
952 if (check_w) check_w /= 2;
953 if (info->coord.x > (cx + check_w))
969 e_mod_move_apptray_e_border_move(at_mb, mx, my);
970 e_mod_move_apptray_objs_animation_move(at_mb, ax, ay);
974 e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
975 if (_e_mod_move_indicator_widget_scrollable_object_movable_check(indi_widget, mb, info->coord))
976 e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
978 e_mod_move_quickpanel_objs_animation_move_with_time(qp_mb, ax, ay, 0.0000001);
979 // time :0.0 calls animation_frame with pos : 0.0 calls once.
980 // so I use small time value, it makes animation_frame with pos: 1.0 call once
984 indi_widget->pos = info->coord; // save mouse up position
985 _e_mod_move_indicator_widget_move_started_set(indi_widget, EINA_FALSE);
987 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
990 e_mod_move_event_click_set(mwo->event, EINA_FALSE);
994 if (mb->flick_data) e_mod_move_flick_data_free(mb);
995 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
996 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
1002 _e_mod_move_indicator_widget_obj_event_setup(E_Move_Indicator_Widget *indicator_widget,
1003 E_Move_Widget_Object *mwo)
1005 E_CHECK(indicator_widget);
1008 mwo->event = e_mod_move_event_new(indicator_widget->win, mwo->obj);
1009 E_CHECK(mwo->event);
1011 e_mod_move_event_data_type_set(mwo->event, E_MOVE_EVENT_DATA_TYPE_WIDGET_INDICATOR);
1012 e_mod_move_event_angle_cb_set(mwo->event,
1013 e_mod_move_util_win_prop_angle_get);
1014 e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_START,
1015 _e_mod_move_indicator_widget_cb_motion_start,
1017 e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_MOVE,
1018 _e_mod_move_indicator_widget_cb_motion_move,
1020 e_mod_move_event_cb_set(mwo->event, E_MOVE_EVENT_TYPE_MOTION_END,
1021 _e_mod_move_indicator_widget_cb_motion_end,
1023 e_mod_move_event_win_find_cb_set(mwo->event,
1024 _e_mod_move_indicator_widget_event_win_find);
1025 e_mod_move_event_propagate_type_set(mwo->event,
1026 E_MOVE_EVENT_PROPAGATE_TYPE_IMMEDIATELY);
1030 _e_mod_move_indicator_widget_scrollable_object_movable_check(E_Move_Indicator_Widget *indicator_widget,
1036 Eina_Bool ret = EINA_FALSE;
1037 Eina_Bool move_started = EINA_FALSE;
1038 Eina_Bool position_check = EINA_FALSE;
1040 E_CHECK_RETURN(indicator_widget, EINA_FALSE);
1041 E_CHECK_RETURN(mb, EINA_FALSE);
1043 m = e_mod_move_util_get();
1044 E_CHECK_RETURN(m, EINA_FALSE);
1046 move_started = _e_mod_move_indicator_widget_move_started_get(indicator_widget);
1047 if (move_started) return EINA_TRUE;
1052 check_val = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
1053 if (pos.x > check_val) position_check = EINA_TRUE;
1056 check_val = m->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
1057 if (pos.y < check_val) position_check = EINA_TRUE;
1060 check_val = m->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
1061 if (pos.x < check_val) position_check = EINA_TRUE;
1065 check_val = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
1066 if (pos.y > check_val) position_check = EINA_TRUE;
1072 _e_mod_move_indicator_widget_move_started_set(indicator_widget, EINA_TRUE);
1080 _e_mod_move_indicator_widget_target_window_find_by_pointer(Ecore_X_Window *win,
1085 E_Move_Border *find_mb = NULL;
1086 Eina_Bool found = EINA_FALSE;
1087 Eina_Bool ret = EINA_FALSE;
1088 Ecore_X_Window noti_win = 0;
1089 Eina_Bool noti_win_saved = EINA_FALSE;
1091 E_CHECK_RETURN(win, EINA_FALSE);
1092 m = e_mod_move_util_get();
1093 E_CHECK_RETURN(m, EINA_FALSE);
1095 EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
1097 if (!find_mb->bd) continue;
1099 // finding visible border
1100 if (!find_mb->visible) continue;
1102 // finding pointed border
1103 if (!E_INSIDE(x, y, find_mb->bd->x, find_mb->bd->y,
1104 find_mb->bd->w, find_mb->bd->h))
1107 // if notification , alpha, and indicator_state_none then search again below.
1108 if ((TYPE_NOTIFICATION_CHECK(find_mb) || TYPE_APP_SELECTOR_CHECK(find_mb))
1110 && (find_mb->indicator_state == E_MOVE_INDICATOR_STATE_NONE))
1112 if (!noti_win_saved)
1114 noti_win = find_mb->bd->client.win;
1115 noti_win_saved = EINA_TRUE;
1129 && (find_mb->indicator_state == E_MOVE_INDICATOR_STATE_ON))
1131 *win = find_mb->bd->client.win;
1143 *win = find_mb->bd->client.win;
1152 static Ecore_X_Window
1153 _e_mod_move_indicator_widget_event_win_find(void *event_info)
1155 E_Move_Event_Motion_Info *info = NULL;
1156 Ecore_X_Window win = 0, res_win = 0;
1157 info = (E_Move_Event_Motion_Info *)event_info;
1159 E_CHECK_RETURN(info, 0);
1161 if (_e_mod_move_indicator_widget_target_window_find_by_pointer(&win,
1169 "[MOVE] ev:%15.15s INDICATOR_WIDGET_EVENT_WIN_FIND w:0x%08x (%4d,%4d)\n",
1170 "EVAS_OBJ", res_win, info->coord.x, info->coord.y);
1176 _e_mod_move_indicator_widget_target_window_policy_check(E_Move_Border *mb)
1178 E_Move *m = e_mod_move_util_get();
1179 E_Zone *zone = NULL;
1180 Eina_Bool ret = EINA_FALSE;
1181 E_Border *bd = NULL;
1183 E_CHECK_RETURN(m, EINA_FALSE);
1184 E_CHECK_RETURN(mb, EINA_FALSE);
1187 E_CHECK_RETURN(bd, EINA_FALSE);
1189 E_CHECK_RETURN(zone, EINA_FALSE);
1191 if (REGION_EQUAL_TO_ZONE(mb, zone) // check fullscreen
1192 && (zone->id == 0) // change zone->id comparing to bd's profile property (mobile)
1193 && (mb->indicator_state == E_MOVE_INDICATOR_STATE_ON)
1194 && (mb->indicator_type == E_MOVE_INDICATOR_TYPE_1))
1203 _e_mod_move_indicator_widget_event_send_policy_check(E_Move_Indicator_Widget *indi_widget,
1206 int x = 0, y = 0, w = 0, h = 0;
1207 Eina_Bool ret = EINA_FALSE;
1209 E_CHECK_RETURN(indi_widget, EINA_FALSE);
1211 e_mod_move_widget_objs_geometry_get(indi_widget->objs, &x ,&y, &w, &h);
1213 if (E_INSIDE(pos.x, pos.y, x, y, w, h)) ret = EINA_TRUE;
1218 /* find active indicator window window and set property */
1220 _e_mod_move_indicator_widget_active_indicator_win_find_and_set(void)
1223 Ecore_X_Window target_win;
1224 E_Move_Border *target_mb = NULL;
1226 m = e_mod_move_util_get();
1229 if (e_mod_move_indicator_widget_target_window_find(&target_win))
1231 target_mb = e_mod_move_border_client_find(target_win);
1233 if ((TYPE_NOTIFICATION_CHECK(target_mb) || TYPE_APP_SELECTOR_CHECK(target_mb))
1234 && (target_mb->argb)
1235 && (target_mb->indicator_state == E_MOVE_INDICATOR_STATE_NONE))
1240 e_mod_move_util_prop_active_indicator_win_set(target_win, m);
1244 /* externally accessible functions */
1246 /* set current indicator widget */
1248 e_mod_move_indicator_widget_set(E_Move_Indicator_Widget *indi_widget)
1252 m = e_mod_move_util_get();
1255 if (m->indicator_widget)
1257 e_mod_move_indicator_widget_del(m->indicator_widget);
1260 m->indicator_widget = indi_widget;
1263 /* get current indicator widget */
1264 EINTERN E_Move_Indicator_Widget *
1265 e_mod_move_indicator_widget_get(void)
1268 m = e_mod_move_util_get();
1269 E_CHECK_RETURN(m, NULL);
1271 return m->indicator_widget;
1274 /* find indicator widget target window */
1276 e_mod_move_indicator_widget_target_window_find(Ecore_X_Window *win)
1279 E_Move_Border *find_mb = NULL;
1280 Eina_Bool found = EINA_FALSE;
1281 E_Zone *zone = NULL;
1282 Eina_Bool ret = EINA_FALSE;
1284 E_CHECK_RETURN(win, EINA_FALSE);
1285 m = e_mod_move_util_get();
1286 E_CHECK_RETURN(m, EINA_FALSE);
1289 EINA_INLIST_REVERSE_FOREACH(m->borders, find_mb)
1291 if (!find_mb->bd) continue;
1292 // the first OnScreen & FullScreen Window
1293 zone = find_mb->bd->zone;
1294 if (find_mb->visible
1295 && REGION_EQUAL_TO_ZONE(find_mb, zone) // check fullscreen
1296 && (zone->id == 0)) // change zone->id comparing to bd's profile property (mobile)
1304 && !(TYPE_APPTRAY_CHECK(find_mb))
1305 && !(TYPE_MINI_APPTRAY_CHECK(find_mb))
1306 && !(TYPE_QUICKPANEL_CHECK(find_mb)))
1308 *win = find_mb->bd->client.win;
1315 /* find indicator widget's target window and apply indicator widget control */
1317 e_mod_move_indicator_widget_apply(void)
1320 E_Move_Indicator_Widget *indi_widget = NULL;
1321 Ecore_X_Window target_win;
1322 E_Move_Border *target_mb = NULL;
1324 m = e_mod_move_util_get();
1326 if ((m->screen_reader_state) || (m->setup_wizard_state))
1328 _e_mod_move_indicator_widget_active_indicator_win_find_and_set();
1332 if (e_mod_move_indicator_widget_target_window_find(&target_win))
1334 target_mb = e_mod_move_border_client_find(target_win);
1335 // if previous indicator widget is created
1336 if ((indi_widget = e_mod_move_indicator_widget_get()))
1338 // if current indicator widget's win is equal to finded win
1339 // then just return.
1340 if ((indi_widget->win == target_win)) return;
1343 // if current indicator widget's win is not equal to finded win
1344 // then del previous indicator_widget and add new indicator widget.
1345 e_mod_move_indicator_widget_del(indi_widget);
1346 e_mod_move_indicator_widget_set(e_mod_move_indicator_widget_add(target_win));
1348 (TYPE_NOTIFICATION_CHECK(target_mb) || TYPE_APP_SELECTOR_CHECK(target_mb)) &&
1349 (target_mb->argb) &&
1350 (target_mb->indicator_state == E_MOVE_INDICATOR_STATE_NONE))
1355 e_mod_move_util_prop_active_indicator_win_set(target_win, m);
1360 //if previous indicator widget is not creagted
1361 //then add new indicator widget.
1362 e_mod_move_indicator_widget_set(e_mod_move_indicator_widget_add(target_win));
1365 (TYPE_NOTIFICATION_CHECK(target_mb) || TYPE_APP_SELECTOR_CHECK(target_mb)) &&
1366 (target_mb->argb) &&
1367 (target_mb->indicator_state == E_MOVE_INDICATOR_STATE_NONE))
1372 e_mod_move_util_prop_active_indicator_win_set(target_win, m);
1377 // if current window does not require indicator widget
1378 // and previous indicator widget is created,
1379 // then del previous indicator_widget
1380 if ((indi_widget = e_mod_move_indicator_widget_get()))
1382 e_mod_move_indicator_widget_del(indi_widget);
1383 e_mod_move_indicator_widget_set(NULL);
1388 /* create E_Move_Border related Indicator_Widget */
1389 EINTERN E_Move_Indicator_Widget *
1390 e_mod_move_indicator_widget_add(Ecore_X_Window win)
1393 E_Move_Border *mb = NULL;
1394 E_Move_Indicator_Widget *indi_widget = NULL;
1395 E_Move_Widget_Object *mwo = NULL;
1402 m = e_mod_move_util_get();
1403 E_CHECK_RETURN(m, EINA_FALSE);
1405 mb = e_mod_move_border_client_find(win);
1406 E_CHECK_RETURN(mb, NULL);
1408 indi_widget = E_NEW(E_Move_Indicator_Widget, 1);
1409 E_CHECK_RETURN(indi_widget, NULL);
1411 indi_widget->win = win;
1412 indi_widget->objs = e_mod_move_widget_objs_add(m);
1413 if (indi_widget->objs)
1418 x = m->indicator_widget_geometry[E_MOVE_ANGLE_90].x;
1419 y = m->indicator_widget_geometry[E_MOVE_ANGLE_90].y;
1420 w = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
1421 h = m->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
1424 x = m->indicator_widget_geometry[E_MOVE_ANGLE_180].x;
1425 y = m->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
1426 w = m->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
1427 h = m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
1430 x = m->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
1431 y = m->indicator_widget_geometry[E_MOVE_ANGLE_270].y;
1432 w = m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
1433 h = m->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
1437 x = m->indicator_widget_geometry[E_MOVE_ANGLE_0].x;
1438 y = m->indicator_widget_geometry[E_MOVE_ANGLE_0].y;
1439 w = m->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
1440 h = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
1443 e_mod_move_widget_objs_move(indi_widget->objs, x, y);
1444 e_mod_move_widget_objs_resize(indi_widget->objs, w, h);
1445 e_mod_move_widget_objs_layer_set(indi_widget->objs, EVAS_LAYER_MAX-2);
1446 e_mod_move_widget_objs_color_set(indi_widget->objs, 0, 0, 0, 0);
1447 e_mod_move_widget_objs_show(indi_widget->objs);
1448 e_mod_move_widget_objs_raise(indi_widget->objs);
1450 // Set Input Shape Mask
1451 if ((indi_widget->input_region_id = e_manager_comp_input_region_id_new(m->man)))
1453 e_manager_comp_input_region_id_set(m->man,
1454 indi_widget->input_region_id,
1465 // Set Event Handler
1466 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
1469 _e_mod_move_indicator_widget_obj_event_setup(indi_widget, mwo);
1474 if (indi_widget->objs) e_mod_move_widget_objs_del(indi_widget->objs);
1475 memset(indi_widget, 0, sizeof(E_Move_Indicator_Widget));
1476 E_FREE(indi_widget);
1480 /* delete indicator_widget */
1482 e_mod_move_indicator_widget_del(E_Move_Indicator_Widget *indi_widget)
1485 E_Move_Border *mb = NULL;
1486 E_Move_Border *at_mb = NULL;
1487 E_Move_Border *qp_mb = NULL;
1488 E_Zone *zone = NULL;
1489 int x = 0; int y = 0;
1490 int mx = 0, my = 0, ax = 0, ay = 0;
1492 E_CHECK(indi_widget);
1493 m = e_mod_move_util_get();
1495 if (e_mod_move_indicator_widget_click_get(indi_widget))
1496 ecore_x_mouse_up_send(indi_widget->win,
1501 if ((mb = e_mod_move_border_client_find(indi_widget->win)))
1503 if (indi_widget->input_region_id)
1504 e_manager_comp_input_region_id_del(m->man, indi_widget->input_region_id);
1506 // if indicaor widget is deleted, then apptray or quickpanel's mirror object hide with animation
1507 if (indi_widget->quickpanel_move)
1509 qp_mb = e_mod_move_quickpanel_find();
1510 E_CHECK_GOTO(qp_mb, error_cleanup);
1511 zone = qp_mb->bd->zone;
1516 mx = qp_mb->w * -1; my = 0;
1517 if (m->qp_scroll_with_clipping)
1519 ax = zone->x; ay = zone->y;
1527 mx = 0; my = zone->h;
1528 if (m->qp_scroll_with_clipping)
1530 ax = zone->x + qp_mb->w;
1531 ay = zone->y + qp_mb->h;
1539 mx = zone->w; my = 0;
1540 if (m->qp_scroll_with_clipping)
1542 ax = zone->x + qp_mb->w;
1543 ay = zone->y + qp_mb->h;
1552 mx = 0; my = qp_mb->h * -1;
1553 if (m->qp_scroll_with_clipping)
1555 ax = zone->x; ay = zone->y;
1564 if (e_mod_move_quickpanel_objs_animation_state_get(qp_mb))
1566 e_mod_move_quickpanel_objs_animation_stop(qp_mb);
1567 e_mod_move_quickpanel_objs_animation_clear(qp_mb);
1569 e_mod_move_quickpanel_objs_add(qp_mb);
1570 e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
1571 e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
1573 "[MOVE] ev:%15.15s Indicator Widget Deleted: Hide QuickPanel %s():%d\n",
1574 "EVAS_OBJ", __func__, __LINE__);
1577 if (indi_widget->apptray_move)
1579 at_mb = e_mod_move_apptray_find();
1580 E_CHECK_GOTO(at_mb, error_cleanup);
1581 zone = at_mb->bd->zone;
1606 if (e_mod_move_apptray_objs_animation_state_get(at_mb))
1608 e_mod_move_apptray_objs_animation_stop(at_mb);
1609 e_mod_move_apptray_objs_animation_clear(at_mb);
1611 e_mod_move_apptray_objs_add(at_mb);
1613 // apptray_objs_animation_layer_set
1614 e_mod_move_apptray_objs_animation_layer_set(at_mb);
1616 e_mod_move_apptray_e_border_move(at_mb, x, y);
1617 e_mod_move_apptray_objs_animation_move(at_mb, x, y);
1619 "[MOVE] ev:%15.15s Indicator Widget Deleted: Hide Apptray %s():%d\n",
1620 "EVAS_OBJ", __func__, __LINE__);
1625 if (indi_widget->objs) e_mod_move_widget_objs_del(indi_widget->objs);
1626 memset(indi_widget, 0, sizeof(E_Move_Indicator_Widget));
1627 E_FREE(indi_widget);
1628 if (m) m->indicator_widget = NULL;
1632 e_mod_move_indicator_widget_angle_change(Ecore_X_Window win)
1635 E_Move_Indicator_Widget *indi_widget = NULL;
1636 Eina_Bool ret = EINA_FALSE;
1637 E_Move_Border *mb = NULL;
1643 m = e_mod_move_util_get();
1644 E_CHECK_RETURN(m, EINA_FALSE);
1646 indi_widget = e_mod_move_indicator_widget_get();
1647 E_CHECK_RETURN(indi_widget, EINA_FALSE);
1649 if ((indi_widget->win == win))
1651 if ((mb = e_mod_move_border_client_find(win)))
1656 x = m->indicator_widget_geometry[E_MOVE_ANGLE_90].x;
1657 y = m->indicator_widget_geometry[E_MOVE_ANGLE_90].y;
1658 w = m->indicator_widget_geometry[E_MOVE_ANGLE_90].w;
1659 h = m->indicator_widget_geometry[E_MOVE_ANGLE_90].h;
1662 x = m->indicator_widget_geometry[E_MOVE_ANGLE_180].x;
1663 y = m->indicator_widget_geometry[E_MOVE_ANGLE_180].y;
1664 w = m->indicator_widget_geometry[E_MOVE_ANGLE_180].w;
1665 h = m->indicator_widget_geometry[E_MOVE_ANGLE_180].h;
1668 x = m->indicator_widget_geometry[E_MOVE_ANGLE_270].x;
1669 y = m->indicator_widget_geometry[E_MOVE_ANGLE_270].y;
1670 w = m->indicator_widget_geometry[E_MOVE_ANGLE_270].w;
1671 h = m->indicator_widget_geometry[E_MOVE_ANGLE_270].h;
1675 x = m->indicator_widget_geometry[E_MOVE_ANGLE_0].x;
1676 y = m->indicator_widget_geometry[E_MOVE_ANGLE_0].y;
1677 w = m->indicator_widget_geometry[E_MOVE_ANGLE_0].w;
1678 h = m->indicator_widget_geometry[E_MOVE_ANGLE_0].h;
1681 e_mod_move_widget_objs_move(indi_widget->objs, x, y);
1682 e_mod_move_widget_objs_resize(indi_widget->objs, w, h);
1684 //change Input Shape Mask
1685 if (indi_widget->input_region_id)
1687 e_manager_comp_input_region_id_set(m->man,
1688 indi_widget->input_region_id,
1698 e_mod_move_indicator_widget_scrollable_check(void)
1700 E_Move_Border *lockscr_mb = NULL;
1701 E_Move_Border *taskmgr_mb = NULL;
1702 E_Move_Border *pwlock_mb = NULL;
1704 // if lockscreen is exist & visible, then do not show apptray & quickpanel
1705 if ((lockscr_mb = e_mod_move_lockscreen_find()))
1707 if (lockscr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
1710 "[MOVE] ev:%15.15s %s %s()\n",
1711 "EVAS_OBJ","Lockscreen is exist.", __func__);
1715 // if taskmanage is exist & visible, then do not show apptray & quickpanel
1716 if ((taskmgr_mb = e_mod_move_taskmanager_find()))
1718 if (taskmgr_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
1721 "[MOVE] ev:%15.15s %s %s()\n",
1722 "EVAS_OBJ","TaskManager is exist.", __func__);
1727 // if pwlock is exist & visible, then do not show apptray & quickpanel
1728 if ((pwlock_mb = e_mod_move_pwlock_find()))
1730 if (pwlock_mb->visibility == E_MOVE_VISIBILITY_STATE_VISIBLE)
1733 "[MOVE] ev:%15.15s %s %s()\n",
1734 "EVAS_OBJ","PWLOCK is exist.", __func__);
1743 e_mod_move_indicator_widget_click_get(E_Move_Indicator_Widget* indi_widget)
1745 Eina_Bool click = EINA_FALSE;
1746 E_Move_Widget_Object *mwo = NULL;
1749 E_CHECK_RETURN(indi_widget, EINA_FALSE);
1750 E_CHECK_RETURN(indi_widget->objs, EINA_FALSE);
1752 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
1755 click = e_mod_move_event_click_get(mwo->event);
1762 e_mod_move_indicator_widget_event_clear(E_Move_Indicator_Widget* indi_widget)
1764 Eina_Bool click = EINA_FALSE;
1765 E_Move_Widget_Object *mwo = NULL;
1767 E_Move_Border *mb = NULL;
1769 E_CHECK_RETURN(indi_widget, EINA_FALSE);
1770 E_CHECK_RETURN(indi_widget->objs, EINA_FALSE);
1772 click = e_mod_move_indicator_widget_click_get(indi_widget);
1773 E_CHECK_RETURN(click, EINA_FALSE);
1775 EINA_LIST_FOREACH(indi_widget->objs, l, mwo)
1778 e_mod_move_event_data_clear(mwo->event);
1779 e_mod_move_event_click_set(mwo->event, EINA_FALSE);
1782 _e_mod_move_indicator_widget_apptray_move_set(indi_widget, EINA_FALSE);
1783 _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_FALSE);
1785 mb = e_mod_move_border_client_find(indi_widget->win);
1786 if (mb && mb->flick_data) e_mod_move_flick_data_free(mb);
1791 e_mod_move_indicator_widget_state_change(Ecore_X_Window win, Eina_Bool state)
1793 E_Move_Indicator_Widget *indi_widget = NULL;
1794 E_Move_Border *mb = NULL;
1796 if ((indi_widget = e_mod_move_indicator_widget_get()))
1798 if ((indi_widget->win == win)
1801 // indicator state disable -> delete current indicator widget
1802 e_mod_move_indicator_widget_del(indi_widget);
1803 e_mod_move_indicator_widget_set(NULL);
1808 mb = e_mod_move_border_client_find(win);
1810 && (mb->indicator_type == E_MOVE_INDICATOR_TYPE_1)
1812 e_mod_move_indicator_widget_apply();
1819 e_mod_move_indicator_widget_type_change(Ecore_X_Window win, E_Move_Indicator_Type type)
1821 E_Move_Indicator_Widget *indi_widget = NULL;
1822 E_Move_Border *mb = NULL;
1824 if ((indi_widget = e_mod_move_indicator_widget_get()))
1826 if ((indi_widget->win == win)
1827 && (type != E_MOVE_INDICATOR_TYPE_1))
1829 // indicator type is not type_1 -> delete current indicator widget
1830 e_mod_move_indicator_widget_del(indi_widget);
1831 e_mod_move_indicator_widget_set(NULL);
1834 e_mod_move_indicator_widget_apply();
1840 mb = e_mod_move_border_client_find(win);
1842 && (mb->indicator_state == E_MOVE_INDICATOR_STATE_ON)
1843 && (type == E_MOVE_INDICATOR_TYPE_1))
1844 e_mod_move_indicator_widget_apply();
1851 e_mod_move_indicator_widget_angle_change_post_job(void)
1853 E_Move_Indicator_Widget *indi_widget = NULL;
1854 E_Move_Border *mb = NULL;
1855 E_Border *bd = NULL;
1856 E_Zone *zone = NULL;
1860 indi_widget = e_mod_move_indicator_widget_get();
1861 E_CHECK_RETURN(indi_widget, EINA_FALSE);
1863 mb = e_mod_move_border_client_find(indi_widget->win);
1864 E_CHECK_RETURN(mb, EINA_FALSE);
1867 E_CHECK_RETURN(bd, EINA_FALSE);
1870 E_CHECK_RETURN(zone, EINA_FALSE);
1874 if (e_mod_move_indicator_widget_click_get(indi_widget))
1887 x = zone->x + zone->w;
1888 y = zone->y + zone->h;
1891 x = zone->x + zone->w;
1892 y = zone->y + zone->h;
1900 e_mod_move_flick_data_init(mb, x, y);