summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/efl_selection.c5
-rw-r--r--src/lib/elementary/efl_selection_manager.c21
-rw-r--r--src/lib/elementary/efl_ui_win.c8
3 files changed, 23 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_selection.c b/src/lib/elementary/efl_selection.c
index 5b6bccf2b0..657a7eb885 100644
--- a/src/lib/elementary/efl_selection.c
+++ b/src/lib/elementary/efl_selection.c
@@ -290,6 +290,11 @@ elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type type,
290 Elm_Selection_Loss_Cb func, const void *data) 290 Elm_Selection_Loss_Cb func, const void *data)
291{ 291{
292 Sel_Lost_Data *ldata = calloc(1, sizeof(Sel_Lost_Data)); 292 Sel_Lost_Data *ldata = calloc(1, sizeof(Sel_Lost_Data));
293#if HAVE_ELEMENTARY_COCOA
294 // Currently, we have no way to track changes in Cocoa pasteboard.
295 // Therefore, don't track this...
296 return;
297#endif
293 if (!ldata) return; 298 if (!ldata) return;
294 ldata->obj = obj; 299 ldata->obj = obj;
295 ldata->type = type; 300 ldata->type = type;
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
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index c62559d1bd..170edd2928 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -7629,8 +7629,16 @@ elm_win_cocoa_window_get(const Evas_Object *obj)
7629 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 7629 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
7630 if (!sd) return NULL; 7630 if (!sd) return NULL;
7631 7631
7632#if HAVE_ELEMENTARY_COCOA
7633 if (sd->cocoa.win) return sd->cocoa.win;
7634 if (sd->ee) return _elm_ee_cocoa_win_get(sd->ee);
7635 if (sd->parent) return elm_win_cocoa_window_get(sd->parent);
7636#endif
7637
7632 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); 7638 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
7633 return _elm_ee_cocoa_win_get(ee); 7639 return _elm_ee_cocoa_win_get(ee);
7640
7641 return NULL;
7634} 7642}
7635 7643
7636EAPI Ecore_Win32_Window * 7644EAPI Ecore_Win32_Window *