aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c53
1 files changed, 27 insertions, 26 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
index 9bc5e5912c..d4d834f290 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -9,19 +9,19 @@ static Eina_Bool _randr_available = EINA_FALSE;
#ifdef ECORE_XRANDR
static int _randr_major, _randr_minor;
int _randr_version;
-#define RANDR_1_1 ((1 << 16) | 1)
-#define RANDR_1_2 ((1 << 16) | 2)
-#define RANDR_1_3 ((1 << 16) | 3)
+#define RANDR_1_1 ((1 << 16) | 1)
+#define RANDR_1_2 ((1 << 16) | 2)
+#define RANDR_1_3 ((1 << 16) | 3)
-#define RANDR_VALIDATE_ROOT(screen, \
- root) ((screen = \
- XRRRootToScreen(_ecore_x_disp, \
- root)) != -1)
+#define RANDR_VALIDATE_ROOT(screen, \
+ root) ((screen = \
+ XRRRootToScreen(_ecore_x_disp, \
+ root)) != -1)
#define Ecore_X_Randr_Unset -1
-XRRScreenResources * (*_ecore_x_randr_get_screen_resources)(Display * dpy,
- Window window);
+XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * dpy,
+ Window window);
#endif /* ifdef ECORE_XRANDR */
@@ -35,17 +35,17 @@ _ecore_x_randr_init(void)
_ecore_x_randr_get_screen_resources = NULL;
if (XRRQueryVersion(_ecore_x_disp, &_randr_major, &_randr_minor))
- {
- _randr_version = (_randr_major << 16) | _randr_minor;
- if (_randr_version >= RANDR_1_3)
- _ecore_x_randr_get_screen_resources = XRRGetScreenResourcesCurrent;
- else if (_randr_version == RANDR_1_2)
- _ecore_x_randr_get_screen_resources = XRRGetScreenResources;
+ {
+ _randr_version = (_randr_major << 16) | _randr_minor;
+ if (_randr_version >= RANDR_1_3)
+ _ecore_x_randr_get_screen_resources = XRRGetScreenResourcesCurrent;
+ else if (_randr_version == RANDR_1_2)
+ _ecore_x_randr_get_screen_resources = XRRGetScreenResources;
- _randr_available = EINA_TRUE;
- }
+ _randr_available = EINA_TRUE;
+ }
else
- _randr_available = EINA_FALSE;
+ _randr_available = EINA_FALSE;
#else
_randr_available = EINA_FALSE;
@@ -73,13 +73,13 @@ ecore_x_randr_version_get(void)
#ifdef ECORE_XRANDR
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_randr_available)
- {
- return _randr_version;
- }
+ {
+ return _randr_version;
+ }
else
- {
- return Ecore_X_Randr_Unset;
- }
+ {
+ return Ecore_X_Randr_Unset;
+ }
#else
return -1;
#endif
@@ -91,11 +91,12 @@ _ecore_x_randr_root_validate(Ecore_X_Window root)
#ifdef ECORE_XRANDR
Ecore_X_Randr_Screen scr = -1;
if (root && RANDR_VALIDATE_ROOT(scr, root))
- return EINA_TRUE;
+ return EINA_TRUE;
else
- return EINA_FALSE;
+ return EINA_FALSE;
#else
return EINA_FALSE;
#endif
}
+