X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fwindow.cc;h=59302d4ec309f9e683413a7e5fc62f57092a7b4c;hb=287b4d5d1b7eadfe9d5d0aa3b33700f3e1bed55e;hp=a0388fe28bae10b9374dc07e2fb3fea54deed654;hpb=026158b5ee6ffac95c3efc6eee4c155497cd8594;p=winnie diff --git a/src/window.cc b/src/window.cc index a0388fe..59302d4 100644 --- a/src/window.cc +++ b/src/window.cc @@ -92,14 +92,15 @@ void Window::invalidate() void Window::draw(const Rect &dirty_region) { - Rect intersect = rect_intersection(rect, dirty_region); + Rect abs_rect = get_absolute_rect(); + Rect intersect = rect_intersection(abs_rect, dirty_region); if(intersect.width && intersect.height) { if(callbacks.display) { callbacks.display(this); } dirty = false; - draw_children(rect); + draw_children(abs_rect); } } @@ -142,6 +143,11 @@ bool Window::get_focusable() const return focusable; } +bool Window::get_dirty() const +{ + return dirty; +} + void Window::set_display_callback(DisplayFuncType func) { callbacks.display = func;