forked from enlightenment/enlightenment
since we're now requiring an efl version which has the necessary ecore-x functions, remove old and not-compiling ecore-x randr code which obviously has never been compile tested
This commit is contained in:
parent
0b4528f3a4
commit
944cfd246d
|
@ -425,7 +425,6 @@ _e_randr_config_restore(void)
|
|||
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 */
|
||||
|
@ -440,17 +439,6 @@ _e_randr_config_restore(void)
|
|||
|
||||
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.
|
||||
|
@ -893,13 +881,11 @@ _e_randr_config_crtc_update(E_Randr_Crtc_Config *cfg)
|
|||
{
|
||||
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)))
|
||||
{
|
||||
|
@ -920,39 +906,6 @@ _e_randr_config_crtc_update(E_Randr_Crtc_Config *cfg)
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -1215,12 +1168,10 @@ _e_randr_config_screen_size_calculate(int *sw, int *sh)
|
|||
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)))
|
||||
{
|
||||
|
@ -1233,16 +1184,6 @@ _e_randr_config_screen_size_calculate(int *sw, int *sh)
|
|||
|
||||
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.
|
||||
|
|
|
@ -226,6 +226,7 @@ e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord c
|
|||
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__);
|
||||
|
||||
|
@ -249,10 +250,6 @@ e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord c
|
|||
/* 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 */
|
||||
|
@ -271,20 +268,6 @@ e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord c
|
|||
/* 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)
|
||||
|
|
Loading…
Reference in New Issue