princeamd pushed a commit to branch enlightenment-0.17.
commit 3f4c7629d9e5c04331afd62ebd23fef4a46c2174
Author: Christopher Michael <[email protected]>
Date: Tue Feb 19 10:57:12 2013 +0000
Backport: 457c302 :: Modifiy crtc_set function to also take the current
crtc coordinates (this saves us a round-trip function call to ecore_x_randr as
we already have the coordinates from the randr widget).
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84159
Signed-off-by: Deon Thomas <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 14 ++++++--------
src/modules/conf_randr/e_smart_monitor.h | 2 +-
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index d54b0c4..3e932a2 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -104,10 +104,9 @@ e_smart_monitor_add(Evas *evas)
}
void
-e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc)
+e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord
cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch)
{
E_Smart_Data *sd;
- Ecore_X_Window root = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -117,12 +116,11 @@ e_smart_monitor_crtc_set(Evas_Object *obj,
Ecore_X_Randr_Crtc crtc)
/* set the crtc config */
sd->crtc = crtc;
- /* get the root window */
- root = ecore_x_window_root_first_get();
-
- /* get the geometry of this crtc and record it */
- ecore_x_randr_crtc_geometry_get(root, crtc,
- &sd->cx, &sd->cy, &sd->cw, &sd->ch);
+ /* record the crtc geometry */
+ sd->cx = cx;
+ sd->cy = cy;
+ sd->cw = cw;
+ sd->ch = ch;
/* set monitor position text */
_e_smart_monitor_position_set(sd, sd->cx, sd->cy);
diff --git a/src/modules/conf_randr/e_smart_monitor.h
b/src/modules/conf_randr/e_smart_monitor.h
index 600673a..be8b978 100644
--- a/src/modules/conf_randr/e_smart_monitor.h
+++ b/src/modules/conf_randr/e_smart_monitor.h
@@ -4,7 +4,7 @@
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
-void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc);
+void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc,
Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch);
void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output);
void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid);
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx,
Evas_Coord dy);
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev