directfb: Handle focus, close and geometry change events

Report the focus, close and geometry to Qt.

Change-Id: I059fef5aba5f0e5c0654ba11b0615bc0f5ac50aa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
Holger Hans Peter Freyther 2012-05-16 10:29:04 +02:00 committed by Qt by Nokia
parent 6956ce0912
commit bb2ea689ab
2 changed files with 32 additions and 0 deletions

View File

@ -131,6 +131,16 @@ void QDirectFbInput::handleEvents()
case DWET_ENTER:
case DWET_LEAVE:
handleEnterLeaveEvents(event);
break;
case DWET_GOTFOCUS:
handleGotFocusEvent(event);
break;
case DWET_CLOSE:
handleCloseEvent(event);
break;
case DWET_POSITION_SIZE:
handleGeometryEvent(event);
break;
default:
break;
}
@ -198,6 +208,25 @@ void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event)
}
}
void QDirectFbInput::handleGotFocusEvent(const DFBEvent &event)
{
QWindow *tlw = m_tlwMap.value(event.window.window_id);
QWindowSystemInterface::handleWindowActivated(tlw);
}
void QDirectFbInput::handleCloseEvent(const DFBEvent &event)
{
QWindow *tlw = m_tlwMap.value(event.window.window_id);
QWindowSystemInterface::handleCloseEvent(tlw);
}
void QDirectFbInput::handleGeometryEvent(const DFBEvent &event)
{
QWindow *tlw = m_tlwMap.value(event.window.window_id);
QRect rect(event.window.x, event.window.y, event.window.w, event.window.h);
QWindowSystemInterface::handleGeometryChange(tlw, rect);
}
inline QPoint QDirectFbInput::globalPoint(const DFBEvent &event) const
{
QDirectFBPointer<IDirectFBWindow> window;

View File

@ -72,6 +72,9 @@ private:
void handleWheelEvent(const DFBEvent &event);
void handleKeyEvents(const DFBEvent &event);
void handleEnterLeaveEvents(const DFBEvent &event);
void handleGotFocusEvent(const DFBEvent &event);
void handleCloseEvent(const DFBEvent& event);
void handleGeometryEvent(const DFBEvent& event);
inline QPoint globalPoint(const DFBEvent &event) const;