E (RandR): Remove _fill_data function (not needed). Implement Applying

of any changes to monitors.

NB: Be careful ... this will actually apply any changes now. Tested
here and appears to work ok, but YOU HAVE BEEN WARNED !!! If you apply
something and it turns your monitor into a paperweight, don't cry to me.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 77693
Christopher Michael 11 years ago committed by Christopher Michael
parent 40e42c4d28
commit 8ff992b7a7
  1. 40

@ -12,7 +12,6 @@ struct _E_Config_Dialog_Data
/* local function prototypes */
static void *_create_data(E_Config_Dialog *cfd __UNUSED__);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
@ -59,15 +58,9 @@ _create_data(E_Config_Dialog *cfd __UNUSED__)
E_Config_Dialog_Data *cfdata;
if (!(cfdata = E_NEW(E_Config_Dialog_Data, 1))) return NULL;
return cfdata;
static void
_fill_data(E_Config_Dialog_Data *cfdata __UNUSED__)
static void
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
@ -79,8 +72,39 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
Eina_List *l;
Evas_Object *mon;
Ecore_X_Window root;
root = cfd->con->manager->root;
EINA_LIST_FOREACH(e_smart_randr_monitors_get(cfdata->o_scroll), l, mon)
E_Randr_Crtc_Info *crtc;
Evas_Coord mx, my;
Ecore_X_Randr_Orientation orient;
Ecore_X_Randr_Mode_Info *mode;
if (!(crtc = e_smart_monitor_crtc_get(mon)))
orient = e_smart_monitor_orientation_get(mon);
mode = e_smart_monitor_mode_get(mon);
e_smart_monitor_position_get(mon, &mx, &my);
ecore_x_randr_crtc_pos_set(root, crtc->xid, mx, my);
ecore_x_randr_crtc_orientation_set(root, crtc->xid, orient);
if (mode)
if (!ecore_x_randr_crtc_settings_set(root, crtc->xid, NULL, -1,
-1, -1, mode->xid, -1))
printf("Saving Settings Failed\n");
return 1;