mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 00:57:44 +00:00
WindowServer: Normalize preferred rect before applying
Previously, SetWindowRect and SetWindowRect could supply basically arbitrary x and y coordinates. This could happen either due to a malicious or malfunctioning program, or even due to the auto-centering feature. This patch also moves the 'normalization' code out of ClientConnection to Window, where it belongs better. Fixes #4135. Fixes #5052.
This commit is contained in:
parent
345909c009
commit
399908e53c
3 changed files with 33 additions and 15 deletions
|
@ -158,6 +158,7 @@ public:
|
|||
void set_rect(const Gfx::IntRect&);
|
||||
void set_rect(int x, int y, int width, int height) { set_rect({ x, y, width, height }); }
|
||||
void set_rect_without_repaint(const Gfx::IntRect&);
|
||||
void normalize_rect();
|
||||
|
||||
void set_taskbar_rect(const Gfx::IntRect&);
|
||||
const Gfx::IntRect& taskbar_rect() const { return m_taskbar_rect; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue