diff --git a/effects/morphingpopups/package/metadata.desktop b/effects/morphingpopups/package/metadata.desktop index e98bc2f035..9ce53e7cf4 100644 --- a/effects/morphingpopups/package/metadata.desktop +++ b/effects/morphingpopups/package/metadata.desktop @@ -14,6 +14,7 @@ Comment[nn]=Krysstoningsanimasjon når hjelpebobler eller varslingar endrar form Comment[pl]=Animacja zanikania przy zmianie geometrii wskazówek lub powiadomień Comment[pt]=Animar o desvanecimento quando as dicas ou notificações mudarem de tamanho Comment[pt_BR]=Animar a transição suave quando as dicas ou notificações mudarem de tamanho +Comment[ru]=При изменении формы всплывающих подсказок или уведомлений они плавно растягиваются или сжимаются Comment[sk]=Prelínacia animácia pri tooltipoch alebo notifikáciách pri zmene ich geometrie Comment[sl]=Animacija navzkrižnega pojemanja ob spremembi geometrije orodnih namigov in obvestil Comment[sr]=Анимација претапања када облачићи или обавештења мењају геометрију @@ -40,6 +41,7 @@ Name[nn]=Formendring for sprettoppvindauge Name[pl]=Morfing elementów wysuwnych Name[pt]=Mensagens com mudança de forma Name[pt_BR]=Mensagens com mudança de forma +Name[ru]=Анимация преобразования всплывающих окон Name[sk]=Vysúvať vyskakovacie okná Name[sl]=Prehajajoča pojavna okna Name[sr]=Претапајући искакачи diff --git a/main_wayland.cpp b/main_wayland.cpp index 6f74ba392f..ecb649bc03 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -135,7 +135,7 @@ void ApplicationWayland::createBackend() connect(platform(), &Platform::initFailed, this, [] () { std::cerr << "FATAL ERROR: backend failed to initialize, exiting now" << std::endl; - ::exit(1); + QCoreApplication::exit(1); } ); platform()->init(); diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp index c15f3f4f44..fd0240f80b 100644 --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -237,6 +237,11 @@ void DrmBackend::openDrm() ); m_drmId = device->sysNum(); queryResources(); + if (m_outputs.isEmpty()) { + qCWarning(KWIN_DRM) << "No outputs, cannot render, will terminate now"; + emit initFailed(); + return; + } // setup udevMonitor if (m_udevMonitor) { @@ -315,7 +320,11 @@ void DrmBackend::queryResources() drmOutput->m_mode = connector->modes[0]; } drmOutput->m_connector = connector->connector_id; - drmOutput->init(connector.data()); + if (!drmOutput->init(connector.data())) { + qCWarning(KWIN_DRM) << "Failed to create output for connector " << connector->connector_id; + delete drmOutput; + continue; + } qCDebug(KWIN_DRM) << "Found new output with uuid" << drmOutput->uuid(); connectedOutputs << drmOutput; } @@ -339,7 +348,9 @@ void DrmBackend::queryResources() } m_outputs = connectedOutputs; readOutputsConfiguration(); - emit screensQueried(); + if (!m_outputs.isEmpty()) { + emit screensQueried(); + } } void DrmBackend::readOutputsConfiguration() diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp index 31f563d6be..69b1ed6c41 100644 --- a/plugins/platforms/drm/drm_output.cpp +++ b/plugins/platforms/drm/drm_output.cpp @@ -180,13 +180,15 @@ static DrmOutput::DpmsMode fromWaylandDpmsMode(KWayland::Server::OutputInterface } } -void DrmOutput::init(drmModeConnector *connector) +bool DrmOutput::init(drmModeConnector *connector) { initEdid(connector); initDpms(connector); initUuid(); m_savedCrtc.reset(drmModeGetCrtc(m_backend->fd(), m_crtcId)); - blank(); + if (!blank()) { + return false; + } setDpms(DpmsMode::On); if (!m_waylandOutput.isNull()) { delete m_waylandOutput.data(); @@ -287,6 +289,7 @@ void DrmOutput::init(drmModeConnector *connector) m_waylandOutput->create(); qCDebug(KWIN_DRM) << "Created OutputDevice"; m_waylandOutputDevice->create(); + return true; } void DrmOutput::initUuid() @@ -318,14 +321,17 @@ bool DrmOutput::isCurrentMode(const drmModeModeInfo *mode) const && qstrcmp(mode->name, m_mode.name) == 0; } -void DrmOutput::blank() +bool DrmOutput::blank() { if (!m_blackBuffer) { m_blackBuffer = m_backend->createBuffer(size()); - m_blackBuffer->map(); + if (!m_blackBuffer->map()) { + cleanupBlackBuffer(); + return false; + } m_blackBuffer->image()->fill(Qt::black); } - setMode(m_blackBuffer); + return setMode(m_blackBuffer); } bool DrmOutput::setMode(DrmBuffer *buffer) diff --git a/plugins/platforms/drm/drm_output.h b/plugins/platforms/drm/drm_output.h index e021f60017..628bb5da95 100644 --- a/plugins/platforms/drm/drm_output.h +++ b/plugins/platforms/drm/drm_output.h @@ -61,9 +61,9 @@ public: void moveCursor(const QPoint &globalPos); bool present(DrmBuffer *buffer); void pageFlipped(); - void init(drmModeConnector *connector); + bool init(drmModeConnector *connector); void restoreSaved(); - void blank(); + bool blank(); /** * This sets the changes and tests them against the DRM output diff --git a/plugins/platforms/fbdev/fb_backend.cpp b/plugins/platforms/fbdev/fb_backend.cpp index fc7ed42c78..370ad43da1 100644 --- a/plugins/platforms/fbdev/fb_backend.cpp +++ b/plugins/platforms/fbdev/fb_backend.cpp @@ -92,6 +92,7 @@ void FramebufferBackend::openFrameBuffer() } m_fd = fd; queryScreenInfo(); + initImageFormat(); setReady(true); emit screensQueried(); } @@ -153,9 +154,14 @@ void FramebufferBackend::unmap() } QImage::Format FramebufferBackend::imageFormat() const +{ + return m_imageFormat; +} + +void FramebufferBackend::initImageFormat() { if (m_fd < 0) { - return QImage::Format_Invalid; + return; } qCDebug(KWIN_FB) << "Bits Per Pixel: " << m_bitsPerPixel; @@ -178,7 +184,7 @@ QImage::Format FramebufferBackend::imageFormat() const m_green.offset == 8 && m_red.offset == 16) { qCDebug(KWIN_FB) << "Framebuffer format is RGB32"; - return QImage::Format_RGB32; + m_imageFormat = QImage::Format_RGB32; } else if (m_bitsPerPixel == 24 && m_red.length == 8 && m_green.length == 8 && @@ -187,7 +193,8 @@ QImage::Format FramebufferBackend::imageFormat() const m_green.offset == 8 && m_red.offset == 16) { qCDebug(KWIN_FB) << "Framebuffer Format is RGB888"; - return QImage::Format_RGB888; + m_bgr = true; + m_imageFormat = QImage::Format_RGB888; } else if (m_bitsPerPixel == 16 && m_red.length == 5 && m_green.length == 6 && @@ -196,10 +203,9 @@ QImage::Format FramebufferBackend::imageFormat() const m_green.offset == 5 && m_red.offset == 11) { qCDebug(KWIN_FB) << "Framebuffer Format is RGB16"; - return QImage::Format_RGB16; + m_imageFormat = QImage::Format_RGB16; } qCWarning(KWIN_FB) << "Framebuffer format is unknown"; - return QImage::Format_Invalid; } } diff --git a/plugins/platforms/fbdev/fb_backend.h b/plugins/platforms/fbdev/fb_backend.h index 7aee7eefc8..e888994722 100644 --- a/plugins/platforms/fbdev/fb_backend.h +++ b/plugins/platforms/fbdev/fb_backend.h @@ -71,10 +71,17 @@ public: return m_bitsPerPixel; } QImage::Format imageFormat() const; + /** + * @returns whether the imageFormat is BGR instead of RGB. + **/ + bool isBGR() const { + return m_bgr; + } private: void openFrameBuffer(); bool queryScreenInfo(); + void initImageFormat(); QSize m_resolution; QSize m_physicalSize; QByteArray m_id; @@ -91,6 +98,8 @@ private: quint32 m_bufferLength = 0; int m_bytesPerLine = 0; void *m_memory = nullptr; + QImage::Format m_imageFormat = QImage::Format_Invalid; + bool m_bgr = false; }; } diff --git a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp index 732d5f31fe..ec311586c9 100644 --- a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp +++ b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp @@ -79,7 +79,7 @@ void FramebufferQPainterBackend::present(int mask, const QRegion &damage) return; } QPainter p(&m_backBuffer); - p.drawImage(QPoint(0, 0), m_renderBuffer); + p.drawImage(QPoint(0, 0), m_backend->isBGR() ? m_renderBuffer.rgbSwapped() : m_renderBuffer); } bool FramebufferQPainterBackend::usesOverlayWindow() const diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 239a585cc5..7d81eab213 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -2280,7 +2280,7 @@ void SceneOpenGLShadow::buildQuads() const int width = qMax(topLeft.width(), bottomLeft.width()) + qMax(top.width(), bottom.width()) + qMax(topRight.width(), bottomRight.width()); - const int height = qMax(topLeft.height(), bottomLeft.height()) + + const int height = qMax(topLeft.height(), topRight.height()) + qMax(left.height(), right.height()) + qMax(bottomLeft.height(), bottomRight.height()); @@ -2387,7 +2387,8 @@ bool SceneOpenGLShadow::prepareBackend() const int width = qMax(topLeft.width(), bottomLeft.width()) + qMax(top.width(), bottom.width()) + qMax(topRight.width(), bottomRight.width()); - const int height = qMax(topLeft.height(), bottomLeft.height()) + + + const int height = qMax(topRight.height(), topLeft.height()) + qMax(left.height(), right.height()) + qMax(bottomLeft.height(), bottomRight.height()); diff --git a/scripts/videowall/metadata.desktop b/scripts/videowall/metadata.desktop index 5e7a275274..a8a991568e 100644 --- a/scripts/videowall/metadata.desktop +++ b/scripts/videowall/metadata.desktop @@ -77,7 +77,7 @@ Comment[nn]=Filmframsyning i fullskjermsmodus over alle tilgjengelege skjermar Comment[pl]=Rozciąga pełnoekranowy odtwarzacz filmów na wszystkie podłączone ekrany, tworząc ścianę wideo Comment[pt]=Espalha o leitor de vídeo em todos os ecrãs ligados para criar um painel de vídeo Comment[pt_BR]=Espalha o reprodutor de vídeo em tela inteira sobre todas as telas ligadas para criar um painel de vídeo -Comment[ru]=Поверх всех прикреплённых экранов открывается видео проигрыватель для создания видео стены +Comment[ru]=Для создания видеостены вывод видеопроигрывателя распределяется по всем подключённым экранам Comment[sk]=Roztiahne na celú obrazovku video prehrávač cez všetky pripojené obrazovky na vytvorenie video steny Comment[sl]=Celozaslonski predvajalnik videov bo razprostrt prek vseh priklopljenih zaslonov in tako ustvaril video zid Comment[sr]=Видео плејер преко целог екрана бива проширен на све прикључене екране, стварајући видео зид