Move desktop_fb

  • Hi everybody, viele grussen


    This i the my first post.


    Hi need to move the desktop_fb widget, but i have a problem, i made a panel to do this, with a two slider class to choose H and V offset,




    when i change the slider value often enigma crash 'segmentation fault',


    Anyone could help me?

    2 Mal editiert, zuletzt von gianatehm ()

  • The desktop_fb widget has the size of the whole framebuffer (720x576), so if you move this widget, you have to resize it so that it still fits into the framebuffer. Otherwise the content of the widget may be drawn into memory that doesn't belong to the framebuffer.
    So, if you move the widget 10 pixels to the right, you have to set the width 10 pixels smaller.


    (I haven't tested this, but IMHO it should work this way :winking_face: )


    dbluelle

  • Zitat

    Originally posted by dbluelle
    The desktop_fb widget has the size of the whole framebuffer (720x576), so if you move this widget, you have to resize it so that it still fits into the framebuffer. Otherwise the content of the widget may be drawn into memory that doesn't belong to the framebuffer.
    So, if you move the widget 10 pixels to the right, you have to set the width 10 pixels smaller.


    (I haven't tested this, but IMHO it should work this way :winking_face: )


    dbluelle


    Thank's, now i tried with resize but no way, same problem :frowning_face:


    Code
    void eOsdPosition::verChanged(int i)
    {
    	i = i - 25;
    	lblver->setText(eString().sprintf("%i",i).c_str());
    	int h_offset = sHor->getValue() - 25;
     	eZap::getInstance()->getDesktop(eZap::desktopFB)->resize(eSize(720 - abs(h_offset), 576 - abs(i)));
    	eZap::getInstance()->getDesktop(eZap::desktopFB)->cmove(ePoint(h_offset, i));
    }
  • Well, IMHO you cannot move the widget to coordinates < 0 (that should also lead to writing into memory that doesn't belong to the framebuffer) , so I think your only chance is to move all the child widgets instead of desktop_fb :frowning_face: .


    dbluelle