LibGUI: Implement set_max_size
I already support set_min_size so why not this :)
This commit is contained in:
@@ -178,6 +178,16 @@ namespace LibGUI
|
||||
return on_socket_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
void Window::set_max_size(uint32_t width, uint32_t height)
|
||||
{
|
||||
WindowPacket::WindowSetMaxSize packet;
|
||||
packet.width = width;
|
||||
packet.height = height;
|
||||
|
||||
if (auto ret = packet.send_serialized(m_server_fd); ret.is_error())
|
||||
return on_socket_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
void Window::set_attributes(Attributes attributes)
|
||||
{
|
||||
WindowPacket::WindowSetAttributes packet;
|
||||
|
||||
@@ -165,6 +165,7 @@ namespace LibGUI
|
||||
WindowSetMouseCapture,
|
||||
WindowSetSize,
|
||||
WindowSetMinSize,
|
||||
WindowSetMaxSize,
|
||||
WindowSetFullscreen,
|
||||
WindowSetTitle,
|
||||
|
||||
@@ -234,6 +235,12 @@ namespace LibGUI
|
||||
uint32_t, height
|
||||
);
|
||||
|
||||
DEFINE_PACKET(
|
||||
WindowSetMaxSize,
|
||||
uint32_t, width,
|
||||
uint32_t, height
|
||||
);
|
||||
|
||||
DEFINE_PACKET(
|
||||
WindowSetFullscreen,
|
||||
bool, fullscreen
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace LibGUI
|
||||
void set_attributes(Attributes attributes);
|
||||
|
||||
void set_min_size(uint32_t width, uint32_t height);
|
||||
void set_max_size(uint32_t width, uint32_t height);
|
||||
|
||||
// send resize request to window server
|
||||
// actual resize is only done after resize callback is called
|
||||
|
||||
Reference in New Issue
Block a user