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>
|
#include <directfb.h>
|
||||||
|
|
||||||
QDirectFbInput::QDirectFbInput()
|
QDirectFbInput::QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer)
|
||||||
: m_dfbInterface(QDirectFbConvenience::dfbInterface())
|
: m_dfbInterface(dfb)
|
||||||
|
, m_dfbDisplayLayer(dfbLayer)
|
||||||
, m_shouldStop(false)
|
, m_shouldStop(false)
|
||||||
{
|
{
|
||||||
DFBResult ok = m_dfbInterface->CreateEventBuffer(m_dfbInterface, m_eventBuffer.outPtr());
|
DFBResult ok = m_dfbInterface->CreateEventBuffer(m_dfbInterface, m_eventBuffer.outPtr());
|
||||||
if (ok != DFB_OK)
|
if (ok != DFB_OK)
|
||||||
DirectFBError("Failed to initialise eventbuffer", ok);
|
DirectFBError("Failed to initialise eventbuffer", ok);
|
||||||
|
|
||||||
m_dfbInterface->GetDisplayLayer(m_dfbInterface, DLID_PRIMARY, m_dfbDisplayLayer.outPtr());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDirectFbInput::run()
|
void QDirectFbInput::run()
|
||||||
@ -200,7 +199,7 @@ void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event)
|
|||||||
inline QPoint QDirectFbInput::globalPoint(const DFBEvent &event) const
|
inline QPoint QDirectFbInput::globalPoint(const DFBEvent &event) const
|
||||||
{
|
{
|
||||||
QDirectFBPointer<IDirectFBWindow> window;
|
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;
|
int x,y;
|
||||||
window->GetPosition(window.data(), &x, &y);
|
window->GetPosition(window.data(), &x, &y);
|
||||||
return QPoint(event.window.cx +x, event.window.cy + y);
|
return QPoint(event.window.cx +x, event.window.cy + y);
|
||||||
|
@ -55,7 +55,7 @@ class QDirectFbInput : public QThread
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
QDirectFbInput();
|
QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer);
|
||||||
void addWindow(IDirectFBWindow *window, QWindow *platformWindow);
|
void addWindow(IDirectFBWindow *window, QWindow *platformWindow);
|
||||||
void removeWindow(IDirectFBWindow *window);
|
void removeWindow(IDirectFBWindow *window);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
IDirectFB *m_dfbInterface;
|
IDirectFB *m_dfbInterface;
|
||||||
QDirectFBPointer<IDirectFBDisplayLayer> m_dfbDisplayLayer;
|
IDirectFBDisplayLayer *m_dfbDisplayLayer;
|
||||||
QDirectFBPointer<IDirectFBEventBuffer> m_eventBuffer;
|
QDirectFBPointer<IDirectFBEventBuffer> m_eventBuffer;
|
||||||
|
|
||||||
bool m_shouldStop;
|
bool m_shouldStop;
|
||||||
|
@ -88,7 +88,7 @@ QDirectFbIntegration::QDirectFbIntegration()
|
|||||||
m_primaryScreen.reset(new QDirectFbScreen(0));
|
m_primaryScreen.reset(new QDirectFbScreen(0));
|
||||||
screenAdded(m_primaryScreen.data());
|
screenAdded(m_primaryScreen.data());
|
||||||
|
|
||||||
m_input.reset(new QDirectFbInput());
|
m_input.reset(new QDirectFbInput(m_dfb.data(), m_primaryScreen->dfbLayer()));
|
||||||
m_input->start();
|
m_input->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user