1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

WindowServer: Fix for Changing Screen Resolution Resets.

Fixes #816.
This commit is contained in:
Hüseyin ASLITÜRK 2020-01-31 00:14:31 +03:00 committed by Andreas Kling
parent 2ed660490d
commit c5edc09b78

View file

@ -397,8 +397,7 @@ void WSCompositor::set_resolution(int desired_width, int desired_height)
auto screen_rect = WSScreen::the().rect();
if (screen_rect.width() == desired_width && screen_rect.height() == desired_height)
return;
m_wallpaper_path = {};
m_wallpaper = nullptr;
// Make sure it's impossible to set an invalid resolution
ASSERT(desired_width >= 640 && desired_height >= 480);
WSScreen::the().set_resolution(desired_width, desired_height);