forked from enlightenment/enlightenment
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 <cp.michael@samsung.com> SVN revision: 84159 Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
This commit is contained in:
parent
310c60449d
commit
3f4c7629d9
|
@ -104,10 +104,9 @@ e_smart_monitor_add(Evas *evas)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
E_Smart_Data *sd;
|
||||||
Ecore_X_Window root = 0;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
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 */
|
/* set the crtc config */
|
||||||
sd->crtc = crtc;
|
sd->crtc = crtc;
|
||||||
|
|
||||||
/* get the root window */
|
/* record the crtc geometry */
|
||||||
root = ecore_x_window_root_first_get();
|
sd->cx = cx;
|
||||||
|
sd->cy = cy;
|
||||||
/* get the geometry of this crtc and record it */
|
sd->cw = cw;
|
||||||
ecore_x_randr_crtc_geometry_get(root, crtc,
|
sd->ch = ch;
|
||||||
&sd->cx, &sd->cy, &sd->cw, &sd->ch);
|
|
||||||
|
|
||||||
/* set monitor position text */
|
/* set monitor position text */
|
||||||
_e_smart_monitor_position_set(sd, sd->cx, sd->cy);
|
_e_smart_monitor_position_set(sd, sd->cx, sd->cy);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# define E_SMART_MONITOR_H
|
# define E_SMART_MONITOR_H
|
||||||
|
|
||||||
Evas_Object *e_smart_monitor_add(Evas *evas);
|
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_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_grid_set(Evas_Object *obj, Evas_Object *grid);
|
||||||
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
|
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
|
||||||
|
|
Loading…
Reference in New Issue