princeamd pushed a commit to branch enlightenment-0.17.
commit c1a6c1c6aaf52c9e13663943bcf5d0ea56a1cb45
Author: Christopher Michael <[email protected]>
Date: Tue Feb 19 10:58:33 2013 +0000
Backport: 39bc25b :: Use ecore_x_randr_crtc_info_free function to free
returned crtc_info. When comparing refresh rates for mode searches, cast to int.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84187
Signed-off-by: Deon Thomas <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index 29ec2aa..32eb9f8 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -217,7 +217,7 @@ e_smart_monitor_crtc_set(Evas_Object *obj,
Ecore_X_Randr_Crtc crtc, Evas_Coord c
sd->crtc.mode = crtc_info->mode;
/* free any memory allocated from ecore_x_randr */
- free(crtc_info);
+ ecore_x_randr_crtc_info_free(crtc_info);
}
#else
/* get current orientation */
@@ -886,7 +886,7 @@ _e_smart_monitor_mode_find(E_Smart_Data *sd, Evas_Coord w,
Evas_Coord h, Eina_Bo
rate = _e_smart_monitor_mode_refresh_rate_get(mode);
/* TODO compare mode rate to "current" rate */
- if ((int)rate == sd->crtc.refresh_rate)
+ if ((int)rate == (int)sd->crtc.refresh_rate)
return mode;
}
else
@@ -965,6 +965,8 @@ _e_smart_monitor_frame_cb_mouse_move(void *data, Evas *evas
EINA_UNUSED, Evas_Ob
Evas_Object *mon;
E_Smart_Data *sd;
+// LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
/* try to get the monitor object */
if (!(mon = data)) return;
@@ -972,8 +974,10 @@ _e_smart_monitor_frame_cb_mouse_move(void *data, Evas
*evas EINA_UNUSED, Evas_Ob
if (!(sd = evas_object_smart_data_get(mon))) return;
/* call appropriate function based on current action */
- if (sd->resizing) _e_smart_monitor_resize_event(sd, mon, event);
- if (sd->rotating) _e_smart_monitor_rotate_event(sd, mon, event);
+ if (sd->resizing)
+ _e_smart_monitor_resize_event(sd, mon, event);
+ else if (sd->rotating)
+ _e_smart_monitor_rotate_event(sd, mon, event);
}
static void
@@ -1213,12 +1217,15 @@ _e_smart_monitor_resize_event(E_Smart_Data *sd,
Evas_Object *mon, void *event)
if (nh > sd->max.mode_height) nh = sd->max.mode_height;
/* update current size values */
- sd->crtc.w = nw;
- sd->crtc.h = nh;
+ sd->crtc.w = (int)nw;
+ sd->crtc.h = (int)nh;
+
+ printf("Find Mode For Size: %d %d\n", (int)nw, (int)nh);
/* try to find a mode that matches this new size */
- if ((mode = _e_smart_monitor_mode_find(sd, nw, nh, EINA_FALSE)))
+ if ((mode = _e_smart_monitor_mode_find(sd, (int)nw, (int)nh, EINA_FALSE)))
{
+ printf("Found Mode\n");
/* update monitor size in the grid */
evas_object_grid_pack(sd->grid.obj, mon, sd->crtc.x, sd->crtc.y,
mode->width, mode->height);
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev