1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00

Add WindowActivated and WindowDeactivated events.

Use this to implement different looking Terminal cursors depending on
the window active state.
This commit is contained in:
Andreas Kling 2019-01-17 17:38:04 +01:00
parent 135ff48bb9
commit dad58db757
9 changed files with 66 additions and 42 deletions

View file

@ -77,6 +77,12 @@ void WSWindow::event(WSEvent& event)
case WSEvent::WM_Invalidate:
WSWindowManager::the().invalidate(*this);
return;
case WSEvent::WindowActivated:
gui_event.type = GUI_Event::Type::WindowActivated;
break;
case WSEvent::WindowDeactivated:
gui_event.type = GUI_Event::Type::WindowDeactivated;
break;
}
if (gui_event.type == GUI_Event::Type::Invalid)