Xcb port for egl backend
Noticed this one during test compile against Qt5 as QX11Info is no longer exposing appVisual. Using the visual from root window which works just fine for this use case. REVIEW: 109411
This commit is contained in:
parent
0c86d31ff2
commit
600b3e3b91
1 changed files with 8 additions and 3 deletions
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
// kwin
|
// kwin
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "overlaywindow.h"
|
#include "overlaywindow.h"
|
||||||
|
#include "xcbutils.h"
|
||||||
// kwin libs
|
// kwin libs
|
||||||
#include <kwinglplatform.h>
|
#include <kwinglplatform.h>
|
||||||
|
|
||||||
|
@ -176,7 +177,11 @@ bool EglOnXBackend::initBufferConfigs()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLint visualId = XVisualIDFromVisual((Visual*)QX11Info::appVisual());
|
Xcb::WindowAttributes attribs(rootWindow());
|
||||||
|
if (!attribs) {
|
||||||
|
kError(1212) << "Failed to get window attributes of root window";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
config = configs[0];
|
config = configs[0];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
|
@ -184,7 +189,7 @@ bool EglOnXBackend::initBufferConfigs()
|
||||||
if (eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &val) == EGL_FALSE) {
|
if (eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &val) == EGL_FALSE) {
|
||||||
kError(1212) << "egl get config attrib failed";
|
kError(1212) << "egl get config attrib failed";
|
||||||
}
|
}
|
||||||
if (visualId == val) {
|
if (uint32_t(val) == attribs->visual) {
|
||||||
config = configs[i];
|
config = configs[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +209,7 @@ void EglOnXBackend::present()
|
||||||
}
|
}
|
||||||
|
|
||||||
eglWaitGL();
|
eglWaitGL();
|
||||||
XFlush(display());
|
xcb_flush(connection());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EglOnXBackend::screenGeometryChanged(const QSize &size)
|
void EglOnXBackend::screenGeometryChanged(const QSize &size)
|
||||||
|
|
Loading…
Reference in a new issue