diff options
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/GUIEventDevice.cpp | 39 | ||||
-rw-r--r-- | Kernel/GUIEventDevice.h | 18 | ||||
-rw-r--r-- | Kernel/Makefile | 1 | ||||
-rw-r--r-- | Kernel/Process.h | 7 | ||||
-rw-r--r-- | Kernel/init.cpp | 4 | ||||
-rwxr-xr-x | Kernel/sync.sh | 1 |
6 files changed, 0 insertions, 70 deletions
diff --git a/Kernel/GUIEventDevice.cpp b/Kernel/GUIEventDevice.cpp deleted file mode 100644 index 36c91e3716..0000000000 --- a/Kernel/GUIEventDevice.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "GUIEventDevice.h" -#include <Kernel/Process.h> -#include <AK/Lock.h> -#include <LibC/errno_numbers.h> -#include <WindowServer/WSMessageLoop.h> - -//#define GUIEVENTDEVICE_DEBUG - -GUIEventDevice::GUIEventDevice() - : CharacterDevice(66, 1) -{ -} - -GUIEventDevice::~GUIEventDevice() -{ -} - -bool GUIEventDevice::can_read(Process& process) const -{ - return !process.gui_events().is_empty(); -} - -ssize_t GUIEventDevice::read(Process& process, byte* buffer, size_t size) -{ -#ifdef GUIEVENTDEVICE_DEBUG - dbgprintf("GUIEventDevice::read(): %s<%u>, size=%u, sizeof(GUI_ServerMessage)=%u\n", process.name().characters(), process.pid(), size, sizeof(GUI_ServerMessage)); -#endif - if (process.gui_events().is_empty()) - return 0; - LOCKER(process.gui_events_lock()); - ASSERT(size == sizeof(GUI_ServerMessage)); - *reinterpret_cast<GUI_ServerMessage*>(buffer) = process.gui_events().take_first(); - return size; -} - -ssize_t GUIEventDevice::write(Process& process, const byte* data, size_t size) -{ - return WSMessageLoop::the().on_receive_from_client(process.gui_client_id(), data, size); -} diff --git a/Kernel/GUIEventDevice.h b/Kernel/GUIEventDevice.h deleted file mode 100644 index f9ce778494..0000000000 --- a/Kernel/GUIEventDevice.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include <Kernel/CharacterDevice.h> -#include <Kernel/DoubleBuffer.h> - -class GUIEventDevice final : public CharacterDevice { -public: - GUIEventDevice(); - virtual ~GUIEventDevice() override; - -private: - // ^CharacterDevice - virtual ssize_t read(Process&, byte* buffer, size_t bufferSize) override; - virtual ssize_t write(Process&, const byte* buffer, size_t bufferSize) override; - virtual bool can_read(Process&) const override; - virtual bool can_write(Process&) const override { return true; } - virtual const char* class_name() const override { return "GUIEventDevice"; } -}; diff --git a/Kernel/Makefile b/Kernel/Makefile index 10e8458184..fa2d01cfe1 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -32,7 +32,6 @@ KERNEL_OBJS = \ BochsVGADevice.o \ PCI.o \ PS2MouseDevice.o \ - GUIEventDevice.o \ Socket.o \ LocalSocket.o diff --git a/Kernel/Process.h b/Kernel/Process.h index 3894c78869..f030acdf24 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -5,7 +5,6 @@ #include "i386.h" #include "TTY.h" #include "Syscall.h" -#include "GUITypes.h" #include <Kernel/VirtualFileSystem.h> #include <Kernel/UnixTypes.h> #include <AK/InlineLinkedList.h> @@ -287,9 +286,6 @@ public: bool is_root() const { return m_euid == 0; } - Vector<GUI_ServerMessage>& gui_events() { return m_gui_events; } - Lock& gui_events_lock() { return m_gui_events_lock; } - bool wakeup_requested() { return m_wakeup_requested; } void request_wakeup() { m_wakeup_requested = true; } @@ -401,9 +397,6 @@ private: RetainPtr<Region> m_display_framebuffer_region; - Vector<GUI_ServerMessage> m_gui_events; - Lock m_gui_events_lock; - dword m_wakeup_requested { false }; bool m_has_used_fpu { false }; }; diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 9fc605a2c0..632c00b2f4 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -14,7 +14,6 @@ #include <Kernel/RandomDevice.h> #include <Kernel/Ext2FileSystem.h> #include <Kernel/VirtualFileSystem.h> -#include "GUIEventDevice.h" #include "MemoryManager.h" #include "ProcFS.h" #include "RTC.h" @@ -41,7 +40,6 @@ VirtualConsole* tty2; VirtualConsole* tty3; Keyboard* keyboard; PS2MouseDevice* ps2mouse; -GUIEventDevice* gui_event_device; NullDevice* dev_null; VFS* vfs; @@ -85,7 +83,6 @@ static void init_stage2() vfs->register_character_device(*keyboard); vfs->register_character_device(*ps2mouse); - vfs->register_character_device(*gui_event_device); vfs->register_character_device(*tty0); vfs->register_character_device(*tty1); vfs->register_character_device(*tty2); @@ -157,7 +154,6 @@ void init() keyboard = new Keyboard; ps2mouse = new PS2MouseDevice; - gui_event_device = new GUIEventDevice; dev_null = new NullDevice; VirtualConsole::initialize(); diff --git a/Kernel/sync.sh b/Kernel/sync.sh index 087f096c0a..7499a71413 100755 --- a/Kernel/sync.sh +++ b/Kernel/sync.sh @@ -27,7 +27,6 @@ mknod mnt/dev/full c 1 7 mknod mnt/dev/keyboard c 85 1 mknod mnt/dev/psaux c 10 1 mknod mnt/dev/ptmx c 5 2 -mknod mnt/dev/gui_events c 66 1 ln -s /proc/self/fd/0 mnt/dev/stdin ln -s /proc/self/fd/1 mnt/dev/stdout ln -s /proc/self/fd/2 mnt/dev/stderr |