summaryrefslogtreecommitdiff
path: root/applications/goldman/source/renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'applications/goldman/source/renderer.cpp')
-rw-r--r--applications/goldman/source/renderer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/applications/goldman/source/renderer.cpp b/applications/goldman/source/renderer.cpp
index 629c375..7a5e6b5 100644
--- a/applications/goldman/source/renderer.cpp
+++ b/applications/goldman/source/renderer.cpp
@@ -52,9 +52,11 @@ void renderer::do_render() {
for (auto it = windows.begin(); it != windows.end(); ++it)
double_buffer.copy_from(
- (*it)->contents, (*it)->x, (*it)->y, 0, 0,
- std::min((*it)->contents.width, double_buffer.width - (*it)->x),
- std::min((*it)->contents.height, double_buffer.height - (*it)->y));
+ (*it)->contents_with_decorations, (*it)->x, (*it)->y, 0, 0,
+ std::min((*it)->contents_with_decorations.width,
+ double_buffer.width - (*it)->x),
+ std::min((*it)->contents_with_decorations.height,
+ double_buffer.height - (*it)->y));
double_buffer.convert_from(
cursor_background, cursor, cursor_x, cursor_y, 0, 0,
@@ -93,10 +95,15 @@ void renderer::bump_cursor(int x_offset, int y_offset) {
}
-void renderer::add_window(const window *w) {
+void renderer::add_window(window *w) {
+ if (windows.size() != 0)
+ windows.back()->draw_decorations(false);
+ w->draw_decorations(true);
windows.push_back(w);
}
-void renderer::remove_window(const window *w) {
+void renderer::remove_window(window *w) {
windows.remove(w);
+ if (windows.size() != 0)
+ windows.back()->draw_decorations(true);
}