diff options
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 16 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 7abba81..9e0691d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -119,7 +119,7 @@ void QDirectFBWindowSurface::raise() } } -void QDirectFBWindowSurface::createWindow() +void QDirectFBWindowSurface::createWindow(const QRect &rect) { IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer(); if (!layer) @@ -127,8 +127,12 @@ void QDirectFBWindowSurface::createWindow() DFBWindowDescription description; description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER; - description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT; + description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT|DWDESC_HEIGHT|DWDESC_WIDTH|DWDESC_POSX|DWDESC_POSY; + description.posx = rect.x(); + description.posy = rect.y(); + description.width = rect.width(); + description.height = rect.height(); description.surface_caps = DSCAPS_NONE; if (screen->directFBFlags() & QDirectFBScreen::VideoOnly) description.surface_caps |= DSCAPS_VIDEOONLY; @@ -204,9 +208,11 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) DFBResult result = DFB_OK; // If we're in a resize, the surface shouldn't be locked #ifdef QT_DIRECTFB_WM - if (!dfbWindow) - createWindow(); - setWindowGeometry(dfbWindow, oldRect, rect); + if (!dfbWindow) { + createWindow(rect); + } else { + setWindowGeometry(dfbWindow, oldRect, rect); + } #else if (mode == Primary) { if (dfbSurface && dfbSurface != primarySurface) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h index edecb14..7ae9bfe 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h @@ -99,7 +99,7 @@ private: QDirectFBWindowSurface *sibling; #ifdef QT_DIRECTFB_WM - void createWindow(); + void createWindow(const QRect &rect); IDirectFBWindow *dfbWindow; #else enum Mode { |