1
0
Fork 0

Unix: Rename X11Display to X11Window and make it work again with Spectre/Window/Window

This commit is contained in:
Henrik Hautakoski 2023-08-22 10:06:19 +02:00
parent 96f6725428
commit 45d3bff620
9 changed files with 60 additions and 62 deletions

View file

@ -1,15 +1,15 @@
#include <Spectre/System/Log.h>
#include "X11Display.h"
#include "X11Window.h"
#include "X11WindowEventHandler.h"
#include <X11/Xresource.h>
namespace sp {
// Context used to store X11Display pointer.
// Context used to store X11Window pointer.
::XContext X11WindowEventHandler::win_context = None;
void X11WindowEventHandler::registerHandler(::Display* disp, ::Window window, X11Display *ptr)
void X11WindowEventHandler::registerHandler(::Display* disp, ::Window window, X11Window *ptr)
{
// Initialize context before use.
if (win_context == None) {
@ -41,7 +41,7 @@ void X11WindowEventHandler::process(::Display* disp, const ::XEvent& event)
// Get the pointer for window ID.
if (XFindContext(disp, event.xany.window, win_context, &ptr) == 0) {
X11Display* disp_ptr = (X11Display*) ptr;
X11Window* disp_ptr = (X11Window*) ptr;
// Delegate
disp_ptr->processEvent(event);