summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_selection_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_selection_manager.c')
-rw-r--r--src/lib/elementary/efl_selection_manager.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c
index 0498820e98..34c876270e 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -3823,23 +3823,17 @@ _cocoa_sel_manager_seat_selection_init(Efl_Selection_Manager_Data *pd, unsigned
3823static Ecore_Cocoa_Window * 3823static Ecore_Cocoa_Window *
3824_cocoa_window_get(const Evas_Object *obj) 3824_cocoa_window_get(const Evas_Object *obj)
3825{ 3825{
3826 Evas_Object *top, *par;
3827 Ecore_Cocoa_Window *win = NULL; 3826 Ecore_Cocoa_Window *win = NULL;
3827 Evas_Object *_win;
3828 3828
3829 if (elm_widget_is(obj)) 3829 _win = elm_win_get(obj);
3830 if (_win)
3830 { 3831 {
3831 top = elm_widget_top_get(obj); 3832 win = elm_win_cocoa_window_get(_win);
3832 if (!top)
3833 {
3834 par = elm_widget_parent_widget_get(obj);
3835 if (par) top = elm_widget_top_get(par);
3836 }
3837 if ((top) && (efl_isa(top, EFL_UI_WIN_CLASS)))
3838 win = elm_win_cocoa_window_get(top);
3839 } 3833 }
3834
3840 if (!win) 3835 if (!win)
3841 { 3836 {
3842 // FIXME
3843 CRI("WIN has not been retrieved!!!"); 3837 CRI("WIN has not been retrieved!!!");
3844 } 3838 }
3845 3839
@@ -3942,6 +3936,7 @@ _cocoa_efl_sel_manager_selection_set(Efl_Selection_Manager_Data *pd,
3942 seat_sel = _cocoa_sel_manager_seat_selection_init(pd, seat); 3936 seat_sel = _cocoa_sel_manager_seat_selection_init(pd, seat);
3943 seat_sel->active_type = type; 3937 seat_sel->active_type = type;
3944 sel = seat_sel->sel; 3938 sel = seat_sel->sel;
3939
3945 if ((!data.mem) && (format != EFL_SELECTION_FORMAT_IMAGE)) 3940 if ((!data.mem) && (format != EFL_SELECTION_FORMAT_IMAGE))
3946 { 3941 {
3947 efl_selection_manager_selection_clear(pd->sel_man, owner, type, seat); 3942 efl_selection_manager_selection_clear(pd->sel_man, owner, type, seat);
@@ -4854,6 +4849,10 @@ _efl_selection_manager_selection_has_owner(Eo *obj EINA_UNUSED, Efl_Selection_Ma
4854 if (win) 4849 if (win)
4855 return !!ecore_wl2_dnd_selection_get(_wl_seat_get(win, request, seat)); 4850 return !!ecore_wl2_dnd_selection_get(_wl_seat_get(win, request, seat));
4856#endif 4851#endif
4852#ifdef HAVE_ELEMENTARY_COCOA
4853 // FIXME: need to check if there is clipboard data. Paste always enabled.
4854 return EINA_TRUE;
4855#endif
4857 return EINA_FALSE; 4856 return EINA_FALSE;
4858} 4857}
4859 4858