summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_x/Ecore_X.h2
-rw-r--r--src/lib/ecore_x/ecore_x_fixes.c29
2 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index c81be31808..8c0c7d3ef1 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -2436,6 +2436,8 @@ EAPI void ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Regio
2436EAPI void ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin); 2436EAPI void ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin);
2437EAPI void ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset); 2437EAPI void ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset);
2438EAPI void ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin); 2438EAPI void ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin);
2439EAPI void ecore_x_cursor_show(void);
2440EAPI void ecore_x_cursor_hide(void);
2439 2441
2440/** 2442/**
2441 * xfixes selection notification request. 2443 * xfixes selection notification request.
diff --git a/src/lib/ecore_x/ecore_x_fixes.c b/src/lib/ecore_x/ecore_x_fixes.c
index 30432354d5..f656edec6e 100644
--- a/src/lib/ecore_x/ecore_x_fixes.c
+++ b/src/lib/ecore_x/ecore_x_fixes.c
@@ -10,6 +10,7 @@
10static int _fixes_available; 10static int _fixes_available;
11#ifdef ECORE_XFIXES 11#ifdef ECORE_XFIXES
12static int _fixes_major, _fixes_minor; 12static int _fixes_major, _fixes_minor;
13static int _cursor_visible = 1;
13#endif /* ifdef ECORE_XFIXES */ 14#endif /* ifdef ECORE_XFIXES */
14 15
15void 16void
@@ -406,3 +407,31 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region,
406 if (_ecore_xlib_sync) ecore_x_sync(); 407 if (_ecore_xlib_sync) ecore_x_sync();
407#endif /* ifdef ECORE_XFIXES */ 408#endif /* ifdef ECORE_XFIXES */
408} 409}
410
411EAPI void
412ecore_x_cursor_show(void)
413{
414 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
415#ifdef ECORE_XFIXES
416 if (!_cursor_visible)
417 {
418 XFixesShowCursor(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp));
419 XFlush(_ecore_x_disp);
420 _cursor_visible = 1;
421 }
422#endif /* ifdef ECORE_XFIXES */
423}
424
425EAPI void
426ecore_x_cursor_hide(void)
427{
428 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
429#ifdef ECORE_XFIXES
430 if (_cursor_visible)
431 {
432 XFixesHideCursor(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp));
433 XFlush(_ecore_x_disp);
434 _cursor_visible = 0;
435 }
436#endif /* ifdef ECORE_XFIXES */
437}