LibGUI: Add support for focusable windows and mouse capturing

These are essential parts of a window server! This allows making TaskBar
non-focusable.
This commit is contained in:
2024-11-08 02:54:27 +02:00
parent 12bc7480e0
commit da8170c5b6
9 changed files with 164 additions and 46 deletions

View File

@@ -350,6 +350,10 @@ int main()
if (auto ret = LibGUI::WindowPacket::WindowSetAttributes::deserialize(client_data.packet_buffer.span()); !ret.is_error())
window_server.on_window_set_attributes(fd, ret.release_value());
break;
case LibGUI::PacketType::WindowSetMouseCapture:
if (auto ret = LibGUI::WindowPacket::WindowSetMouseCapture::deserialize(client_data.packet_buffer.span()); !ret.is_error())
window_server.on_window_set_mouse_capture(fd, ret.release_value());
break;
default:
dprintln("unhandled packet type: {}", *reinterpret_cast<uint32_t*>(client_data.packet_buffer.data()));
}