A couple minor changes to make screen updates more efficient.

This commit is contained in:
casey 2016-05-13 23:00:32 -07:00
parent 7016c2aac2
commit 17b56ddbab
3 changed files with 11 additions and 7 deletions

View File

@ -94,20 +94,21 @@ int main(int argc, char* argv[])
{
Colors::Init();
using musik::core::audio::Transport;
Transport tp;
tp.SetVolume(0.01);
using musik::core::LibraryFactory;
LibraryPtr library = LibraryFactory::Libraries().at(0);
//MainLayout mainLayout(tp, library);
LibraryLayout libraryLayout(library);
MainLayout mainLayout(tp, library);
//LibraryLayout libraryLayout(library);
int ch;
timeout(IDLE_TIMEOUT_MS);
bool quit = false;
ILayout* layout = &libraryLayout;
ILayout* layout = &mainLayout;
IWindow* focused = layout->GetFocus();
IInput* input = dynamic_cast<IInput*>(focused);
IScrollable* scrollable = dynamic_cast<IScrollable*>(focused);

View File

@ -137,9 +137,10 @@ void Window::Create() {
wbkgd(this->content, COLOR_PAIR(this->contentColor));
}
wrefresh(this->frame);
touchwin(this->content);
wrefresh(this->content);
wnoutrefresh(this->frame);
wnoutrefresh(this->content);
doupdate();
}
}
@ -168,8 +169,9 @@ void Window::Clear() {
void Window::Repaint() {
if (this->frame && this->content) {
wrefresh(this->frame);
wrefresh(this->content);
wnoutrefresh(this->frame);
wnoutrefresh(this->content);
doupdate();
}
}

View File

@ -6,3 +6,4 @@
#endif
#include <curses.h>
#include <panel.h>