directfb: Remove dfbDisplayLayer from QDirectFbInput
Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
a0e0359567
commit
ab0e62205f
@ -50,15 +50,14 @@
|
||||
|
||||
#include <directfb.h>
|
||||
|
||||
QDirectFbInput::QDirectFbInput()
|
||||
: m_dfbInterface(QDirectFbConvenience::dfbInterface())
|
||||
QDirectFbInput::QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer)
|
||||
: m_dfbInterface(dfb)
|
||||
, m_dfbDisplayLayer(dfbLayer)
|
||||
, m_shouldStop(false)
|
||||
{
|
||||
DFBResult ok = m_dfbInterface->CreateEventBuffer(m_dfbInterface, m_eventBuffer.outPtr());
|
||||
if (ok != DFB_OK)
|
||||
DirectFBError("Failed to initialise eventbuffer", ok);
|
||||
|
||||
m_dfbInterface->GetDisplayLayer(m_dfbInterface, DLID_PRIMARY, m_dfbDisplayLayer.outPtr());
|
||||
}
|
||||
|
||||
void QDirectFbInput::run()
|
||||
@ -200,7 +199,7 @@ void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event)
|
||||
inline QPoint QDirectFbInput::globalPoint(const DFBEvent &event) const
|
||||
{
|
||||
QDirectFBPointer<IDirectFBWindow> window;
|
||||
m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer.data() , event.window.window_id, window.outPtr());
|
||||
m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer, event.window.window_id, window.outPtr());
|
||||
int x,y;
|
||||
window->GetPosition(window.data(), &x, &y);
|
||||
return QPoint(event.window.cx +x, event.window.cy + y);
|
||||
|
@ -55,7 +55,7 @@ class QDirectFbInput : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QDirectFbInput();
|
||||
QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer);
|
||||
void addWindow(IDirectFBWindow *window, QWindow *platformWindow);
|
||||
void removeWindow(IDirectFBWindow *window);
|
||||
|
||||
@ -74,7 +74,7 @@ private:
|
||||
|
||||
|
||||
IDirectFB *m_dfbInterface;
|
||||
QDirectFBPointer<IDirectFBDisplayLayer> m_dfbDisplayLayer;
|
||||
IDirectFBDisplayLayer *m_dfbDisplayLayer;
|
||||
QDirectFBPointer<IDirectFBEventBuffer> m_eventBuffer;
|
||||
|
||||
bool m_shouldStop;
|
||||
|
@ -88,7 +88,7 @@ QDirectFbIntegration::QDirectFbIntegration()
|
||||
m_primaryScreen.reset(new QDirectFbScreen(0));
|
||||
screenAdded(m_primaryScreen.data());
|
||||
|
||||
m_input.reset(new QDirectFbInput());
|
||||
m_input.reset(new QDirectFbInput(m_dfb.data(), m_primaryScreen->dfbLayer()));
|
||||
m_input->start();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user