WindowServer+LibGUI: Add "frameless" window flag

This allows you to create windows with no title bar or window frame.
This commit is contained in:
Andreas Kling 2020-05-01 23:26:32 +02:00
commit d847304cb9
Notes: sideshowbarker 2024-07-19 07:07:17 +09:00
6 changed files with 18 additions and 0 deletions

View file

@ -257,6 +257,9 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter)
void WindowFrame::paint(Gfx::Painter& painter)
{
if (m_window.is_frameless())
return;
Gfx::PainterStateSaver saver(painter);
painter.translate(rect().location());
@ -274,6 +277,9 @@ void WindowFrame::paint(Gfx::Painter& painter)
static Gfx::Rect frame_rect_for_window(Window& window, const Gfx::Rect& rect)
{
if (window.is_frameless())
return rect;
auto type = window.type();
switch (type) {