diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index bb5aedf39e..45e208e4e0 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -2444,6 +2444,14 @@ EAPI void ecore_x_root_screen_barriers_set(Ecore_X_Rectangle *scre */ EAPI Eina_Bool ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection); +/** + * xfixes selection notification request. + * + * In addition to ecore_x_fixes_selection_notification_request you can also specify for which window you want to get them + */ +EAPI Eina_Bool ecore_x_fixes_window_selection_notification_request(Ecore_X_Window window, Ecore_X_Atom selection); + + /* XComposite Extension Support */ EAPI Eina_Bool ecore_x_composite_query(void); EAPI void ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type); diff --git a/src/lib/ecore_x/ecore_x_fixes.c b/src/lib/ecore_x/ecore_x_fixes.c index 5582c3e3ef..4b659c2d8b 100644 --- a/src/lib/ecore_x/ecore_x_fixes.c +++ b/src/lib/ecore_x/ecore_x_fixes.c @@ -112,6 +112,26 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection) return EINA_FALSE; } +EAPI Eina_Bool +ecore_x_fixes_window_selection_notification_request(Ecore_X_Window window, Ecore_X_Atom selection) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE); + +#ifdef ECORE_XFIXES + if (_fixes_available) + { + XFixesSelectSelectionInput (_ecore_x_disp, + window, + selection, + XFixesSetSelectionOwnerNotifyMask | + XFixesSelectionWindowDestroyNotifyMask | + XFixesSelectionClientCloseNotifyMask); + return EINA_TRUE; + } +#endif + return EINA_FALSE; +} + EAPI Ecore_X_Region ecore_x_region_new(Ecore_X_Rectangle *rects, int num)