mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016010 - Get basic layers sort of working with Qt. r=romaxa
This commit is contained in:
parent
5b42f172f8
commit
ae99a509cc
@ -29,6 +29,7 @@
|
||||
#ifdef MOZ_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "gfxXlibSurface.h"
|
||||
#endif //MOZ_X11
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
@ -806,6 +807,32 @@ nsWindow::GetGLFrameBufferFormat()
|
||||
return LOCAL_GL_NONE;
|
||||
}
|
||||
|
||||
TemporaryRef<DrawTarget>
|
||||
nsWindow::StartRemoteDrawing()
|
||||
{
|
||||
if (!mWidget) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef MOZ_X11
|
||||
Display* dpy = gfxQtPlatform::GetXDisplay(mWidget);
|
||||
Screen* screen = DefaultScreenOfDisplay(dpy);
|
||||
Visual* defaultVisual = DefaultVisualOfScreen(screen);
|
||||
gfxASurface* surf = new gfxXlibSurface(dpy, mWidget->winId(), defaultVisual,
|
||||
gfxIntSize(mWidget->width(),
|
||||
mWidget->height()));
|
||||
|
||||
IntSize size(surf->GetSize().width, surf->GetSize().height);
|
||||
if (size.width <= 0 || size.height <= 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(surf, size);
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetCursor(nsCursor aCursor)
|
||||
{
|
||||
|
@ -151,6 +151,8 @@ public:
|
||||
|
||||
virtual uint32_t GetGLFrameBufferFormat() MOZ_OVERRIDE;
|
||||
|
||||
mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawing() MOZ_OVERRIDE;
|
||||
|
||||
// Widget notifications
|
||||
virtual void OnPaint();
|
||||
virtual nsEventStatus focusInEvent(QFocusEvent* aEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user