Properly handle the expose event for QWindow.
This commit is contained in:
parent
3086f2098e
commit
3edff16c87
@ -327,6 +327,12 @@ QPlatformWindow *QWindow::handle() const
|
||||
return d->platformWindow;
|
||||
}
|
||||
|
||||
QWindowSurface *QWindow::surface() const
|
||||
{
|
||||
Q_D(const QWindow);
|
||||
return d->surface;
|
||||
}
|
||||
|
||||
void QWindow::showMinimized()
|
||||
{
|
||||
qDebug() << "unimplemented:" << __FILE__ << __LINE__;
|
||||
|
@ -66,6 +66,7 @@ class QWheelEvent;
|
||||
|
||||
class QPlatformWindow;
|
||||
class QWindowContext;
|
||||
class QWindowSurface;
|
||||
|
||||
class Q_GUI_EXPORT QWindow : public QObject
|
||||
{
|
||||
@ -132,6 +133,7 @@ public:
|
||||
void destroy();
|
||||
|
||||
QPlatformWindow *handle() const;
|
||||
QWindowSurface *surface() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
inline void show() { setVisible(true); }
|
||||
@ -174,6 +176,7 @@ private:
|
||||
|
||||
friend class QGuiApplication;
|
||||
friend class QGuiApplicationPrivate;
|
||||
friend class QWindowSurface;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -62,13 +62,13 @@ public:
|
||||
, platformWindow(0)
|
||||
, visible(false)
|
||||
, glContext(0)
|
||||
, surface(0)
|
||||
{
|
||||
isWindow = true;
|
||||
}
|
||||
|
||||
~QWindowPrivate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Qt::WindowFlags windowFlags;
|
||||
@ -80,6 +80,7 @@ public:
|
||||
QString windowTitle;
|
||||
QRect geometry;
|
||||
QWindowContext *glContext;
|
||||
QWindowSurface *surface;
|
||||
};
|
||||
|
||||
|
||||
|
@ -116,6 +116,8 @@ public:
|
||||
QWindowSurface::QWindowSurface(QWindow *window, bool /*setDefaultSurface*/)
|
||||
: d_ptr(new QWindowSurfacePrivate(window))
|
||||
{
|
||||
if (window)
|
||||
window->d_func()->surface = this;
|
||||
#if 0
|
||||
if (!QApplicationPrivate::runtime_graphics_system) {
|
||||
if (setDefaultSurface && window)
|
||||
|
@ -528,18 +528,12 @@ QPlatformGLContext *QXcbWindow::glContext() const
|
||||
|
||||
void QXcbWindow::handleExposeEvent(const xcb_expose_event_t *event)
|
||||
{
|
||||
#if 0
|
||||
QWidget *widget = window()->widget();
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
QWindowSurface *surface = widget->windowSurface();
|
||||
QWindowSurface *surface = window()->surface();
|
||||
if (surface) {
|
||||
QRect rect(event->x, event->y, event->width, event->height);
|
||||
|
||||
surface->flush(widget, rect, QPoint());
|
||||
surface->flush(window(), rect, QPoint());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *event)
|
||||
|
Loading…
Reference in New Issue
Block a user