Commit c6002a8b909e9432c14fedf7f2ea50bd511715d6
- Diff rendering mode:
- inline
- side by side
qgraphicssystem_dd.cpp
(8 / 12)
|   | |||
| 23 | 23 | ||
| 24 | 24 | #include "qgraphicssystem_dd.h" | |
| 25 | 25 | ||
| 26 | #include <QtGui/private/qapplication_p.h> | ||
| 26 | #include <QWindowSystemInterface> | ||
| 27 | 27 | #include <QtGui/private/qpixmap_raster_p.h> | |
| 28 | 28 | ||
| 29 | 29 | #include <QtGui/qapplication.h> | |
| … | … | ||
| 265 | 265 | qDebug() << "SYSTEM: received event" << m_message.type << window; | |
| 266 | 266 | switch (m_message.type) { | |
| 267 | 267 | case Event::GeometryChangeEvent: { | |
| 268 | QApplicationPrivate::handleGeometryChange(window, m_message.rect.toRect()); | ||
| 268 | QWindowSystemInterface::handleGeometryChange(window, m_message.rect.toRect()); | ||
| 269 | 269 | break; } | |
| 270 | 270 | case Event::MousePressEvent: { | |
| 271 | 271 | // ### we don't support multiple buttons or any keyboard modifiers | |
| 272 | 272 | QPoint pos = m_message.rect.topLeft().toPoint(); | |
| 273 | QMouseEvent me(QEvent::MouseButtonPress, pos, pos + window->pos(), | ||
| 274 | Qt::LeftButton, Qt::NoButton, Qt::NoModifier); | ||
| 275 | QApplicationPrivate::handleMouseEvent(window, me); | ||
| 273 | Qt::MouseButtons b = Qt::LeftButton; | ||
| 274 | QWindowSystemInterface::handleMouseEvent(window, pos, pos+window->pos(), b); | ||
| 276 | 275 | break; } | |
| 277 | 276 | case Event::MouseReleaseEvent: { | |
| 278 | 277 | // ### we don't support multiple buttons or any keyboard modifiers | |
| 279 | 278 | QPoint pos = m_message.rect.topLeft().toPoint(); | |
| 280 | QMouseEvent me(QEvent::MouseButtonRelease, pos, pos + window->pos(), | ||
| 281 | Qt::LeftButton, Qt::NoButton, Qt::NoModifier); | ||
| 282 | QApplicationPrivate::handleMouseEvent(window, me); | ||
| 279 | Qt::MouseButtons b = Qt::NoButton; | ||
| 280 | QWindowSystemInterface::handleMouseEvent(window, pos, pos + window->pos(), b); | ||
| 283 | 281 | break; } | |
| 284 | 282 | case Event::KeyPressEvent: { | |
| 285 | QKeyEvent ke(QEvent::KeyPress, m_message.value, Qt::NoModifier); | ||
| 286 | QApplicationPrivate::handleKeyEvent(window, &ke); | ||
| 283 | QWindowSystemInterface::handleKeyEvent(window, QEvent::KeyPress, m_message.value, Qt::NoModifier); | ||
| 287 | 284 | break; } | |
| 288 | 285 | case Event::KeyReleaseEvent: { | |
| 289 | QKeyEvent ke(QEvent::KeyRelease, m_message.value, Qt::NoModifier); | ||
| 290 | QApplicationPrivate::handleKeyEvent(window, &ke); | ||
| 286 | QWindowSystemInterface::handleKeyEvent(window, QEvent::KeyRelease, m_message.value, Qt::NoModifier); | ||
| 291 | 287 | break; } | |
| 292 | 288 | } | |
| 293 | 289 | break; } |

