Ticket #2648: xrandr2.diff

File xrandr2.diff, 3.0 KB (added by anonymous, 16 years ago)
  • libs/libmythtv/tv_play.cpp

     
    57885788        return;
    57895789
    57905790    // Resize window to the MythTV GUI size
     5791    if (nvp && nvp->getVideoOutput())
     5792        nvp->getVideoOutput()->ResizeForGui();
    57915793    MythMainWindow *mwnd = gContext->GetMainWindow();
    57925794    bool using_gui_size_for_tv = gContext->GetNumSetting("GuiSizeForTV", 0);
    57935795    if (!using_gui_size_for_tv)
     
    58745876                          player_bounds.width(), player_bounds.height());
    58755877        mwnd->setFixedSize(player_bounds.size());
    58765878    }
     5879    if (nvp && nvp->getVideoOutput())
     5880        nvp->getVideoOutput()->ResizeForVideo();
    58775881
    58785882    // If user selected a new channel in the EPG, change to that channel
    58795883    if (changeChannel.size())
  • libs/libmythtv/videoout_xv.h

     
    8484    void VideoAspectRatioChanged(float aspect);
    8585    void EmbedInWidget(WId wid, int x, int y, int w, int h);
    8686    void StopEmbedding(void);
     87    void ResizeForGui(void);
     88    void ResizeForVideo(void);
    8789    void DrawUnusedRects(bool sync = true);
    8890    void UpdatePauseFrame(void);
    8991    int  SetPictureAttribute(PictureAttribute attribute, int newValue);
  • libs/libmythtv/videoout_xv.cpp

     
    377377    return (int)rate;
    378378}
    379379
     380void VideoOutputXv::ResizeForVideo(void)
     381{
     382    ResizeForVideo(video_dim.width(), video_dim.height());
     383}
     384
     385void VideoOutputXv::ResizeForGui(void)
     386{
     387    if (display_res)
     388        display_res->SwitchToGUI();
     389}
     390
    380391/**
    381392 * \fn VideoOutputXv::ResizeForVideo(uint width, uint height)
    382393 * Sets display parameters based on video resolution.
     
    23762387    XJ_curwin = wid;
    23772388
    23782389    VideoOutput::EmbedInWidget(wid, x, y, w, h);
    2379 
    2380     // Switch to GUI size
    2381     if (display_res)
    2382         display_res->SwitchToGUI();
    23832390}
    23842391
    23852392void VideoOutputXv::StopEmbedding(void)
     
    23912398
    23922399    XJ_curwin = XJ_win;
    23932400    VideoOutput::StopEmbedding();
    2394 
    2395     // Switch back to resolution for full screen video
    2396     if (display_res)
    2397         display_res->SwitchToVideo(video_dim.width(), video_dim.height());
    23982401}
    23992402
    24002403VideoFrame *VideoOutputXv::GetNextFreeFrame(bool /*allow_unsafe*/)
  • libs/libmythtv/videooutbase.h

     
    6666
    6767    virtual void EmbedInWidget(WId wid, int x, int y, int w, int h);
    6868    virtual void StopEmbedding(void);
     69    virtual void ResizeForGui(void) { };
     70    virtual void ResizeForVideo(void) { };
    6971
    7072    virtual void MoveResize(void);
    7173    virtual void Zoom(ZoomDirection direction);