Do not set a custom format on QQuickWindows

All QQuickWindows share a default format. By setting a custom format
it overwrites the default and this results in a format without a
stencil buffer being requested resulting in possible rendering errors.

This was used to get an alpha buffer. Instead use the static method
on QQuickWindow to request an alpha buffer.

REVIEW: 118123
wilder-5.14
Martin Gräßlin 12 years ago
parent 3b23c0aafe
commit 654287f7ef
  1. 2
      krunner/main.cpp
  2. 3
      krunner/view.cpp
  3. 2
      ksmserver/main.cpp
  4. 3
      ksmserver/shutdowndlg.cpp
  5. 5
      ksplash/ksplashqml/SplashWindow.cpp
  6. 2
      ksplash/ksplashqml/main.cpp
  7. 3
      shell/panelview.cpp

@ -24,6 +24,7 @@
#include <QAction>
#include <QUrl>
#include <QDebug>
#include <QQuickWindow>
#include <KAuthorized>
#include <kdbusservice.h>
@ -38,6 +39,7 @@ static QCommandLineParser parser;
int main(int argc, char **argv)
{
QQuickWindow::setDefaultAlphaBuffer(true);
QApplication app(argc, argv);
// TODO: Make it a QGuiApplication once we don't depend on KDELibs4Support
// QGuiApplication app(argc, argv);

@ -47,9 +47,6 @@ View::View(QWindow *parent)
m_offset(.5),
m_floating(false)
{
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
setClearBeforeRendering(true);
setColor(QColor(Qt::transparent));
setFlags(Qt::FramelessWindowHint);

@ -47,6 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <QX11Info>
#include <QApplication>
#include <QQuickWindow>
#include <X11/extensions/Xrender.h>
static const char version[] = "0.4";
@ -237,6 +238,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char* argv[] )
putenv((char*)"SESSION_MANAGER=");
checkComposite();
QQuickWindow::setDefaultAlphaBuffer(true);
QApplication *a = new QApplication(argc, argv);
QApplication::setApplicationName( QStringLiteral( "ksmserver") );

@ -79,9 +79,6 @@ KSMShutdownDlg::KSMShutdownDlg( QWindow* parent,
// having a popup here has severe side effects.
{
// window stuff
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
setClearBeforeRendering(true);
setColor(QColor(Qt::transparent));
setFlags(Qt::FramelessWindowHint);

@ -34,11 +34,6 @@ SplashWindow::SplashWindow(bool testing, bool window)
m_testing(testing),
m_window(window)
{
QSurfaceFormat format;
format.setAlphaBufferSize(8);
format.setRenderableType(QSurfaceFormat::OpenGL);
setFormat(format);
setColor(Qt::transparent);
setDefaultAlphaBuffer(true);
setClearBeforeRendering(true);

@ -19,6 +19,7 @@
#include "SplashApp.h"
#include <QQuickWindow>
#include <iostream>
#include <unistd.h>
@ -61,6 +62,7 @@ int main(int argc, char **argv)
close(2);
}
QQuickWindow::setDefaultAlphaBuffer(true);
SplashApp app(argc, argv);
return app.exec();

@ -56,9 +56,6 @@ PanelView::PanelView(ShellCorona *corona, QWindow *parent)
m_visibilityMode(NormalPanel)
{
setResizeMode(QQuickView::SizeRootObjectToView);
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
setClearBeforeRendering(true);
setColor(QColor(Qt::transparent));
setFlags(Qt::FramelessWindowHint|Qt::WindowDoesNotAcceptFocus);

Loading…
Cancel
Save