summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-26 11:39:15 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-26 11:39:15 +0200
commitd0799f3648323cf3a6c19c21dda7ab87cb6f3ec0 (patch)
tree633b4b6805c5c59cba61f5b19bb5868a48fe0b05 /Servers
parentdb353a06e56fe992102eccc82721a7ddce4a9455 (diff)
downloadserenity-d0799f3648323cf3a6c19c21dda7ab87cb6f3ec0.zip
WindowServer: Center the mouse cursor on startup
The code was already trying to do this, but it was centering inside the screen rect before we had a screen rect. :^)
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/WSScreen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSScreen.cpp b/Servers/WindowServer/WSScreen.cpp
index d0c0ead15b..7e76e217f0 100644
--- a/Servers/WindowServer/WSScreen.cpp
+++ b/Servers/WindowServer/WSScreen.cpp
@@ -20,7 +20,6 @@ WSScreen::WSScreen(unsigned desired_width, unsigned desired_height)
{
ASSERT(!s_the);
s_the = this;
- m_cursor_location = rect().center();
m_framebuffer_fd = open("/dev/fb0", O_RDWR);
ASSERT(m_framebuffer_fd >= 0);
@@ -29,6 +28,7 @@ WSScreen::WSScreen(unsigned desired_width, unsigned desired_height)
}
set_resolution(desired_width, desired_height);
+ m_cursor_location = rect().center();
}
WSScreen::~WSScreen()