summaryrefslogtreecommitdiff
path: root/WindowServer/WSWindowManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-16 10:24:55 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-16 10:26:01 +0100
commit468113422f2b5fd8702f0e3b3c8588e3955cfa4a (patch)
tree536955e1c0b39102297c5006db96a6ba1e5194ea /WindowServer/WSWindowManager.cpp
parent799177fedaee30b3e5ac655571633e9ea24964a5 (diff)
downloadserenity-468113422f2b5fd8702f0e3b3c8588e3955cfa4a.zip
Kernel: Add ioctls to BochsVGADevice for mode setting and page flipping.
Use these in WindowServer instead of poking at the BochsVGADevice directly.
Diffstat (limited to 'WindowServer/WSWindowManager.cpp')
-rw-r--r--WindowServer/WSWindowManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp
index 4fc2f55f50..6d5b19bbed 100644
--- a/WindowServer/WSWindowManager.cpp
+++ b/WindowServer/WSWindowManager.cpp
@@ -9,7 +9,6 @@
#include <SharedGraphics/Painter.h>
#include <SharedGraphics/CharacterBitmap.h>
#include <AK/StdLibExtras.h>
-#include <Kernel/BochsVGADevice.h>
#include <LibC/errno_numbers.h>
#include "WSMenu.h"
#include "WSMenuBar.h"
@@ -126,10 +125,11 @@ void WSWindowManager::flip_buffers()
{
swap(m_front_bitmap, m_back_bitmap);
swap(m_front_painter, m_back_painter);
- if (m_buffers_are_flipped)
- BochsVGADevice::the().set_y_offset(0);
- else
- BochsVGADevice::the().set_y_offset(m_screen_rect.height());
+ if (m_framebuffer_fd != -1) {
+ int new_y_offset = m_buffers_are_flipped ? 0 : m_screen_rect.height();
+ int rc = current->sys$ioctl(m_framebuffer_fd, 1982, new_y_offset);
+ ASSERT(rc == 0);
+ }
m_buffers_are_flipped = !m_buffers_are_flipped;
}