discomfitor pushed a commit to branch master.

commit 944cfd246d4ccc7ca818713d8f782e2e038ee53d
Author: discomfitor <[email protected]>
Date:   Sat Aug 31 15:07:15 2013 +0100

    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
---
 src/bin/e_randr.c                        | 63 +-------------------------------
 src/modules/conf_randr/e_smart_monitor.c | 19 +---------
 2 files changed, 3 insertions(+), 79 deletions(-)

diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c
index 6904f7a..79a91d5 100644
--- a/src/bin/e_randr.c
+++ b/src/bin/e_randr.c
@@ -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.
diff --git a/src/modules/conf_randr/e_smart_monitor.c 
b/src/modules/conf_randr/e_smart_monitor.c
index 3e1fa19..2d5e17a 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -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)

-- 

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk

Reply via email to