Przeglądaj źródła

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. :^)
Andreas Kling 5 lat temu
rodzic
commit
d0799f3648
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Servers/WindowServer/WSScreen.cpp

+ 1 - 1
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()