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:
parent
053511453f
commit
b21c62d98c
2 changed files with 23 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue