forked from enlightenment/enlightenment
Add some printfs (commented out).
When we unclone a monitor (on initial startup), if it has not been manually placed yet, use the crtc geometry for position & size. Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 81110
This commit is contained in:
parent
7d6a9cd155
commit
fb6c724151
|
@ -454,6 +454,8 @@ e_smart_monitor_clone_add(Evas_Object *obj, Evas_Object *mon)
|
||||||
/* try to get the objects smart data */
|
/* try to get the objects smart data */
|
||||||
if (!(msd = evas_object_smart_data_get(mon))) return;
|
if (!(msd = evas_object_smart_data_get(mon))) return;
|
||||||
|
|
||||||
|
/* printf("Clone Add\n"); */
|
||||||
|
|
||||||
/* set cloned flag */
|
/* set cloned flag */
|
||||||
msd->cloned = EINA_TRUE;
|
msd->cloned = EINA_TRUE;
|
||||||
|
|
||||||
|
@ -462,6 +464,7 @@ e_smart_monitor_clone_add(Evas_Object *obj, Evas_Object *mon)
|
||||||
|
|
||||||
/* grab size of monitor's frame */
|
/* grab size of monitor's frame */
|
||||||
evas_object_geometry_get(msd->o_frame, NULL, NULL, &mw, &mh);
|
evas_object_geometry_get(msd->o_frame, NULL, NULL, &mw, &mh);
|
||||||
|
/* printf("\tFrame Size: %d %d\n", mw, mh); */
|
||||||
|
|
||||||
/* hide this monitor */
|
/* hide this monitor */
|
||||||
evas_object_hide(mon);
|
evas_object_hide(mon);
|
||||||
|
@ -528,6 +531,7 @@ e_smart_monitor_clone_del(Evas_Object *obj, Evas_Object *mon)
|
||||||
{
|
{
|
||||||
E_Smart_Data *osd, *msd;
|
E_Smart_Data *osd, *msd;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
Evas_Coord x = 0, y = 0, w = 0, h = 0;
|
||||||
|
|
||||||
/* try to get the objects smart data */
|
/* try to get the objects smart data */
|
||||||
if (!(osd = evas_object_smart_data_get(obj))) return;
|
if (!(osd = evas_object_smart_data_get(obj))) return;
|
||||||
|
@ -560,6 +564,7 @@ e_smart_monitor_clone_del(Evas_Object *obj, Evas_Object *mon)
|
||||||
evas_object_resize(o, mw, mh);
|
evas_object_resize(o, mw, mh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* show the monitor */
|
||||||
evas_object_show(mon);
|
evas_object_show(mon);
|
||||||
|
|
||||||
/* set cloned flag */
|
/* set cloned flag */
|
||||||
|
@ -568,11 +573,33 @@ e_smart_monitor_clone_del(Evas_Object *obj, Evas_Object *mon)
|
||||||
/* set parent object */
|
/* set parent object */
|
||||||
msd->parent = NULL;
|
msd->parent = NULL;
|
||||||
|
|
||||||
|
x = msd->cx;
|
||||||
|
y = msd->cy;
|
||||||
|
w = msd->cw;
|
||||||
|
h = msd->ch;
|
||||||
|
|
||||||
|
/* safety check for valid values.
|
||||||
|
*
|
||||||
|
* NB: Needed in the case that we have no previous setup, we are in a clone
|
||||||
|
* situation (from X), and we were not manually moved */
|
||||||
|
if ((msd->cw == 0) || (msd->ch == 0))
|
||||||
|
{
|
||||||
|
if ((msd->output->crtc))
|
||||||
|
{
|
||||||
|
x = msd->output->crtc->geometry.x + msd->layout.x;
|
||||||
|
y = msd->output->crtc->geometry.y + msd->layout.y;
|
||||||
|
w = msd->output->crtc->geometry.w;
|
||||||
|
h = msd->output->crtc->geometry.h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* printf("Unclone To: %d %d %d %d\n", x, y, w, h); */
|
||||||
|
|
||||||
/* restore to starting size */
|
/* restore to starting size */
|
||||||
e_layout_child_resize(mon, msd->cw, msd->ch);
|
e_layout_child_resize(mon, w, h);
|
||||||
|
|
||||||
/* restore to starting position */
|
/* restore to starting position */
|
||||||
e_layout_child_move(mon, msd->cx, msd->cy);
|
e_layout_child_move(mon, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -767,12 +794,16 @@ _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
|
||||||
if ((sd->x == x) && (sd->y == y)) return;
|
if ((sd->x == x) && (sd->y == y)) return;
|
||||||
|
|
||||||
|
/* if ((sd->output) && (sd->output->crtc)) */
|
||||||
|
/* printf("Smart Mon Move: %d\n", sd->output->crtc->xid); */
|
||||||
|
|
||||||
sd->x = x;
|
sd->x = x;
|
||||||
sd->y = y;
|
sd->y = y;
|
||||||
|
|
||||||
/* move the base object */
|
/* move the base object */
|
||||||
if (sd->o_base) evas_object_move(sd->o_base, x, y);
|
if (sd->o_base) evas_object_move(sd->o_base, x, y);
|
||||||
|
|
||||||
|
/* if we are not visible, no need to update map */
|
||||||
if (!sd->visible) return;
|
if (!sd->visible) return;
|
||||||
|
|
||||||
/* apply any existing rotation */
|
/* apply any existing rotation */
|
||||||
|
@ -789,12 +820,16 @@ _e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
|
|
||||||
if ((sd->w == h) && (sd->w == h)) return;
|
if ((sd->w == h) && (sd->w == h)) return;
|
||||||
|
|
||||||
|
/* if ((sd->output) && (sd->output->crtc)) */
|
||||||
|
/* printf("Smart Mon Resize: %d\n", sd->output->crtc->xid); */
|
||||||
|
|
||||||
sd->w = w;
|
sd->w = w;
|
||||||
sd->h = h;
|
sd->h = h;
|
||||||
|
|
||||||
/* resize the base object */
|
/* resize the base object */
|
||||||
if (sd->o_base) evas_object_resize(sd->o_base, w, h);
|
if (sd->o_base) evas_object_resize(sd->o_base, w, h);
|
||||||
|
|
||||||
|
/* if we are not visible, no need to update map */
|
||||||
if (!sd->visible) return;
|
if (!sd->visible) return;
|
||||||
|
|
||||||
/* apply any existing rotation */
|
/* apply any existing rotation */
|
||||||
|
@ -810,7 +845,10 @@ _e_smart_show(Evas_Object *obj)
|
||||||
if (!(sd = evas_object_smart_data_get(obj))) return;
|
if (!(sd = evas_object_smart_data_get(obj))) return;
|
||||||
|
|
||||||
/* if it is already visible, get out */
|
/* if it is already visible, get out */
|
||||||
if (sd->visible) return;
|
// if (sd->visible) return;
|
||||||
|
|
||||||
|
/* if ((sd->output) && (sd->output->crtc)) */
|
||||||
|
/* printf("Smart Mon Show: %d\n", sd->output->crtc->xid); */
|
||||||
|
|
||||||
/* show the stand */
|
/* show the stand */
|
||||||
if (sd->o_stand) evas_object_show(sd->o_stand);
|
if (sd->o_stand) evas_object_show(sd->o_stand);
|
||||||
|
@ -834,7 +872,10 @@ _e_smart_hide(Evas_Object *obj)
|
||||||
if (!(sd = evas_object_smart_data_get(obj))) return;
|
if (!(sd = evas_object_smart_data_get(obj))) return;
|
||||||
|
|
||||||
/* if it is not visible, we have nothing to do */
|
/* if it is not visible, we have nothing to do */
|
||||||
if (!sd->visible) return;
|
// if (!sd->visible) return;
|
||||||
|
|
||||||
|
/* if ((sd->output) && (sd->output->crtc)) */
|
||||||
|
/* printf("Smart Mon Hide: %d\n", sd->output->crtc->xid); */
|
||||||
|
|
||||||
/* hide the stand */
|
/* hide the stand */
|
||||||
if (sd->o_stand) evas_object_hide(sd->o_stand);
|
if (sd->o_stand) evas_object_hide(sd->o_stand);
|
||||||
|
|
Loading…
Reference in New Issue