summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-08 13:51:56 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-08 17:05:20 +0300
commite2e569dfc7da3165af203ff3e45e5bb75175acf3 (patch)
tree403c6ea0f241ca2c86a3afc30b2fb3861f693535
parentb86f51f2797e785ac60d45185e4a0c53d50c93cb (diff)
CnP/Wayland: Fix window check for Wayland invocations.
This was leading to never enter the cnp functions dedicated to Wayland, as the given object was not a window. The Copy And Paste test was not working for this reason.
-rw-r--r--src/lib/elm_cnp.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 3bd0af9a4..6aadc71c9 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -3838,7 +3838,7 @@ elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection,
3838 return _x11_elm_cnp_selection_set(xwin, obj, selection, format, selbuf, buflen); 3838 return _x11_elm_cnp_selection_set(xwin, obj, selection, format, selbuf, buflen);
3839#endif 3839#endif
3840#ifdef HAVE_ELEMENTARY_WAYLAND 3840#ifdef HAVE_ELEMENTARY_WAYLAND
3841 if (elm_win_wl_window_get(obj)) 3841 if (_wl_elm_widget_window_get(obj))
3842 return _wl_elm_cnp_selection_set(obj, selection, format, selbuf, buflen); 3842 return _wl_elm_cnp_selection_set(obj, selection, format, selbuf, buflen);
3843#endif 3843#endif
3844 return _local_elm_cnp_selection_set(obj, selection, format, selbuf, buflen); 3844 return _local_elm_cnp_selection_set(obj, selection, format, selbuf, buflen);
@@ -3856,7 +3856,7 @@ elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection,
3856 _x11_elm_cnp_selection_loss_callback_set(obj, selection, func, data); 3856 _x11_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
3857#endif 3857#endif
3858#ifdef HAVE_ELEMENTARY_WAYLAND 3858#ifdef HAVE_ELEMENTARY_WAYLAND
3859 if (elm_win_wl_window_get(obj)) 3859 if (_wl_elm_widget_window_get(obj))
3860 _wl_elm_cnp_selection_loss_callback_set(obj, selection, func, data); 3860 _wl_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
3861#endif 3861#endif
3862 _local_elm_cnp_selection_loss_callback_set(obj, selection, func, data); 3862 _local_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
@@ -3872,7 +3872,7 @@ elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection)
3872 return _x11_elm_object_cnp_selection_clear(obj, selection); 3872 return _x11_elm_object_cnp_selection_clear(obj, selection);
3873#endif 3873#endif
3874#ifdef HAVE_ELEMENTARY_WAYLAND 3874#ifdef HAVE_ELEMENTARY_WAYLAND
3875 if (elm_win_wl_window_get(obj)) 3875 if (_wl_elm_widget_window_get(obj))
3876 return _wl_elm_cnp_selection_clear(obj, selection); 3876 return _wl_elm_cnp_selection_clear(obj, selection);
3877#endif 3877#endif
3878 return _local_elm_object_cnp_selection_clear(obj, selection); 3878 return _local_elm_object_cnp_selection_clear(obj, selection);
@@ -3890,7 +3890,7 @@ elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection,
3890 return _x11_elm_cnp_selection_get(xwin, obj, selection, format, datacb, udata); 3890 return _x11_elm_cnp_selection_get(xwin, obj, selection, format, datacb, udata);
3891#endif 3891#endif
3892#ifdef HAVE_ELEMENTARY_WAYLAND 3892#ifdef HAVE_ELEMENTARY_WAYLAND
3893 if (elm_win_wl_window_get(obj)) 3893 if (_wl_elm_widget_window_get(obj))
3894 return _wl_elm_cnp_selection_get(obj, selection, format, datacb, udata); 3894 return _wl_elm_cnp_selection_get(obj, selection, format, datacb, udata);
3895#endif 3895#endif
3896 return _local_elm_cnp_selection_get(obj, selection, format, datacb, udata); 3896 return _local_elm_cnp_selection_get(obj, selection, format, datacb, udata);
@@ -3916,9 +3916,10 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
3916 dropcb, dropdata); 3916 dropcb, dropdata);
3917#endif 3917#endif
3918#ifdef HAVE_ELEMENTARY_WAYLAND 3918#ifdef HAVE_ELEMENTARY_WAYLAND
3919 return _wl_elm_drop_target_add(obj, format, entercb, enterdata, 3919 if (_wl_elm_widget_window_get(obj))
3920 leavecb, leavedata, poscb, posdata, 3920 return _wl_elm_drop_target_add(obj, format, entercb, enterdata,
3921 dropcb, dropdata); 3921 leavecb, leavedata, poscb, posdata,
3922 dropcb, dropdata);
3922#endif 3923#endif
3923 return _local_elm_drop_target_add(obj, format, entercb, enterdata, 3924 return _local_elm_drop_target_add(obj, format, entercb, enterdata,
3924 leavecb, leavedata, poscb, posdata, 3925 leavecb, leavedata, poscb, posdata,
@@ -3939,8 +3940,9 @@ elm_drop_target_del(Evas_Object *obj, Elm_Sel_Format format,
3939 leavecb, leavedata, poscb, posdata, dropcb, dropdata); 3940 leavecb, leavedata, poscb, posdata, dropcb, dropdata);
3940#endif 3941#endif
3941#ifdef HAVE_ELEMENTARY_WAYLAND 3942#ifdef HAVE_ELEMENTARY_WAYLAND
3942 return _wl_elm_drop_target_del(obj, format, entercb, enterdata, 3943 if (_wl_elm_widget_window_get(obj))
3943 leavecb, leavedata, poscb, posdata, dropcb, dropdata); 3944 return _wl_elm_drop_target_del(obj, format, entercb, enterdata,
3945 leavecb, leavedata, poscb, posdata, dropcb, dropdata);
3944#endif 3946#endif
3945 return _local_elm_drop_target_del(obj); 3947 return _local_elm_drop_target_del(obj);
3946} 3948}
@@ -3963,11 +3965,12 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
3963 dragdone, donecbdata); 3965 dragdone, donecbdata);
3964#endif 3966#endif
3965#ifdef HAVE_ELEMENTARY_WAYLAND 3967#ifdef HAVE_ELEMENTARY_WAYLAND
3966 return _wl_elm_drag_start(obj, format, data, action, 3968 if (_wl_elm_widget_window_get(obj))
3967 createicon, createdata, 3969 return _wl_elm_drag_start(obj, format, data, action,
3968 dragpos, dragdata, 3970 createicon, createdata,
3969 acceptcb, acceptdata, 3971 dragpos, dragdata,
3970 dragdone, donecbdata); 3972 acceptcb, acceptdata,
3973 dragdone, donecbdata);
3971#endif 3974#endif
3972 return _local_elm_drag_start(obj, format, data, action, 3975 return _local_elm_drag_start(obj, format, data, action,
3973 createicon, createdata, 3976 createicon, createdata,
@@ -3985,7 +3988,8 @@ elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action)
3985 return _x11_elm_drag_action_set(obj, action); 3988 return _x11_elm_drag_action_set(obj, action);
3986#endif 3989#endif
3987#ifdef HAVE_ELEMENTARY_WAYLAND 3990#ifdef HAVE_ELEMENTARY_WAYLAND
3988 return _wl_elm_drag_action_set(obj, action); 3991 if (_wl_elm_widget_window_get(obj))
3992 return _wl_elm_drag_action_set(obj, action);
3989#endif 3993#endif
3990 return _local_elm_drag_action_set(obj, action); 3994 return _local_elm_drag_action_set(obj, action);
3991} 3995}
@@ -3999,7 +4003,7 @@ elm_selection_selection_has_owner(Evas_Object *obj)
3999 return _x11_elm_selection_selection_has_owner(obj); 4003 return _x11_elm_selection_selection_has_owner(obj);
4000#endif 4004#endif
4001#ifdef HAVE_ELEMENTARY_WAYLAND 4005#ifdef HAVE_ELEMENTARY_WAYLAND
4002 if (elm_win_wl_window_get(obj)) 4006 if (_wl_elm_widget_window_get(obj))
4003 return ecore_wl_dnd_selection_owner_has(ecore_wl_input_get()); 4007 return ecore_wl_dnd_selection_owner_has(ecore_wl_input_get());
4004#endif 4008#endif
4005 return _local_elm_selection_selection_has_owner(obj); 4009 return _local_elm_selection_selection_has_owner(obj);