mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
WindowServer: Resize maximised/tiled windows after resolution change
Previously windows would either extend past the screen or stay at their previous smaller size in the corner, now they are resized to fit the new resolution.
This commit is contained in:
parent
23b1d97b0d
commit
7967c80222
3 changed files with 46 additions and 20 deletions
|
@ -140,6 +140,12 @@ bool WindowManager::set_resolution(int width, int height)
|
|||
ClientConnection::for_each_client([&](ClientConnection& client) {
|
||||
client.notify_about_new_screen_rect(Screen::the().rect());
|
||||
});
|
||||
if (success) {
|
||||
for_each_window([](Window& window) {
|
||||
window.recalculate_rect();
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
if (m_wm_config) {
|
||||
if (success) {
|
||||
dbg() << "Saving resolution: " << Gfx::Size(width, height) << " to config file at " << m_wm_config->file_name();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue