summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-12 17:36:48 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-08 10:59:28 +0100
commit293b2fe7191fd591d9553a03c2ee6f6d06a07641 (patch)
tree85b0c39122a2bc092eed3446d8475d571ddb179b
parent39f3ce42dcde447779cb1583501b681ba85d86d4 (diff)
downloadefl-293b2fe7191fd591d9553a03c2ee6f6d06a07641.tar.gz
ecore_x: add API to request selection changed events for diff. wins
we need that in order to get seleciton per window events, which is required to get a nice mapping onto the ecore_evas object. Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com> Reviewed-by: Chris Michael <cp.michael@samsung.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11193
-rw-r--r--src/lib/ecore_x/Ecore_X.h9
-rw-r--r--src/lib/ecore_x/ecore_x_fixes.c20
2 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index bb5aedf39e..94b612abc6 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -2444,6 +2444,15 @@ 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
+ * @since 1.24
+ */
+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)