1
0
Fork 0

Platform/Unix/X11EventQueue: get and release display handle in constructor/destructor instead of every call to poll()

Should be fine as the display should never change during runtime.
This commit is contained in:
Henrik Hautakoski 2020-09-25 18:17:36 +02:00
parent c5648a5105
commit 7648c23e43
2 changed files with 23 additions and 8 deletions

View file

@ -4,13 +4,20 @@
#include <Spectre/System/Event.h>
#include <Platform/PlatformEventQueue.h>
#include <X11/Xlib.h>
namespace sp {
class X11EventQueue : public PlatformEventQueue
{
public :
X11EventQueue();
virtual ~X11EventQueue();
virtual bool poll(Event& event);
private :
::Display* m_disp;
};
} // namespace sp