mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:47:34 +00:00
WindowServer: Change window geometry label to use the Overlay class
This enables flicker-free rendering.
This commit is contained in:
parent
8b26debda1
commit
84cab29c59
7 changed files with 93 additions and 50 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <WindowServer/MultiScaleBitmaps.h>
|
||||
#include <WindowServer/Screen.h>
|
||||
|
@ -15,6 +16,7 @@
|
|||
namespace WindowServer {
|
||||
|
||||
class Screen;
|
||||
class Window;
|
||||
|
||||
class Overlay {
|
||||
friend class Compositor;
|
||||
|
@ -124,4 +126,21 @@ private:
|
|||
static Gfx::Font const* s_font;
|
||||
};
|
||||
|
||||
class WindowGeometryOverlay : public RectangularOverlay {
|
||||
public:
|
||||
WindowGeometryOverlay(Window&);
|
||||
|
||||
void window_rect_changed();
|
||||
|
||||
virtual ZOrder zorder() const override { return ZOrder::WindowGeometry; }
|
||||
virtual void render_overlay_bitmap(Gfx::Painter&) override;
|
||||
|
||||
private:
|
||||
void update_rect();
|
||||
|
||||
WeakPtr<Window> m_window;
|
||||
String m_label;
|
||||
Gfx::IntRect m_label_rect;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue