wayland: Track wayland changes
Pass version number when creating proxies, use wl_ prefix when looking up interfaces and drop wl_egl_display. (cherry picked from commit c2adf9395214d711a3a40516c6c2afa64b3b4ca3)
This commit is contained in:
parent
95bbf56ff0
commit
1e3e3980da
@ -49,7 +49,6 @@
|
||||
|
||||
QWaylandEglIntegration::QWaylandEglIntegration(struct wl_display *waylandDisplay)
|
||||
: mWaylandDisplay(waylandDisplay)
|
||||
, mNativeEglDisplay(wl_egl_display_create(mWaylandDisplay))
|
||||
{
|
||||
qDebug() << "Using Wayland-EGL";
|
||||
}
|
||||
@ -63,7 +62,7 @@ QWaylandEglIntegration::~QWaylandEglIntegration()
|
||||
void QWaylandEglIntegration::initialize()
|
||||
{
|
||||
EGLint major,minor;
|
||||
mEglDisplay = eglGetDisplay((EGLNativeDisplayType)mNativeEglDisplay);
|
||||
mEglDisplay = eglGetDisplay(mWaylandDisplay);
|
||||
if (mEglDisplay == NULL) {
|
||||
qWarning("EGL not available");
|
||||
} else {
|
||||
@ -84,11 +83,6 @@ EGLDisplay QWaylandEglIntegration::eglDisplay() const
|
||||
return mEglDisplay;
|
||||
}
|
||||
|
||||
wl_egl_display * QWaylandEglIntegration::nativeDisplay() const
|
||||
{
|
||||
return mNativeEglDisplay;
|
||||
}
|
||||
|
||||
QWaylandGLIntegration *QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
|
||||
{
|
||||
return new QWaylandEglIntegration(waylandDisplay->wl_display());
|
||||
|
@ -65,9 +65,6 @@ private:
|
||||
struct wl_display *mWaylandDisplay;
|
||||
|
||||
EGLDisplay mEglDisplay;
|
||||
struct wl_egl_display *mNativeEglDisplay;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // QWAYLANDEGLINTEGRATION_H
|
||||
|
@ -103,7 +103,7 @@ void QWaylandEglWindow::newSurfaceCreated()
|
||||
if (!size.isValid())
|
||||
size = QSize(0,0);
|
||||
|
||||
mWaylandEglWindow = wl_egl_window_create(mEglIntegration->nativeDisplay(),mSurface,size.width(),size.height(),visual);
|
||||
mWaylandEglWindow = wl_egl_window_create(mSurface,size.width(),size.height(),visual);
|
||||
if (mGLContext) {
|
||||
EGLNativeWindowType window(reinterpret_cast<EGLNativeWindowType>(mWaylandEglWindow));
|
||||
EGLSurface surface = eglCreateWindowSurface(mEglIntegration->eglDisplay(),mGLContext->eglConfig(),window,NULL);
|
||||
|
@ -252,17 +252,17 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id,
|
||||
{
|
||||
Q_UNUSED(version);
|
||||
|
||||
if (interface == "output") {
|
||||
struct wl_output *output = wl_output_create(mDisplay, id);
|
||||
if (interface == "wl_output") {
|
||||
struct wl_output *output = wl_output_create(mDisplay, id, 1);
|
||||
wl_output_add_listener(output, &outputListener, this);
|
||||
} else if (interface == "compositor") {
|
||||
mCompositor = wl_compositor_create(mDisplay, id);
|
||||
} else if (interface == "shm") {
|
||||
mShm = wl_shm_create(mDisplay, id);
|
||||
} else if (interface == "shell"){
|
||||
mShell = wl_shell_create(mDisplay, id);
|
||||
} else if (interface == "wl_compositor") {
|
||||
mCompositor = wl_compositor_create(mDisplay, id, 1);
|
||||
} else if (interface == "wl_shm") {
|
||||
mShm = wl_shm_create(mDisplay, id, 1);
|
||||
} else if (interface == "wl_shell"){
|
||||
mShell = wl_shell_create(mDisplay, id, 1);
|
||||
wl_shell_add_listener(mShell, &shellListener, this);
|
||||
} else if (interface == "input_device") {
|
||||
} else if (interface == "wl_input_device") {
|
||||
QWaylandInputDevice *inputDevice =
|
||||
new QWaylandInputDevice(mDisplay, id);
|
||||
mInputDevices.append(inputDevice);
|
||||
|
@ -61,7 +61,7 @@
|
||||
QWaylandInputDevice::QWaylandInputDevice(struct wl_display *display,
|
||||
uint32_t id)
|
||||
: mDisplay(display)
|
||||
, mInputDevice(wl_input_device_create(display, id))
|
||||
, mInputDevice(wl_input_device_create(display, id, 1))
|
||||
, mPointerFocus(NULL)
|
||||
, mKeyboardFocus(NULL)
|
||||
, mButtons(0)
|
||||
|
Loading…
Reference in New Issue
Block a user