Ticket #2648: xrandr_gui.diff

File xrandr_gui.diff, 3.7 KB (added by anonymous, 19 years ago)
  • mythtv-vid/libs/libmythtv/tv_play.cpp

     
    49404940        mwnd->setGeometry(saved_gui_bounds.left(), saved_gui_bounds.top(),
    49414941                          saved_gui_bounds.width(), saved_gui_bounds.height());
    49424942        mwnd->setFixedSize(saved_gui_bounds.size());
     4943        if (nvp && nvp->getVideoOutput())
     4944            nvp->getVideoOutput()->ResizeForGui();
    49434945    }
    49444946
    49454947    // Collect channel info
     
    50115013        mwnd->setGeometry(player_bounds.left(), player_bounds.top(),
    50125014                          player_bounds.width(), player_bounds.height());
    50135015        mwnd->setFixedSize(player_bounds.size());
     5016        if (nvp && nvp->getVideoOutput())
     5017            nvp->getVideoOutput()->ResizeForVideo();
    50145018    }
    50155019
    50165020    // If user selected a new channel in the EPG, change to that channel
  • mythtv-vid/libs/libmythtv/videoout_xv.h

     
    7676    void VideoAspectRatioChanged(float aspect);
    7777    void EmbedInWidget(WId wid, int x, int y, int w, int h);
    7878    void StopEmbedding(void);
     79    void ResizeForGui(void);
     80    void ResizeForVideo(void);
    7981    void DrawUnusedRects(bool sync = true);
    8082    void UpdatePauseFrame(void);
    8183    int  SetPictureAttribute(int attribute, int newValue);
  • mythtv-vid/libs/libmythtv/videoout_xv.cpp

     
    376376    }
    377377}
    378378
     379/**
     380 * \fn VideoOutputXv::ResizeForVideo(void)
     381 * Public version of ResizeForVideo.
     382 *
     383 * Called by the video player to resize the screen
     384 * e.g. after we have finished displaying the EPG.
     385 *
     386 */
     387void VideoOutputXv::ResizeForVideo(void)
     388{
     389    if (display_res)
     390    {
     391        display_res->SwitchToVideo(video_dim.width(), video_dim.height());
     392    }
     393}
     394
     395/**
     396 * \fn VideoOutputXv::ResizeForGui(void)
     397 * Resizes the screen before displaying any GUI elements (if
     398 * we are using DisplayRes).
     399 *
     400 */
     401void VideoOutputXv::ResizeForGui(void)
     402{
     403    if (display_res)
     404    {
     405        display_res->SwitchToGUI();
     406    }
     407}
     408
    379409/**
    380410 * \fn VideoOutputXv::InitDisplayMeasurements(uint width, uint height)
    381411 * \brief Init display measurements based on database settings and
     
    18851915    XJ_curwin = wid;
    18861916
    18871917    VideoOutput::EmbedInWidget(wid, x, y, w, h);
    1888 
    1889     // Switch to GUI size
    1890     if (display_res)
    1891         display_res->SwitchToGUI();
    18921918}
    18931919
    18941920void VideoOutputXv::StopEmbedding(void)
     
    19001926
    19011927    XJ_curwin = XJ_win;
    19021928    VideoOutput::StopEmbedding();
    1903 
    1904     // Switch back to resolution for full screen video
    1905     if (display_res)
    1906         display_res->SwitchToVideo(video_dim.width(), video_dim.height());
    19071929}
    19081930
    19091931VideoFrame *VideoOutputXv::GetNextFreeFrame(bool /*allow_unsafe*/)
  • mythtv-vid/libs/libmythtv/videooutbase.h

     
    182182
    183183    virtual void EmbedInWidget(WId wid, int x, int y, int w, int h);
    184184    virtual void StopEmbedding(void);
     185    virtual void ResizeForGui(void) { };
     186    virtual void ResizeForVideo(void) { };
    185187
    186188    virtual void MoveResize(void);
    187189    virtual void Zoom(int direction);