else
{
/* this crtc is not in our config. get values from X */
-#if ((ECORE_VERSION_MAJOR >= 1) && (ECORE_VERSION_MINOR >= 8))
Ecore_X_Randr_Crtc_Info *cinfo;
/* get crtc info from X */
ecore_x_randr_crtc_info_free(cinfo);
}
-#else
- /* get geometry of this crtc */
- ecore_x_randr_crtc_geometry_get(root, crtcs[c],
- &x, &y, &w, &h);
-
- /* get mode */
- mode = ecore_x_randr_crtc_mode_get(root, crtcs[c]);
-
- /* get orientation */
- orient = ecore_x_randr_crtc_orientation_get(root, crtcs[c]);
-#endif
}
/* at this point, we should have geometry, mode and orientation.
{
Ecore_X_Window root = 0;
Eina_Bool ret = EINA_FALSE;
+ Ecore_X_Randr_Crtc_Info *cinfo;
/* grab the root window */
root = ecore_x_window_root_first_get();
-#if ((ECORE_VERSION_MAJOR >= 1) && (ECORE_VERSION_MINOR >= 8))
- Ecore_X_Randr_Crtc_Info *cinfo;
-
/* get crtc info from X */
if ((cinfo = ecore_x_randr_crtc_info_get(root, cfg->xid)))
{
ecore_x_randr_crtc_info_free(cinfo);
}
-#else
- Evas_Coord x, y, w, h;
- unsigned int orient, mode;
-
- /* get geometry of this crtc */
- ecore_x_randr_crtc_geometry_get(root, ev->crtc, &x, &y, &w, &h);
- if ((cfg->x != x) || (cfg->y != y) ||
- (cfg->width != w) || (cfg->height != h))
- {
- cfg->x = x;
- cfg->y = y;
- cfg->width = w;
- cfg->height = h;
-
- ret = EINA_TRUE;
- }
-
- /* get orientation */
- orient = ecore_x_randr_crtc_orientation_get(root, cfg->xid);
- if (cfg->orient != orient)
- {
- cfg->orient = orient;
- ret = EINA_TRUE;
- }
-
- /* get mode */
- mode = ecore_x_randr_crtc_mode_get(root, cfg->xid);
- if (cfg->mode != mode)
- {
- cfg->mode = mode;
- ret = EINA_TRUE;
- }
-#endif
return ret;
}
if ((!w) || (!h))
{
Ecore_X_Randr_Crtc crtc = 0;
+ Ecore_X_Randr_Crtc_Info *cinfo;
crtc = ecore_x_randr_output_crtc_get(root, outputs[i]);
-#if ((ECORE_VERSION_MAJOR >= 1) && (ECORE_VERSION_MINOR >= 8))
- Ecore_X_Randr_Crtc_Info *cinfo;
-
/* get crtc info from X */
if ((cinfo = ecore_x_randr_crtc_info_get(root, crtc)))
{
ecore_x_randr_crtc_info_free(cinfo);
}
-#else
- /* get geometry of this crtc */
- ecore_x_randr_crtc_geometry_get(root, crtc, &x, &y, &w, &h);
-
- /* get mode */
- mode = ecore_x_randr_crtc_mode_get(root, crtc);
-
- /* get orientation */
- orient = ecore_x_randr_crtc_orientation_get(root, crtc);
-#endif
}
/* at this point, we should have geometry, mode and orientation.
E_Smart_Data *sd;
Ecore_X_Randr_Orientation orients = ECORE_X_RANDR_ORIENTATION_ROT_0;
Ecore_X_Window root = 0;
+ Ecore_X_Randr_Crtc_Info *crtc_info;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
/* get the root window */
root = ecore_x_window_root_first_get();
- /* check ecore_x_randr version */
-#if ((ECORE_VERSION_MAJOR >= 1) && (ECORE_VERSION_MINOR >= 8))
- Ecore_X_Randr_Crtc_Info *crtc_info;
-
if ((crtc_info = ecore_x_randr_crtc_info_get(root, crtc)))
{
/* get current orientation */
/* free any memory allocated from ecore_x_randr */
ecore_x_randr_crtc_info_free(crtc_info);
}
-#else
- /* get current orientation */
- sd->crtc.orient = ecore_x_randr_crtc_orientation_get(root, crtc);
-
- /* get possible orientations for this crtc */
- orients = ecore_x_randr_crtc_orientations_get(root, crtc);
-
- /* check if orientation is possible and disable if not */
- if (orients <= ECORE_X_RANDR_ORIENTATION_ROT_0)
- edje_object_signal_emit(sd->o_frame, "e,state,rotate,disabled", "e");
-
- /* get current mode */
- sd->crtc.mode = ecore_x_randr_crtc_mode_get(root, crtc);
-#endif
/* check crtc current mode to determine if enabled */
if (sd->crtc.mode != 0)