[directfb] Implement grab/ungrab of keyboard/pointer
Change-Id: Ie2b99bb659e324c63bfd23e96d6c89c13a8df3b4 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
960502d91a
commit
c7df1af337
@ -169,3 +169,27 @@ WId QDirectFbWindow::winId() const
|
||||
m_dfbWindow->GetID(m_dfbWindow.data(), &id);
|
||||
return WId(id);
|
||||
}
|
||||
|
||||
bool QDirectFbWindow::setKeyboardGrabEnabled(bool grab)
|
||||
{
|
||||
DFBResult res;
|
||||
|
||||
if (grab)
|
||||
res = m_dfbWindow->GrabKeyboard(m_dfbWindow.data());
|
||||
else
|
||||
res = m_dfbWindow->UngrabKeyboard(m_dfbWindow.data());
|
||||
|
||||
return res == DFB_OK;
|
||||
}
|
||||
|
||||
bool QDirectFbWindow::setMouseGrabEnabled(bool grab)
|
||||
{
|
||||
DFBResult res;
|
||||
|
||||
if (grab)
|
||||
res = m_dfbWindow->GrabPointer(m_dfbWindow.data());
|
||||
else
|
||||
res = m_dfbWindow->UngrabPointer(m_dfbWindow.data());
|
||||
|
||||
return res == DFB_OK;
|
||||
}
|
||||
|
@ -61,6 +61,8 @@ public:
|
||||
void setVisible(bool visible);
|
||||
|
||||
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
|
||||
bool setKeyboardGrabEnabled(bool grab);
|
||||
bool setMouseGrabEnabled(bool grab);
|
||||
void raise();
|
||||
void lower();
|
||||
WId winId() const;
|
||||
|
Loading…
Reference in New Issue
Block a user