Ticket #2448: epgresize.patch

File epgresize.patch, 3.1 KB (added by paulx@…, 14 years ago)

NOT A FIX. Problem appears to be due to the resizing the mainwindow while another thread is using it as a display surface. The embededing of the display surface would allow the resize but it is after a delay.

  • libs/libmythtv/tv_play.cpp

    old new void TV::doEditSchedule(int editType) 
    46904690        return;
    46914691    }
    46924692
    4693     // Resize window to the MythTV GUI size
    4694     MythMainWindow *mwnd = gContext->GetMainWindow();
    4695     bool using_gui_size_for_tv = gContext->GetNumSetting("GuiSizeForTV", 0);
    4696     if (!using_gui_size_for_tv)
    4697     {
    4698         mwnd->setGeometry(saved_gui_bounds.left(), saved_gui_bounds.top(),
    4699                           saved_gui_bounds.width(), saved_gui_bounds.height());
    4700         mwnd->setFixedSize(saved_gui_bounds.size());
    4701     }
    4702 
    47034693    // Collect channel info
    47044694    pbinfoLock.lock();
    47054695    uint    chanid  = playbackinfo->chanid.toUInt();
    void TV::doEditSchedule(int editType) 
    47484738            DoPause();
    47494739    }
    47504740
    4751     // Resize the window back to the MythTV Player size
    4752     if (!using_gui_size_for_tv)
    4753     {
    4754         mwnd->setGeometry(player_bounds.left(), player_bounds.top(),
    4755                           player_bounds.width(), player_bounds.height());
    4756         mwnd->setFixedSize(player_bounds.size());
    4757     }
    4758 
    47594741    // If user selected a new channel in the EPG, change to that channel
    47604742    if (changeChannel)
    47614743        EPGChannelUpdate(chanid, channum);
  • libs/libmythtv/guidegrid.cpp

    old new bool RunProgramGuide(uint &chanid, QStri 
    4848                                  chanid, channum,
    4949                                  player, allowsecondaryepg, "guidegrid");
    5050
     51    if (!gContext->GetNumSetting("GuiSizeForTV", 0)) {
     52        MythMainWindow *mainWindow = gContext->GetMainWindow();
     53        QRect mwRect = mainWindow->geometry();
     54        int x = gContext->GetNumSetting("GuiOffsetX");
     55        int y = gContext->GetNumSetting("GuiOffsetY");
     56        if (mwRect.x() != x || mwRect.y() != y)
     57            gg->move(x,y);
     58    }
     59
    5160    gg->Show();
    5261
    5362    if (thread)
  • libs/libmythtv/progfind.cpp

    old new void RunProgramFind(bool thread, bool gg 
    5252                                     "program finder", ggActive);
    5353
    5454    programFind->Initialize();
     55
     56    if (!gContext->GetNumSetting("GuiSizeForTV", 0)) {
     57        MythMainWindow *mainWindow = gContext->GetMainWindow();
     58        QRect mwRect = mainWindow->geometry();
     59        int x = gContext->GetNumSetting("GuiOffsetX");
     60        int y = gContext->GetNumSetting("GuiOffsetY");
     61        if (mwRect.x() != x || mwRect.y() != y)
     62            programFind->move(x,y);
     63    }
     64
    5565    programFind->Show();
    5666
    5767    if (thread)