|
@@ -66,12 +66,13 @@ void TaskbarWindow::wm_event(GWMEvent& event)
|
|
|
}
|
|
|
case GEvent::WM_WindowStateChanged: {
|
|
|
auto& changed_event = static_cast<GWMWindowStateChangedEvent&>(event);
|
|
|
- printf("WM_WindowStateChanged: client_id=%d, window_id=%d, title=%s, rect=%s, is_active=%u\n",
|
|
|
+ printf("WM_WindowStateChanged: client_id=%d, window_id=%d, title=%s, rect=%s, is_active=%u, is_minimized=%u\n",
|
|
|
changed_event.client_id(),
|
|
|
changed_event.window_id(),
|
|
|
changed_event.title().characters(),
|
|
|
changed_event.rect().to_string().characters(),
|
|
|
- changed_event.is_active()
|
|
|
+ changed_event.is_active(),
|
|
|
+ changed_event.is_minimized()
|
|
|
);
|
|
|
if (!should_include_window(changed_event.window_type()))
|
|
|
break;
|
|
@@ -79,8 +80,16 @@ void TaskbarWindow::wm_event(GWMEvent& event)
|
|
|
window.set_title(changed_event.title());
|
|
|
window.set_rect(changed_event.rect());
|
|
|
window.set_active(changed_event.is_active());
|
|
|
- window.button()->set_caption(changed_event.title());
|
|
|
+ window.set_minimized(changed_event.is_minimized());
|
|
|
+ if (window.is_minimized()) {
|
|
|
+ window.button()->set_foreground_color(Color::DarkGray);
|
|
|
+ window.button()->set_caption(String::format("[%s]", changed_event.title().characters()));
|
|
|
+ } else {
|
|
|
+ window.button()->set_foreground_color(Color::Black);
|
|
|
+ window.button()->set_caption(changed_event.title());
|
|
|
+ }
|
|
|
window.button()->set_checked(changed_event.is_active());
|
|
|
+ window.button()->update();
|
|
|
break;
|
|
|
}
|
|
|
default:
|