Exemplo n.º 1
0
static void
_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
{
    Ecore_Evas_Engine_Wl_Data *wdata;
    LOGFN(__FILE__, __LINE__, __FUNCTION__);

    if (!ee) return;
    if (w < 1) w = 1;
    if (h < 1) h = 1;

    ee->req.w = w;
    ee->req.h = h;

    wdata = ee->engine.data;
    if (!ee->prop.fullscreen)
    {
        int fw = 0, fh = 0;

        if (ee->prop.min.w > w) w = ee->prop.min.w;
        else if (w > ee->prop.max.w) w = ee->prop.max.w;
        if (ee->prop.min.h > h) h = ee->prop.min.h;
        else if (h > ee->prop.max.h) h = ee->prop.max.h;

        evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
        w += fw;
        h += fh;
    }

    if ((ee->w != w) || (ee->h != h))
    {
        ee->w = w;
        ee->h = h;

        if ((ee->rotation == 90) || (ee->rotation == 270))
        {
            evas_output_size_set(ee->evas, h, w);
            evas_output_viewport_set(ee->evas, 0, 0, h, w);
        }
        else
        {
            evas_output_size_set(ee->evas, w, h);
            evas_output_viewport_set(ee->evas, 0, 0, w, h);
        }

        if (ee->prop.avoid_damage)
        {
            int pdam = 0;

            pdam = ecore_evas_avoid_damage_get(ee);
            ecore_evas_avoid_damage_set(ee, 0);
            ecore_evas_avoid_damage_set(ee, pdam);
        }

        if (wdata->frame)
            evas_object_resize(wdata->frame, w, h);


        if (wdata->win)
        {
            ecore_wl_window_update_size(wdata->win, w, h);
            ecore_wl_window_buffer_attach(wdata->win, NULL, 0, 0);
        }

        if (ee->func.fn_resize) ee->func.fn_resize(ee);
    }
}
Exemplo n.º 2
0
Ecore_Evas_Avoid_Damage_Type EcoreEvasWindow::AvoidDamage() const
{
    return ecore_evas_avoid_damage_get( _ee );
}