From 165f5f2309f5801848d8141796482932efb3ccaf Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 2 Jul 2006 17:47:44 +0000 Subject: [PATCH] bug in xrandr - workaround. SVN revision: 23659 --- src/bin/e_int_config_display.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bin/e_int_config_display.c b/src/bin/e_int_config_display.c index b63e8e0aa..93e8f79de 100644 --- a/src/bin/e_int_config_display.c +++ b/src/bin/e_int_config_display.c @@ -198,7 +198,7 @@ static void _fill_data(E_Config_Dialog_Data *cfdata) { E_Manager *man; - Ecore_X_Randr_Rotation rots; + int rots; man = e_manager_current_get(); cfdata->orig_size = ecore_x_randr_current_screen_size_get(man->root); @@ -245,7 +245,7 @@ static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { char *sel_res, *sel_rate; - int w, h, r, i, n; + int w, h, r, i, n, k, rr; Ecore_X_Screen_Size *sizes; Ecore_X_Screen_Size size; Ecore_X_Screen_Refresh_Rate *rates; @@ -275,7 +275,6 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) (sizes[i].height == h)) { size = sizes[i]; - int k, rr; rates = ecore_x_randr_screen_refresh_rates_get(man->root, i, &rr); for (k = 0; k < rr; k++) { @@ -297,13 +296,15 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) cfdata->orig_size = size; cfdata->orig_rate = rate; } - + if ((cfdata->can_rotate) || (cfdata->can_flip)) { - Ecore_X_Randr_Rotation rot; + int rot; rot = ecore_x_randr_screen_rotation_get(man->root); - if (rot != (cfdata->rotation | cfdata->flip)) +// FIXME: a bug in x where it returns that the current rotation is still +// normal (none) when it isn't. so just blindly ask for a new rot anyway. +// if (rot != (cfdata->rotation | cfdata->flip)) ecore_x_randr_screen_rotation_set(man->root, cfdata->rotation | cfdata->flip); e_config->display_res_rotation = cfdata->rotation | cfdata->flip;