- Window **children = win->get_children();
- for(int i=0; i<win->get_children_count(); i++) {
- if(children[0] == wm->get_focused_window()) {
- int r, g, b;
- wm->get_focused_frame_color(&r, &g, &b);
- fill_rect(win->get_absolute_rect(), r, g, b);
- return;
- }
+ Window *child = win->get_children()[0];
+ int r, g, b;
+ Rect abs_rect = win->get_absolute_rect();
+
+ //TODO 5 not hardcoded
+ set_text_position(abs_rect.x + 5, abs_rect.y + 15);
+ set_text_color(255, 255, 255);
+
+ if(child == wm->get_focused_window()) {
+ wm->get_focused_frame_color(&r, &g, &b);
+ fill_rect(abs_rect, r, g, b);
+ }
+ else {
+ wm->get_unfocused_frame_color(&r, &g, &b);
+ fill_rect(win->get_absolute_rect(), r, g, b);