mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00

IPC::ClientConnection now tracks the time since the last time we got a message from the client and calls a virtual function on itself after 3 seconds: may_have_become_unresponsive(). Subclasses of ClientConnection can then react to this if they like. We use this mechanism in WindowServer to send out a friendly Ping message to the client. If he doesn't Pong within 1 second, we mark the client as "unresponsive" and recompose all of his windows with a darkened appearance and amended title until he Pongs us. This is a little on the aggressive side and we should figure out a way to wake up less often. Perhaps this could only be done to windows the user is currently interacting with, for example. Anyways, this is pretty cool! :^)
40 lines
2.1 KiB
Text
40 lines
2.1 KiB
Text
endpoint WindowClient = 4
|
|
{
|
|
Paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> rects) =|
|
|
MouseMove(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta, bool is_drag, String drag_data_type) =|
|
|
MouseDown(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
|
MouseDoubleClick(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
|
MouseUp(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
|
MouseWheel(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
|
WindowEntered(i32 window_id) =|
|
|
WindowLeft(i32 window_id) =|
|
|
KeyDown(i32 window_id, u8 character, u32 key, u32 modifiers, u32 scancode) =|
|
|
KeyUp(i32 window_id, u8 character, u32 key, u32 modifiers, u32 scancode) =|
|
|
WindowActivated(i32 window_id) =|
|
|
WindowDeactivated(i32 window_id) =|
|
|
WindowStateChanged(i32 window_id, bool minimized, bool occluded) =|
|
|
WindowCloseRequest(i32 window_id) =|
|
|
WindowResized(i32 window_id, Gfx::IntRect old_rect, Gfx::IntRect new_rect) =|
|
|
|
|
MenuItemActivated(i32 menu_id, i32 identifier) =|
|
|
|
|
ScreenRectChanged(Gfx::IntRect rect) =|
|
|
|
|
WM_WindowRemoved(i32 wm_id, i32 client_id, i32 window_id) =|
|
|
WM_WindowStateChanged(i32 wm_id, i32 client_id, i32 window_id, bool is_active, bool is_minimized, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, i32 progress) =|
|
|
WM_WindowIconBitmapChanged(i32 wm_id, i32 client_id, i32 window_id, i32 icon_buffer_id, Gfx::IntSize icon_size) =|
|
|
WM_WindowRectChanged(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
|
|
|
AsyncSetWallpaperFinished(bool success) =|
|
|
|
|
DragAccepted() =|
|
|
DragCancelled() =|
|
|
|
|
DragDropped(i32 window_id, Gfx::IntPoint mouse_position, [UTF8] String text, String data_type, String data) =|
|
|
|
|
UpdateSystemTheme(i32 system_theme_buffer_id) =|
|
|
|
|
DisplayLinkNotification() =|
|
|
|
|
Ping() =|
|
|
}
|