aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-08-08 14:36:02 +0000
committerTom Hacohen <tom@stosb.com>2011-08-08 14:36:02 +0000
commit6a2929e44878d7ac6c1f867b5e3e7ceb4054747e (patch)
tree215b8ece54a89bd3fd074dd7b52ae6beb69abe61 /legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c
parentremvoe todo's from doc (diff)
downloadefl-6a2929e44878d7ac6c1f867b5e3e7ceb4054747e.tar.gz
Ecore X: Added Xfixes selection notification support.
Now we can get notifications for changes in X selection. This is very useful for text editors that want to disable their "paste" button when there's nothing to paste. SVN revision: 62205
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c
index 6fae184212..7bed783285 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c
@@ -21,7 +21,11 @@ _ecore_x_fixes_init(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (XFixesQueryVersion(_ecore_x_disp, &_fixes_major, &_fixes_minor))
- _fixes_available = 1;
+ {
+ _fixes_available = 1;
+
+ ECORE_X_EVENT_FIXES_SELECTION_NOTIFY = ecore_event_type_new();
+ }
else
_fixes_available = 0;
@@ -80,6 +84,24 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
#endif /* ifdef ECORE_XFIXES */
+EAPI Eina_Bool
+ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
+{
+#ifdef ECORE_XFIXES
+ if (_fixes_available)
+ {
+ XFixesSelectSelectionInput (_ecore_x_disp,
+ DefaultRootWindow(_ecore_x_disp),
+ 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)
{