WindowServer: Implement fullscreen windows
If window size does not match framebuffer size, window data will be scaled to framebuffer using nearest sampling for best performance.
This commit is contained in:
@@ -256,6 +256,15 @@ namespace LibGUI
|
||||
return on_socket_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
void Window::set_fullscreen(bool fullscreen)
|
||||
{
|
||||
WindowPacket::WindowSetFullscreen packet;
|
||||
packet.fullscreen = fullscreen;
|
||||
|
||||
if (auto ret = packet.send_serialized(m_server_fd); ret.is_error())
|
||||
return on_socket_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
void Window::set_position(int32_t x, int32_t y)
|
||||
{
|
||||
WindowPacket::WindowSetPosition packet;
|
||||
|
||||
@@ -164,6 +164,7 @@ namespace LibGUI
|
||||
WindowSetAttributes,
|
||||
WindowSetMouseCapture,
|
||||
WindowSetSize,
|
||||
WindowSetFullscreen,
|
||||
|
||||
DestroyWindowEvent,
|
||||
CloseWindowEvent,
|
||||
@@ -221,6 +222,11 @@ namespace LibGUI
|
||||
uint32_t, height
|
||||
);
|
||||
|
||||
DEFINE_PACKET(
|
||||
WindowSetFullscreen,
|
||||
bool, fullscreen
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
namespace EventPacket
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace LibGUI
|
||||
void invalidate() { return invalidate(0, 0, width(), height()); }
|
||||
|
||||
void set_mouse_capture(bool captured);
|
||||
void set_fullscreen(bool fullscreen);
|
||||
|
||||
void set_position(int32_t x, int32_t y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user