Unix: Rename X11Display to X11Window and make it work again with Spectre/Window/Window
This commit is contained in:
parent
96f6725428
commit
45d3bff620
9 changed files with 60 additions and 62 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue