Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/egl_wayland_backend.cpp
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Line(s) | 227 | { | |||
---|---|---|---|---|---|
235 | } | 235 | } | ||
236 | 236 | | |||
237 | EGLint error = eglGetError(); | 237 | EGLint error = eglGetError(); | ||
238 | if (error != EGL_SUCCESS) { | 238 | if (error != EGL_SUCCESS) { | ||
239 | qCWarning(KWIN_WAYLAND_BACKEND) << "Error occurred while creating context " << error; | 239 | qCWarning(KWIN_WAYLAND_BACKEND) << "Error occurred while creating context " << error; | ||
240 | return false; | 240 | return false; | ||
241 | } | 241 | } | ||
242 | 242 | | |||
243 | const QRect &v = output->m_waylandOutput->geometry(); | 243 | const QRect v = orientateRect(output->m_waylandOutput, output->m_waylandOutput->geometry()); | ||
244 | 244 | const qreal scale = output->m_waylandOutput->scale(); | |||
245 | qreal scale = output->m_waylandOutput->scale(); | | |||
246 | | ||||
247 | const QSize overall = screens()->size(); | 245 | const QSize overall = screens()->size(); | ||
246 | const QSize orientedOverall = output->m_waylandOutput->orientateSize(overall) * scale; | ||||
248 | glViewport(-v.x() * scale, (v.height() - overall.height() + v.y()) * scale, | 247 | glViewport(-v.x() * scale, (v.height() - overall.height() + v.y()) * scale, | ||
249 | overall.width() * scale, overall.height() * scale); | 248 | orientedOverall.width(), orientedOverall.height()); | ||
249 | | ||||
250 | return true; | 250 | return true; | ||
251 | } | 251 | } | ||
252 | 252 | | |||
253 | bool EglWaylandBackend::initBufferConfigs() | 253 | bool EglWaylandBackend::initBufferConfigs() | ||
254 | { | 254 | { | ||
255 | const EGLint config_attribs[] = { | 255 | const EGLint config_attribs[] = { | ||
256 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | 256 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | ||
257 | EGL_RED_SIZE, 1, | 257 | EGL_RED_SIZE, 1, | ||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |