From c0b89870b9799c07afb75971d0ae7c4f3a637b52 Mon Sep 17 00:00:00 2001 From: Alex Fiestas Date: Thu, 28 Jul 2011 22:18:41 +0200 Subject: [PATCH 01/25] Move the "noOffscreensWindow" into a method so we can reuse it --- client.h | 2 ++ geometry.cpp | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/client.h b/client.h index fca0297ee0..93510ec818 100644 --- a/client.h +++ b/client.h @@ -572,6 +572,8 @@ private: Time readUserCreationTime() const; void startupIdChanged(); + void checkOffscreenPosition (QRect& geom, const QRect& screenArea); + Window client; Window wrapper; KDecoration* decoration; diff --git a/geometry.cpp b/geometry.cpp index af6ce8c50c..b64db47630 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1157,15 +1157,7 @@ void Client::checkWorkspacePosition(const QRect &geo) newGeom.x() + newGeom.width() - 1)); } - if (newGeom.x() > screenArea.right()) { - int screenWidth = screenArea.width(); - newGeom.moveLeft(screenWidth - (screenWidth / 4)); - } - if (newGeom.y() > screenArea.bottom()) { - int screenHeight = screenArea.height(); - newGeom.moveBottom(screenHeight - (screenHeight / 4)); - } - + checkOffscreenPosition(newGeom, screenArea); // Obey size hints. TODO: We really should make sure it stays in the right place newGeom.setSize(adjustedSize(newGeom.size())); @@ -1174,6 +1166,18 @@ void Client::checkWorkspacePosition(const QRect &geo) } } +void Client::checkOffscreenPosition(QRect& geom, const QRect& screenArea) +{ + if (geom.x() > screenArea.right()) { + int screenWidth = screenArea.width(); + geom.moveLeft(screenWidth - (screenWidth / 4)); + } + if (geom.y() > screenArea.bottom()) { + int screenHeight = screenArea.height(); + geom.moveBottom(screenHeight - (screenHeight / 4)); + } +} + // Try to be smart about keeping the clients visible. // If the client was fully inside the workspace before, try to keep // it still inside the workarea, possibly moving it or making it smaller if possible, From 78783bfb49da1034c72986acf40ea22ee6b1c251 Mon Sep 17 00:00:00 2001 From: Alex Fiestas Date: Thu, 28 Jul 2011 22:19:10 +0200 Subject: [PATCH 02/25] use checkOffscreenClient for half-maximized clients --- geometry.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geometry.cpp b/geometry.cpp index b64db47630..5c0f303e53 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1034,6 +1034,10 @@ void Client::checkWorkspacePosition(const QRect &geo) if (maximizeMode() != MaximizeRestore) { // TODO update geom_restore? changeMaximize(false, false, true); // adjust size + const QRect &screenArea = workspace()->clientArea(ScreenArea, this); + QRect geom = geometry(); + checkOffscreenPosition(geom, screenArea); + setGeometry(geom); return; } From 9a18de01715ef5ec43b057ce76b077c9df2f54a5 Mon Sep 17 00:00:00 2001 From: Arthur Arlt Date: Fri, 29 Jul 2011 10:57:02 +0200 Subject: [PATCH 03/25] Move creation of Tiling some lines up Since there was a crash caused by calling a function of the not yet initialized class Tiling, the creation was just moved some lines up. The problem does not occur anymore. BUG: 278740 --- workspace.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 74a854e5ef..1d3c5ea88d 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -193,6 +193,10 @@ Workspace::Workspace(bool restore) delayFocusTimer = 0; +#ifdef KWIN_BUILD_TILING + m_tiling = new Tiling(this); +#endif + if (restore) loadSessionInfo(); @@ -241,9 +245,6 @@ Workspace::Workspace(bool restore) desktop_change_osd = new DesktopChangeOSD(this); #endif m_outline = new Outline(); -#ifdef KWIN_BUILD_TILING - m_tiling = new Tiling(this); -#endif initShortcuts(); From c37c9de57beaa519ea4f1dedc18a578bb921606b Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sat, 30 Jul 2011 09:44:58 +0200 Subject: [PATCH 04/25] SVN_SILENT made messages (.desktop file) --- effects/coverswitch/coverswitch.desktop | 2 ++ effects/coverswitch/coverswitch_config.desktop | 1 + effects/dashboard/dashboard.desktop | 3 ++- effects/dashboard/dashboard_config.desktop | 2 +- effects/windowgeometry/windowgeometry.desktop | 2 ++ effects/windowgeometry/windowgeometry_config.desktop | 1 + kcmkwin/kwindecoration/kwindecoration.desktop | 1 + kcmkwin/kwintabbox/kwintabbox.desktop | 2 ++ kwin.notifyrc | 1 + 9 files changed, 13 insertions(+), 2 deletions(-) diff --git a/effects/coverswitch/coverswitch.desktop b/effects/coverswitch/coverswitch.desktop index 816ae3452d..5c77bbf930 100644 --- a/effects/coverswitch/coverswitch.desktop +++ b/effects/coverswitch/coverswitch.desktop @@ -15,6 +15,7 @@ Name[en_GB]=Cover Switch Name[eo]=Kovra ŝanĝilo Name[es]=Selección de ventana en modo carátula Name[et]=Aknalülitaja +Name[eu]=Estalki aldaketa Name[fi]=Levykansivaihtaja Name[fr]=Défilement circulaire Name[fy]=Foarplaat wiksel @@ -84,6 +85,7 @@ Comment[en_GB]=Display a Cover Flow effect for the alt+tab window switcher Comment[eo]=Montri iPod-an efekton kiel alt+tab fenestr-ŝanĝilo Comment[es]=Muestra un efecto de cover flow en el conmutador de ventanas alt+tab Comment[et]=Cover Flow efekti näitamine Alt+TAB aknavahetajas +Comment[eu]=Alt+tab leiho aldatzailearentzako estalki isuri efektua bistaratzen du Comment[fi]=Näyttää levykansitehosteen alt+tab-ikkunanvaihdolle Comment[fr]=Affiche un effet de défilement circulaire dans le changeur de fenêtres en utilisant la combinaison « Alt+Tab » Comment[fy]=Lit finsters as lânkommende albumhoezen sjen ûnder it rinnen troch de finsters mei Alt+Tab diff --git a/effects/coverswitch/coverswitch_config.desktop b/effects/coverswitch/coverswitch_config.desktop index 8be8490caf..5f4228d4c3 100644 --- a/effects/coverswitch/coverswitch_config.desktop +++ b/effects/coverswitch/coverswitch_config.desktop @@ -22,6 +22,7 @@ Name[en_GB]=Cover Switch Name[eo]=Kovra ŝanĝilo Name[es]=Selección de ventana en modo carátula Name[et]=Aknalülitaja +Name[eu]=Estalki aldaketa Name[fi]=Levykansivaihtaja Name[fr]=Défilement circulaire Name[fy]=Foarplaat wiksel diff --git a/effects/dashboard/dashboard.desktop b/effects/dashboard/dashboard.desktop index 8e5a45f673..cba645bad4 100644 --- a/effects/dashboard/dashboard.desktop +++ b/effects/dashboard/dashboard.desktop @@ -18,7 +18,7 @@ Name[en_GB]=Dashboard Name[eo]=Stirtablo Name[es]=Tablero de mandos Name[et]=Vidinavaade -Name[eu]=Dashboard +Name[eu]=Aginte-mahaia Name[fi]=Kojelauta Name[fr]=Panneau de contrôle Name[fy]=Dashboard @@ -88,6 +88,7 @@ Comment[el]=Αποχρωματισμός της επιφάνειας εργασ Comment[en_GB]=Desaturate the desktop when displaying the Plasma dashboard Comment[es]=Desatura el escritorio cuando se muestra el tablero de Plasma Comment[et]=Töölaua värvide tuhmistamine Plasma vidinavaate näitamisel +Comment[eu]=Mahaigainaren asetasuna murriztu Plasmaren aginte-mahaia bistaratzerakoan Comment[fi]=Sekaväritä työpöytä kun näytetään Plasma-kojelauta Comment[fr]=Dé-sature le bureau lors de l'affichage du panneau de contrôle de Plasma Comment[he]=החשכת שולחן העבודה בזמן הצגת ה־dashboard של Plasma diff --git a/effects/dashboard/dashboard_config.desktop b/effects/dashboard/dashboard_config.desktop index 66cc9120f3..d6d4d22e1d 100644 --- a/effects/dashboard/dashboard_config.desktop +++ b/effects/dashboard/dashboard_config.desktop @@ -25,7 +25,7 @@ Name[en_GB]=Dashboard Name[eo]=Stirtablo Name[es]=Tablero de mandos Name[et]=Vidinavaade -Name[eu]=Dashboard +Name[eu]=Aginte-mahaia Name[fi]=Kojelauta Name[fr]=Panneau de contrôle Name[fy]=Dashboard diff --git a/effects/windowgeometry/windowgeometry.desktop b/effects/windowgeometry/windowgeometry.desktop index 2972114c8d..d455ba19fc 100644 --- a/effects/windowgeometry/windowgeometry.desktop +++ b/effects/windowgeometry/windowgeometry.desktop @@ -12,6 +12,7 @@ Name[el]=Γεωμετρία παραθύρου Name[en_GB]=WindowGeometry Name[es]=Geometría de la ventana Name[et]=Akna geomeetria +Name[eu]=Leihoaren geometria Name[fi]=Ikkunan mitat Name[fr]=Géométrie de la fenêtre Name[he]=גדלי חלונות @@ -62,6 +63,7 @@ Comment[el]=Εμφανίζει την γεωμετρία του παραθύρο Comment[en_GB]=Display window geometries on move/resize Comment[es]=Muestra la geometría de la ventana al mover/redimensionar Comment[et]=Akende geomeetria kuvamine liigutamisel või suuruse muutmisel +Comment[eu]=Bistaratu leiho geometriak mugitu edo neurri aldatzerakoan Comment[fi]=Näytä ikkunan mitat, kun sitä liikutetaan tai sen kokoa muutetaan Comment[fr]=Affiche la géométrie de la fenêtre pendant le déplacement ou le redimensionnement Comment[he]=מציג גדלי החלון בהזזתו או בשינוי גודלו diff --git a/effects/windowgeometry/windowgeometry_config.desktop b/effects/windowgeometry/windowgeometry_config.desktop index b4072d6374..0f3ea1ab23 100644 --- a/effects/windowgeometry/windowgeometry_config.desktop +++ b/effects/windowgeometry/windowgeometry_config.desktop @@ -18,6 +18,7 @@ Name[el]=Γεωμετρία παραθύρου Name[en_GB]=WindowGeometry Name[es]=Geometría de la ventana Name[et]=Akna geomeetria +Name[eu]=Leihoaren geometria Name[fi]=Ikkunan mitat Name[fr]=Géométrie de la fenêtre Name[he]=גדלי חלונות diff --git a/kcmkwin/kwindecoration/kwindecoration.desktop b/kcmkwin/kwindecoration/kwindecoration.desktop index 7f3a4cb8f2..cfe4f339e2 100644 --- a/kcmkwin/kwindecoration/kwindecoration.desktop +++ b/kcmkwin/kwindecoration/kwindecoration.desktop @@ -25,6 +25,7 @@ Name[el]=Διακοσμήσεις παραθύρου Name[en_GB]=Window Decorations Name[es]=Decoración de ventanas Name[et]=Akna dekoratsioonid +Name[eu]=Leihoen apaingarriak Name[fi]=Ikkunoiden kehykset Name[fr]=Décorations de la fenêtre Name[ga]=Maisiúcháin Fhuinneog diff --git a/kcmkwin/kwintabbox/kwintabbox.desktop b/kcmkwin/kwintabbox/kwintabbox.desktop index 5b6f7588db..f72631d614 100644 --- a/kcmkwin/kwintabbox/kwintabbox.desktop +++ b/kcmkwin/kwintabbox/kwintabbox.desktop @@ -24,6 +24,7 @@ Name[el]=Εναλλαγή εργασιών Name[en_GB]=Task Switcher Name[es]=Cambiador de tareas Name[et]=Ülesannete vahetaja +Name[eu]=Ataza aldarazlea Name[fi]=Tehtävien vaihtaja Name[fr]=Changeur de tâches Name[ga]=Malartóir Tascanna @@ -81,6 +82,7 @@ Comment[el]=Ρυθμίστε τη συμπεριφορά για την περι Comment[en_GB]=Configure the behaviour for navigating through windows Comment[es]=Configurar el comportamiento de la circulación entre ventanas Comment[et]=Akende vahel liikumise seadistamine +Comment[eu]=Konfiguratu leihoen artean nabigatzeko portaera Comment[fi]=Muokkaa ikkunoiden selauksen toimintatapaa Comment[fr]=Configuration du comportement pour la navigation à travers les fenêtres Comment[he]=הגדרת ההתנהגות בניווט בין חלונות diff --git a/kwin.notifyrc b/kwin.notifyrc index e403e6f105..e89dce2e20 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -14,6 +14,7 @@ Comment[el]=Διαχειριστής παραθύρων Kwin Comment[en_GB]=KWin Window Manager Comment[es]=Gestor de ventanas KWin Comment[et]=Kwini aknahaldur +Comment[eu]=KWin leiho kudeatzailea Comment[fi]=KWin-ikkunaohjelma Comment[fr]=Gestionnaire de fenêtres KWin Comment[ga]=Bainisteoir Fuinneog KWin From fb4d148f5316a93755e36c99e84131f7590919e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 24 Jul 2011 14:59:39 +0200 Subject: [PATCH 05/25] Move control of desktop layout from pager to KWin The desktop layout (number of rows) should be controlled by the window manager as it is also responsible for the number of desktops and the names of them. The setting for the rows is moved from the pager UI to the virtual desktops KCM. The desktop layout is set when KWin starts and updated by the KCM. With this change there is no process claiming the manager selection for pager any more. This means the KDE Plasma Workspaces are no longer compliant to the complete section of _NET_DESKTOP_LAYOUT in the EWMH. REVIEW: 102073 BUG: 277965 FEATURE: 105779 FEATURE: 213353 FIXED-IN: 4.8.0 --- kcmkwin/kwindesktop/main.cpp | 38 ++++++++++++++++++++++++++++-------- kcmkwin/kwindesktop/main.ui | 4 ++-- workspace.cpp | 10 ++++++++++ 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/kcmkwin/kwindesktop/main.cpp b/kcmkwin/kwindesktop/main.cpp index ee5c504554..21ff017ded 100644 --- a/kcmkwin/kwindesktop/main.cpp +++ b/kcmkwin/kwindesktop/main.cpp @@ -76,11 +76,6 @@ void KWinDesktopConfig::init() m_ui->desktopNames->setMaxDesktops(maxDesktops); m_ui->desktopNames->numberChanged(defaultDesktops); - // number of rows are still missing in Plasma - hide them for now - // TODO: bring them back when trunk is open and bug Plasma devs ;-) - m_ui->label->hide(); - m_ui->rowsSpinBox->hide(); - QVBoxLayout* layout = new QVBoxLayout(this); layout->addWidget(m_ui); @@ -210,12 +205,14 @@ void KWinDesktopConfig::init() //number of desktops widgets m_ui->numberLabel->setEnabled(false); m_ui->numberSpinBox->setEnabled(false); + m_ui->rowsSpinBox->setEnabled(false); } else { KConfigGroup cfgGroup(m_config.data(), groupname.constData()); if (cfgGroup.isEntryImmutable("Number")) { //number of desktops widgets m_ui->numberLabel->setEnabled(false); m_ui->numberSpinBox->setEnabled(false); + m_ui->rowsSpinBox->setEnabled(false); } } // End check for immutable @@ -246,6 +243,8 @@ void KWinDesktopConfig::defaults() m_ui->wrapAroundBox->setChecked(true); + m_ui->rowsSpinBox->setValue(2); + m_editor->allDefault(); emit changed(true); @@ -259,13 +258,15 @@ void KWinDesktopConfig::load() #ifdef Q_WS_X11 // get number of desktops - NETRootInfo info(QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames); + unsigned long properties[] = {NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout }; + NETRootInfo info(QX11Info::display(), properties, 2); for (int i = 1; i <= maxDesktops; i++) { QString name = QString::fromUtf8(info.desktopName(i)); m_desktopNames << name; m_ui->desktopNames->setName(i, name); } + m_ui->rowsSpinBox->setValue(info.desktopLayoutColumnsRows().height()); #endif // Popup info @@ -306,7 +307,8 @@ void KWinDesktopConfig::save() { // TODO: plasma stuff #ifdef Q_WS_X11 - NETRootInfo info(QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames); + unsigned long properties[] = {NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout }; + NETRootInfo info(QX11Info::display(), properties, 2); // set desktop names for (int i = 1; i <= maxDesktops; i++) { QString desktopName = m_desktopNames[ i -1 ]; @@ -316,10 +318,30 @@ void KWinDesktopConfig::save() info.activate(); } // set number of desktops - info.setNumberOfDesktops(m_ui->numberSpinBox->value()); + const int numberDesktops = m_ui->numberSpinBox->value(); + info.setNumberOfDesktops(numberDesktops); + info.activate(); + int rows =m_ui->rowsSpinBox->value(); + rows = qBound(1, rows, numberDesktops); + // avoid weird cases like having 3 rows for 4 desktops, where the last row is unused + int columns = numberDesktops / rows; + if (numberDesktops % rows > 0) { + columns++; + } + info.setDesktopLayout(NET::OrientationHorizontal, columns, rows, NET::DesktopLayoutCornerTopLeft); info.activate(); XSync(QX11Info::display(), false); + + // save the desktops + QString groupname; + const int screenNumber = DefaultScreen(QX11Info::display()); + if (screenNumber == 0) + groupname = "Desktops"; + else + groupname.sprintf("Desktops-screen-%d", screenNumber); + KConfigGroup group(m_config, groupname); + group.writeEntry("Rows", rows); #endif // Popup info diff --git a/kcmkwin/kwindesktop/main.ui b/kcmkwin/kwindesktop/main.ui index e431d642e5..e8f71ede34 100644 --- a/kcmkwin/kwindesktop/main.ui +++ b/kcmkwin/kwindesktop/main.ui @@ -65,7 +65,7 @@ - false + true Number of rows: @@ -78,7 +78,7 @@ - false + true diff --git a/workspace.cpp b/workspace.cpp index 1d3c5ea88d..5cf293acae 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1093,6 +1093,16 @@ void Workspace::loadDesktopSettings() rootInfo->setDesktopName(i, s.toUtf8().data()); desktop_focus_chain[i-1] = i; } + + int rows = group.readEntry("Rows", 2); + rows = qBound(1, rows, n); + // avoid weird cases like having 3 rows for 4 desktops, where the last row is unused + int columns = n / rows; + if (n % rows > 0) { + columns++; + } + rootInfo->setDesktopLayout(NET::OrientationHorizontal, columns, rows, NET::DesktopLayoutCornerTopLeft); + rootInfo->activate(); _loading_desktop_settings = false; } From 5213c4aff6586cd05658e693606797cbbab55dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 26 Jul 2011 07:55:20 +0200 Subject: [PATCH 06/25] Drop direct rendering setting The advanced compositing option "direct rendering" could only correctly be honored in the case of proprietary NVIDIA drivers. In all other cases playing with the setting was most likely harmful as it could result in inconsistent states and the option not to be honored at all. This patch resolves this issue by moving the detection whether to use a direct rendering context completely into the hands of the set environment variables or the helper program: * if LIBGL_ALWAYS_INDIRECT is set, we use an indirect context * if KWIN_DIRECT_GL is set, we use a direct context * if none of the two are set, we use the helper program, if it returns 0 we create a direct context, otherwise we set LIBGL_ALWAYS_INDIRECT and create an indirect context If a user really wants to influence the behavior the environment variables can be used. REVIEW: 102074 --- compositingprefs.cpp | 11 +++++++++-- kcmkwin/kwincompositing/main.cpp | 6 ------ kcmkwin/kwincompositing/main.ui | 14 ++------------ options.cpp | 2 +- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/compositingprefs.cpp b/compositingprefs.cpp index cf3bc1436b..a6d354a891 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -192,7 +192,8 @@ void CompositingPrefs::detect() } #else // HACK: This is needed for AIGLX - if (qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") != 0) { + const bool forceIndirect = qstrcmp(qgetenv("LIBGL_ALWAYS_INDIRECT"), "1") == 0; + if (!forceIndirect && qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") != 0) { // Start an external helper program that initializes GLX and returns // 0 if we can use direct rendering, and 1 otherwise. // The reason we have to use an external program is that after GLX @@ -201,8 +202,14 @@ void CompositingPrefs::detect() // Direct rendering is preferred, since not all OpenGL extensions are // available with indirect rendering. const QString opengl_test = KStandardDirs::findExe("kwin_opengl_test"); - if (QProcess::execute(opengl_test) != 0) + if (QProcess::execute(opengl_test) != 0) { + mEnableDirectRendering = false; setenv("LIBGL_ALWAYS_INDIRECT", "1", true); + } else { + mEnableDirectRendering = true; + } + } else { + mEnableDirectRendering = !forceIndirect; } if (!hasGlx()) { kDebug(1212) << "No GLX available"; diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index f39ace1730..02d9957744 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -123,7 +123,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList connect(ui.glScaleFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(ui.xrScaleFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(ui.glVSync, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(ui.glShaders, SIGNAL(toggled(bool)), this, SLOT(changed())); @@ -395,7 +394,6 @@ void KWinCompositingConfig::loadAdvancedTab() ui.xrScaleFilter->setCurrentIndex((int)config.readEntry("XRenderSmoothScale", false)); ui.glScaleFilter->setCurrentIndex(config.readEntry("GLTextureFilter", 2)); - ui.glDirect->setChecked(config.readEntry("GLDirect", mDefaultPrefs.enableDirectRendering())); ui.glVSync->setChecked(config.readEntry("GLVSync", mDefaultPrefs.enableVSync())); ui.glShaders->setChecked(!config.readEntry("GLLegacy", false)); @@ -551,8 +549,6 @@ bool KWinCompositingConfig::saveAdvancedTab() if (config.readEntry("Backend", "OpenGL") != ((ui.compositingType->currentIndex() == OPENGL_INDEX) ? "OpenGL" : "XRender") - || config.readEntry("GLDirect", mDefaultPrefs.enableDirectRendering()) - != ui.glDirect->isChecked() || config.readEntry("GLVSync", mDefaultPrefs.enableVSync()) != ui.glVSync->isChecked() || config.readEntry("GLLegacy", false) == ui.glShaders->isChecked()) { m_showConfirmDialog = true; @@ -569,7 +565,6 @@ bool KWinCompositingConfig::saveAdvancedTab() config.writeEntry("XRenderSmoothScale", ui.xrScaleFilter->currentIndex() == 1); config.writeEntry("GLTextureFilter", ui.glScaleFilter->currentIndex()); - config.writeEntry("GLDirect", ui.glDirect->isChecked()); config.writeEntry("GLVSync", ui.glVSync->isChecked()); config.writeEntry("GLLegacy", !ui.glShaders->isChecked()); @@ -721,7 +716,6 @@ void KWinCompositingConfig::defaults() ui.unredirectFullscreen->setChecked(false); ui.xrScaleFilter->setCurrentIndex(0); ui.glScaleFilter->setCurrentIndex(2); - ui.glDirect->setChecked(mDefaultPrefs.enableDirectRendering()); ui.glVSync->setChecked(mDefaultPrefs.enableVSync()); ui.glShaders->setChecked(true); } diff --git a/kcmkwin/kwincompositing/main.ui b/kcmkwin/kwincompositing/main.ui index ed3da09314..4954ceff5c 100644 --- a/kcmkwin/kwincompositing/main.ui +++ b/kcmkwin/kwincompositing/main.ui @@ -771,17 +771,7 @@ p, li { white-space: pre-wrap; } true - - - - Enable direct rendering - - - false - - - - + Use VSync @@ -791,7 +781,7 @@ p, li { white-space: pre-wrap; } - + If enabled all rendering will be performed with Shaders written in the OpenGL Shading Language. diff --git a/options.cpp b/options.cpp index 09a3163e27..8cd8a87ab5 100644 --- a/options.cpp +++ b/options.cpp @@ -320,7 +320,7 @@ void Options::reloadCompositingSettings(bool force) prefs.detect(); useCompositing = config.readEntry("Enabled" , prefs.recommendCompositing()); - glDirect = config.readEntry("GLDirect", prefs.enableDirectRendering()); + glDirect = prefs.enableDirectRendering(); glVSync = config.readEntry("GLVSync", prefs.enableVSync()); glSmoothScale = qBound(-1, config.readEntry("GLTextureFilter", 2), 2); glStrictBinding = config.readEntry("GLStrictBinding", prefs.strictBinding()); From e9852011145090900a1c5dc7a66945349b47415a Mon Sep 17 00:00:00 2001 From: Arthur Arlt Date: Tue, 2 Aug 2011 14:13:08 +0200 Subject: [PATCH 07/25] Fix broken build if tiling is disabled --- workspace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 5cf293acae..25b766e162 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -573,9 +573,9 @@ Client* Workspace::createClient(Window w, bool is_mapped) return NULL; } addClient(c, Allowed); - +#ifdef KWIN_BUILD_TILING m_tiling->createTile(c); - +#endif return c; } From ca2a019bc8c71f088683ce797538b51e6f89652e Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 2 Aug 2011 15:09:31 +0200 Subject: [PATCH 08/25] Add option to make login effect fade via black instead of a long transition to your desktop. Nuno has to decide whether the new option will become default or not, for now it is disabled by default. You can enable it in effects kcm, now Login effect has a configuration dialog. It does not (yet) however check for non-fullscreen effects, so they might look weird when this is enabled. REVIEW: 101812 CCMAIL: nuno@oxygen-icons.org --- effects/configs_builtins.cpp | 2 + effects/login/CMakeLists.txt | 14 +++++ effects/login/login.cpp | 25 ++++++++- effects/login/login.desktop | 90 +----------------------------- effects/login/login.h | 2 + effects/login/login_config.cpp | 81 +++++++++++++++++++++++++++ effects/login/login_config.desktop | 9 +++ effects/login/login_config.h | 57 +++++++++++++++++++ effects/login/login_config.ui | 38 +++++++++++++ 9 files changed, 229 insertions(+), 89 deletions(-) create mode 100644 effects/login/login_config.cpp create mode 100644 effects/login/login_config.desktop create mode 100644 effects/login/login_config.h create mode 100644 effects/login/login_config.ui diff --git a/effects/configs_builtins.cpp b/effects/configs_builtins.cpp index ba3b52e77f..0bd2592f6d 100644 --- a/effects/configs_builtins.cpp +++ b/effects/configs_builtins.cpp @@ -26,6 +26,7 @@ along with this program. If not, see . #include "dashboard/dashboard_config.h" #include "desktopgrid/desktopgrid_config.h" #include "diminactive/diminactive_config.h" +#include "login/login_config.h" #include "magiclamp/magiclamp_config.h" #include "translucency/translucency_config.h" #include "presentwindows/presentwindows_config.h" @@ -65,6 +66,7 @@ KWIN_EFFECT_CONFIG_MULTIPLE(builtins, KWIN_EFFECT_CONFIG_SINGLE(dashboard, DashboardEffectConfig) KWIN_EFFECT_CONFIG_SINGLE(desktopgrid, DesktopGridEffectConfig) KWIN_EFFECT_CONFIG_SINGLE(diminactive, DimInactiveEffectConfig) + KWIN_EFFECT_CONFIG_SINGLE(login, LoginEffectConfig) KWIN_EFFECT_CONFIG_SINGLE(magiclamp, MagicLampEffectConfig) KWIN_EFFECT_CONFIG_SINGLE(presentwindows, PresentWindowsEffectConfig) KWIN_EFFECT_CONFIG_SINGLE(resize, ResizeEffectConfig) diff --git a/effects/login/CMakeLists.txt b/effects/login/CMakeLists.txt index a7cbbf3ce0..a60ad04efb 100644 --- a/effects/login/CMakeLists.txt +++ b/effects/login/CMakeLists.txt @@ -10,3 +10,17 @@ set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} install( FILES login/login.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) + +####################################### +# Config + +# Source files +set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources} + login/login_config.cpp + login/login_config.ui + ) + +# .desktop files +install( FILES + login/login_config.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/kwin ) \ No newline at end of file diff --git a/effects/login/login.cpp b/effects/login/login.cpp index e1d934e236..e4f8fdd17d 100644 --- a/effects/login/login.cpp +++ b/effects/login/login.cpp @@ -22,6 +22,8 @@ along with this program. If not, see . #include +#include + namespace KWin { @@ -31,6 +33,7 @@ LoginEffect::LoginEffect() : progress(1.0) , login_window(NULL) { + reconfigure(ReconfigureAll); connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*))); } @@ -61,8 +64,19 @@ void LoginEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int void LoginEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) { - if (w == login_window && progress != 1.0) - data.opacity *= (1.0 - progress); + if (w == login_window) { + if (m_fadeToBlack) { + if (progress < 0.5) + data.brightness *= (1.0 - progress * 2); + if (progress >= 0.5) { + data.opacity *= (1.0 - (progress - 0.5) * 2); + data.brightness = 0; + } + } else if (progress < 1.0) { + data.opacity *= (1.0 - progress); + } + } + effects->paintWindow(w, mask, region, data); } @@ -73,6 +87,12 @@ void LoginEffect::postPaintScreen() effects->postPaintScreen(); } +void LoginEffect::reconfigure(ReconfigureFlags) +{ + KConfigGroup conf = effects->effectConfig("Login"); + m_fadeToBlack = (conf.readEntry("FadeToBlack", true)); +} + void LoginEffect::slotWindowClosed(EffectWindow* w) { if (isLoginSplash(w)) { @@ -81,6 +101,7 @@ void LoginEffect::slotWindowClosed(EffectWindow* w) login_window = w; login_window->refWindow(); progress = 0.0; + effects->addRepaintFull(); } } diff --git a/effects/login/login.desktop b/effects/login/login.desktop index 76c716bf70..1cb215ef93 100644 --- a/effects/login/login.desktop +++ b/effects/login/login.desktop @@ -1,89 +1,5 @@ [Desktop Entry] Name=Login -Name[af]=Aanteken -Name[ar]=ولوج -Name[ast]=Accesu -Name[be]=Уваход -Name[be@latin]=Uvachod -Name[bg]=Вход -Name[bn]=লগ-ইন -Name[bn_IN]=লগ-ইন করুন -Name[bs]=Prijava -Name[ca]=Entrada -Name[ca@valencia]=Entrada -Name[cs]=Přihlášení -Name[csb]=Logòwanié -Name[da]=Login -Name[de]=Anmelden -Name[el]=Σύνδεση -Name[en_GB]=Login -Name[eo]=Ensaluto -Name[es]=Acceso -Name[et]=Sisselogimine -Name[eu]=Saio hasiera -Name[fi]=Sisäänkirjautuminen -Name[fr]=Connexion -Name[fy]=Ynlogge -Name[ga]=Logáil Isteach -Name[gl]=Acceso -Name[gu]=પ્રવેશ -Name[he]=כניסה -Name[hi]=लॉगइन -Name[hne]=लागइन -Name[hr]=Prijava -Name[hsb]=Přizjewjenje -Name[hu]=Bejelentkezés -Name[ia]=Accesso de identification -Name[id]=Log Masuk -Name[is]=Innskráning -Name[it]=Accesso -Name[ja]=ログイン -Name[kk]=Кіру -Name[km]=ចូល -Name[kn]=ಪ್ರವೇಶಿಸು (ಲಾಗಿನ್) -Name[ko]=로그인 -Name[ku]=Têketin -Name[lt]=Prisijungti -Name[lv]=Pieteikties -Name[mai]=लागिन -Name[mk]=Најавување -Name[ml]=അകത്തുകയറുക -Name[mr]=दाखलन -Name[nb]=Logg inn -Name[nds]=Anmellen -Name[ne]=लगइन गर्नुहोस् -Name[nl]=Aanmelden -Name[nn]=Innlogging -Name[oc]=Connexion -Name[or]=ଲଗଇନ -Name[pa]=ਲਾਗਇਨ -Name[pl]=Logowanie -Name[pt]=Arranque -Name[pt_BR]=Início de sessão -Name[ro]=Autentificare -Name[ru]=Вход в систему -Name[se]=Sisačáliheapmi -Name[si]=පිවිසුම -Name[sk]=Prihlásenie -Name[sl]=Prijava -Name[sr]=Пријава -Name[sr@ijekavian]=Пријава -Name[sr@ijekavianlatin]=Prijava -Name[sr@latin]=Prijava -Name[sv]=Inloggning -Name[ta]=நுழைக -Name[te]=లాగిన్ -Name[tg]=Воридот -Name[th]=ลงบันทึกเข้าระบบ -Name[tr]=Giriş -Name[ug]=تىزىمغا كىر -Name[uk]=Вхід -Name[uz]=Kirish -Name[uz@cyrillic]=Кириш -Name[wa]=Elodjaedje -Name[x-test]=xxLoginxx -Name[zh_CN]=登录 -Name[zh_TW]=登入 Icon=preferences-system-windows-effect-login Comment=Smoothly fade to the desktop when logging in Comment[ar]=اظهار سطح المكتب بنعومة عند الولوج @@ -153,10 +69,10 @@ Comment[zh_TW]=登入時平順地淡入桌面 Type=Service X-KDE-ServiceTypes=KWin/Effect -X-KDE-PluginInfo-Author=Lubos Lunak -X-KDE-PluginInfo-Email=l.lunak@kde.org +X-KDE-PluginInfo-Author=Lubos Lunak, Kai Uwe Broulik +X-KDE-PluginInfo-Email=l.lunak@kde.org, kde@privat.broulik.de X-KDE-PluginInfo-Name=kwin4_effect_login -X-KDE-PluginInfo-Version=0.1.0 +X-KDE-PluginInfo-Version=0.1.1 X-KDE-PluginInfo-Category=Appearance X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL diff --git a/effects/login/login.h b/effects/login/login.h index b1735a328f..67b4d7ec9f 100644 --- a/effects/login/login.h +++ b/effects/login/login.h @@ -37,6 +37,7 @@ public: virtual void postPaintScreen(); virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time); virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); + virtual void reconfigure(ReconfigureFlags); public Q_SLOTS: void slotWindowClosed(EffectWindow *w); @@ -45,6 +46,7 @@ private: bool isLoginSplash(EffectWindow* w); double progress; // 0-1 EffectWindow* login_window; + bool m_fadeToBlack; }; } // namespace diff --git a/effects/login/login_config.cpp b/effects/login/login_config.cpp new file mode 100644 index 0000000000..e8e070092d --- /dev/null +++ b/effects/login/login_config.cpp @@ -0,0 +1,81 @@ +/******************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + + Copyright (C) 2010 Martin Gräßlin + Copyright (C) 2011 Kai Uwe Broulik + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ +#include "login_config.h" +#include + +#include + +#include + +namespace KWin +{ + +KWIN_EFFECT_CONFIG_FACTORY + +LoginEffectConfigForm::LoginEffectConfigForm(QWidget* parent) : QWidget(parent) +{ + setupUi(this); +} + +LoginEffectConfig::LoginEffectConfig(QWidget* parent, const QVariantList& args) : + KCModule(EffectFactory::componentData(), parent, args) +{ + m_ui = new LoginEffectConfigForm(this); + + QVBoxLayout* layout = new QVBoxLayout(this); + + layout->addWidget(m_ui); + + connect(m_ui->fadetoblackBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); + + load(); +} + +void LoginEffectConfig::load() +{ + KCModule::load(); + + KConfigGroup conf = EffectsHandler::effectConfig("Login"); + m_ui->fadetoblackBox->setChecked(conf.readEntry("FadeToBlack", true)); + + emit changed(false); +} + +void LoginEffectConfig::save() +{ + KConfigGroup conf = EffectsHandler::effectConfig("Login"); + conf.writeEntry("FadeToBlack", m_ui->fadetoblackBox->isChecked()); + + conf.sync(); + + emit changed(false); + EffectsHandler::sendReloadMessage("login"); +} + +void LoginEffectConfig::defaults() +{ + m_ui->fadetoblackBox->setChecked(true); + emit changed(true); +} + +} // namespace + +#include "login_config.moc" \ No newline at end of file diff --git a/effects/login/login_config.desktop b/effects/login/login_config.desktop new file mode 100644 index 0000000000..f20f47aca8 --- /dev/null +++ b/effects/login/login_config.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +X-KDE-ServiceTypes=KCModule + +X-KDE-Library=kcm_kwin4_effect_builtins +X-KDE-ParentComponents=kwin4_effect_login +X-KDE-PluginKeyword=login + +Name=Login \ No newline at end of file diff --git a/effects/login/login_config.h b/effects/login/login_config.h new file mode 100644 index 0000000000..892154a184 --- /dev/null +++ b/effects/login/login_config.h @@ -0,0 +1,57 @@ +/******************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + + Copyright (C) 2010 Martin Gräßlin + Copyright (C) 2011 Kai Uwe Broulik + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ + +#ifndef KWIN_LOGIN_CONFIG_H +#define KWIN_LOGIN_CONFIG_H + +#include + +#include "ui_login_config.h" + + +namespace KWin +{ + +class LoginEffectConfigForm : public QWidget, public Ui::LoginEffectConfigForm +{ + Q_OBJECT +public: + explicit LoginEffectConfigForm(QWidget* parent = 0); +}; + +class LoginEffectConfig : public KCModule +{ + Q_OBJECT +public: + explicit LoginEffectConfig(QWidget* parent = 0, const QVariantList& args = QVariantList()); + +public slots: + virtual void save(); + virtual void load(); + virtual void defaults(); + +private: + LoginEffectConfigForm* m_ui; +}; + +} // namespace + +#endif \ No newline at end of file diff --git a/effects/login/login_config.ui b/effects/login/login_config.ui new file mode 100644 index 0000000000..c45845ae8f --- /dev/null +++ b/effects/login/login_config.ui @@ -0,0 +1,38 @@ + + + KWin::LoginEffectConfigForm + + + + 0 + 0 + 400 + 160 + + + + + + + Fade to black (fullscreen splash screens only) + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + \ No newline at end of file From 79844f0ae70661ec4f6cebada72d63d21db68ea5 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 2 Aug 2011 15:14:55 +0200 Subject: [PATCH 09/25] Disable new login effect. I could swear I disabled the effect by default. --- effects/login/login.cpp | 2 +- effects/login/login_config.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/login/login.cpp b/effects/login/login.cpp index e4f8fdd17d..fd26f52142 100644 --- a/effects/login/login.cpp +++ b/effects/login/login.cpp @@ -90,7 +90,7 @@ void LoginEffect::postPaintScreen() void LoginEffect::reconfigure(ReconfigureFlags) { KConfigGroup conf = effects->effectConfig("Login"); - m_fadeToBlack = (conf.readEntry("FadeToBlack", true)); + m_fadeToBlack = (conf.readEntry("FadeToBlack", false)); } void LoginEffect::slotWindowClosed(EffectWindow* w) diff --git a/effects/login/login_config.cpp b/effects/login/login_config.cpp index e8e070092d..b1b814e7dd 100644 --- a/effects/login/login_config.cpp +++ b/effects/login/login_config.cpp @@ -54,7 +54,7 @@ void LoginEffectConfig::load() KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("Login"); - m_ui->fadetoblackBox->setChecked(conf.readEntry("FadeToBlack", true)); + m_ui->fadetoblackBox->setChecked(conf.readEntry("FadeToBlack", false)); emit changed(false); } From 664aaa1b60c5da28f684f6ab231625d59f661762 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:21:56 +0200 Subject: [PATCH 10/25] ++ prefix for non-trivial data-types change suffix ++ to prefix ++ to speed up a little bit not-trivial data-types. discovered by cppcheck REVIEW: 102057 --- clientgroup.cpp | 2 +- clients/oxygen/oxygenexceptionlist.cpp | 2 +- effects/presentwindows/presentwindows.cpp | 2 +- effects/slidingpopups/slidingpopups.cpp | 6 +++--- libkwineffects/kwineffects.cpp | 6 +++--- useractions.cpp | 2 +- workspace.cpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/clientgroup.cpp b/clientgroup.cpp index f8604b60ed..abf6e6384d 100644 --- a/clientgroup.cpp +++ b/clientgroup.cpp @@ -270,7 +270,7 @@ void ClientGroup::setVisible(Client* c) void ClientGroup::updateStates(Client* main, Client* only) { - for (ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++) + for (ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); ++i) if ((*i) != main && (!only || (*i) == only)) { if ((*i)->isMinimized() != main->isMinimized()) { if (main->isMinimized()) diff --git a/clients/oxygen/oxygenexceptionlist.cpp b/clients/oxygen/oxygenexceptionlist.cpp index 652dda0c79..c7677bf413 100644 --- a/clients/oxygen/oxygenexceptionlist.cpp +++ b/clients/oxygen/oxygenexceptionlist.cpp @@ -65,7 +65,7 @@ namespace Oxygen // also add exceptions int index(0); - for( ExceptionList::const_iterator iter = constBegin(); iter != constEnd(); iter++, index++ ) + for( ExceptionList::const_iterator iter = constBegin(); iter != constEnd(); ++iter, index++ ) { KConfigGroup group( &config, exceptionGroupName( index ) ); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index a0e830600c..0dd07448de 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -236,7 +236,7 @@ void PresentWindowsEffect::postPaintScreen() while (i != m_windowData.end()) { delete i.value().textFrame; delete i.value().iconFrame; - i++; + ++i; } m_windowData.clear(); diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 34bdac4049..4ffd3e2c17 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -58,18 +58,18 @@ void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags) QHash< const EffectWindow*, QTimeLine* >::iterator it = mAppearingWindows.begin(); while (it != mAppearingWindows.end()) { it.value()->setDuration(animationTime(mFadeInTime)); - it++; + ++it; } it = mDisappearingWindows.begin(); while (it != mDisappearingWindows.end()) { it.value()->setDuration(animationTime(mFadeOutTime)); - it++; + ++it; } QHash< const EffectWindow*, Data >::iterator wIt = mWindowsData.begin(); while (wIt != mWindowsData.end()) { wIt.value().fadeInDuration = mFadeInTime; wIt.value().fadeOutDuration = mFadeOutTime; - wIt++; + ++wIt; } } diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index e0c5538ceb..57e29db43a 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -847,7 +847,7 @@ void WindowMotionManager::calculate(int time) // Just skip it completely if the user wants no animation m_movingWindowsSet.clear(); QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); motion->translation.finish(); motion->scale.finish(); @@ -855,7 +855,7 @@ void WindowMotionManager::calculate(int time) } QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); EffectWindow *window = it.key(); int stopped = 0; @@ -904,7 +904,7 @@ void WindowMotionManager::calculate(int time) void WindowMotionManager::reset() { QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); EffectWindow *window = it.key(); motion->translation.setTarget(window->pos()); diff --git a/useractions.cpp b/useractions.cpp index b6ee9a63e1..cb5e237ad6 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -424,7 +424,7 @@ void Workspace::groupTabPopupAboutToShow() return; add_tabs_popup->clear(); int index = 0; - for (QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); i++, index++) { + for (QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); ++i, index++) { if (!(*i)->contains(active_popup_client)) { QAction* action = add_tabs_popup->addAction((*i)->visible()->caption()); action->setData(index); diff --git a/workspace.cpp b/workspace.cpp index 25b766e162..6195639bbf 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -989,7 +989,7 @@ void Workspace::slotReconfigure() // If the new decoration doesn't supports tabs then ungroup clients if (!decorationSupportsClientGrouping()) { QList tmpGroups = clientGroups; // Prevent crashing - for (QList::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); i++) + for (QList::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); ++i) (*i)->removeAll(); } mgr->destroyPreviousPlugin(); From 16bcfb0114cee8e2617f94a1eefab60849f10657 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:23:40 +0200 Subject: [PATCH 11/25] Avoid a null pointer dereference Do not use deco pointer until we are sure it is not null. REVIEW: 102057 --- tools/decobenchmark/preview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/decobenchmark/preview.cpp b/tools/decobenchmark/preview.cpp index 36cfcd17ca..429cbd2f4b 100644 --- a/tools/decobenchmark/preview.cpp +++ b/tools/decobenchmark/preview.cpp @@ -115,11 +115,11 @@ bool KDecorationPreview::recreateDecoration() { delete deco; deco = m_plugin->createDecoration(bridge); - deco->init(); if (!deco) return false; + deco->init(); positionPreviews(); deco->widget()->show(); From 646954ed9d279018fe2ca67be562241252939738 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:24:38 +0200 Subject: [PATCH 12/25] rules must never be null if rules were null, it was pointing to a local structure, prabably a crash after leaving if rules where used. REVIEW: 102057 --- kcmkwin/kwinrules/ruleswidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index c3a44df185..d79ab30576 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -384,8 +384,9 @@ static NET::WindowType comboToType(int val) void RulesWidget::setRules(Rules* rules) { Rules tmp; - if (rules == NULL) - rules = &tmp; // empty + + Q_ASSERT( rules ); + description->setText(rules->description); wmclass->setText(rules->wmclass); whole_wmclass->setChecked(rules->wmclasscomplete); From 26a492eb4aa3d095f7ff687da072467b5887b1e2 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:26:21 +0200 Subject: [PATCH 13/25] reduce the scope of two variables reduce the scope of two variables REVIEW: 102057 --- effects/blur/blurshader.cpp | 2 +- effects/coverswitch/coverswitch.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/effects/blur/blurshader.cpp b/effects/blur/blurshader.cpp index e7e5bf3e86..decd430e15 100644 --- a/effects/blur/blurshader.cpp +++ b/effects/blur/blurshader.cpp @@ -193,13 +193,13 @@ void GLSLBlurShader::unbind() int GLSLBlurShader::maxKernelSize() const { - int value; #ifdef KWIN_HAVE_OPENGLES // GL_MAX_VARYING_FLOATS not available in GLES // querying for GL_MAX_VARYING_VECTORS crashes on nouveau // using the minimum value of 8 return 8 * 2; #else + int value; glGetIntegerv(GL_MAX_VARYING_FLOATS, &value); // Maximum number of vec4 varyings * 2 // The code generator will pack two vec2's into each vec4. diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index 6bc98b3a02..4ffa40c980 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -775,7 +775,6 @@ void CoverSwitchEffect::paintFrontWindow(EffectWindow* frontWindow, int width, i { if (frontWindow == NULL) return; - float distance = 0.0; bool specialHandlingForward = false; WindowPaintData data(frontWindow); data.xTranslate = area.width() * 0.5 - frontWindow->geometry().x() - frontWindow->geometry().width() * 0.5; @@ -788,7 +787,8 @@ void CoverSwitchEffect::paintFrontWindow(EffectWindow* frontWindow, int width, i rightWindows = 1; } if (animation) { - if (direction == Right) { + float distance = 0.0; + if (direction == Right) { // move to right distance = -frontWindow->geometry().width() * 0.5f + area.width() * 0.5f + (((float)displayWidth() * 0.5 * scaleFactor) - (float)area.width() * 0.5f) / rightWindows; From c7004ca3b772eb8bd728ca8e8bf3b56096ff6f11 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:27:06 +0200 Subject: [PATCH 14/25] remove a memory leak When the library is not loaded right, delete the pointer to it. It must be safe, the destructor does nothing. REVIEW: 102057 --- effects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/effects.cpp b/effects.cpp index 45233136f8..0c7701db54 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1124,6 +1124,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault) KLibrary::void_function_ptr version_func = library->resolveFunction(version_symbol.toAscii()); if (version_func == NULL) { kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring."; + delete library; return false; } typedef int (*t_versionfunc)(); @@ -1134,6 +1135,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault) || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) { kWarning(1212) << "Effect " << name << " requires unsupported API version " << version; + delete library; return false; } From 1f89dcf25d52136749b4e56ff9018d63d3c49171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 2 Aug 2011 19:44:35 +0200 Subject: [PATCH 15/25] All effects need to link X11 The Plasma Active build of kwin was broken because of that. We really should get the effects X free... --- effects/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 986f5921c9..00ad0c0ce4 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -5,7 +5,7 @@ kde4_no_enable_final(kwineffects) #add_subdirectory( _test ) macro( KWIN4_ADD_EFFECT_BACKEND name ) kde4_add_plugin( ${name} ${ARGN} ) - target_link_libraries( ${name} kwineffects ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${X11_Xfixes_LIB} ${X11_Xcursor_LIB}) + target_link_libraries( ${name} kwineffects ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${X11_Xfixes_LIB} ${X11_Xcursor_LIB} ${X11_LIBRARIES}) endmacro( KWIN4_ADD_EFFECT_BACKEND ) # Adds effect plugin with given name. Sources are given after the name @@ -50,12 +50,12 @@ endmacro( KWIN4_ADD_EFFECT_CONFIG ) macro( KWIN4_EFFECT_LINK_XRENDER name ) if( KWIN_HAVE_XRENDER_COMPOSITING ) - target_link_libraries( kwin4_effect_${name} ${X11_Xrender_LIB} ${X11_LIBRARIES} ) + target_link_libraries( kwin4_effect_${name} ${X11_Xrender_LIB} ) # if building for OpenGL and OpenGL ES we have two targets # TODO: if building for OpenGL ES we should not build XRender support if(OPENGLES_FOUND) - target_link_libraries( kwin4_effect_gles_${name} ${X11_Xrender_LIB} ${X11_LIBRARIES} ) + target_link_libraries( kwin4_effect_gles_${name} ${X11_Xrender_LIB} ) endif(OPENGLES_FOUND) endif( KWIN_HAVE_XRENDER_COMPOSITING ) endmacro( KWIN4_EFFECT_LINK_XRENDER ) From 734052a784433cf7c6c0545449f88b386395de86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 24 Jul 2011 23:04:06 +0200 Subject: [PATCH 16/25] implement and fix scaled XRender shadows (cherry picked from commit 5fa1a06fd8fdd3081a48ba921b2e670a60a49695) --- scene_xrender.cpp | 255 ++++++++++++++++++++++------------------------ scene_xrender.h | 2 +- 2 files changed, 125 insertions(+), 132 deletions(-) diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 7cd6f0644c..73dd22f685 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -475,8 +475,7 @@ QPoint SceneXrender::Window::mapToScreen(int mask, const WindowPaintData &data, return pt; } -void SceneXrender::Window::prepareTempPixmap(const QPixmap *left, const QPixmap *top, - const QPixmap *right, const QPixmap *bottom) +void SceneXrender::Window::prepareTempPixmap() { const QRect r = static_cast(toplevel)->decorationRect(); @@ -490,18 +489,7 @@ void SceneXrender::Window::prepareTempPixmap(const QPixmap *left, const QPixmap Pixmap pix = XCreatePixmap(display(), rootWindow(), temp_pixmap->width(), temp_pixmap->height(), DefaultDepth(display(), DefaultScreen(display()))); *temp_pixmap = QPixmap::fromX11Pixmap(pix); } - temp_pixmap->fill(Qt::transparent); - - Display *dpy = display(); - XRenderComposite(dpy, PictOpSrc, top->x11PictureHandle(), None, temp_pixmap->x11PictureHandle(), - 0, 0, 0, 0, 0, 0, top->width(), top->height()); - XRenderComposite(dpy, PictOpSrc, left->x11PictureHandle(), None, temp_pixmap->x11PictureHandle(), - 0, 0, 0, 0, 0, top->height(), left->width(), left->height()); - XRenderComposite(dpy, PictOpSrc, right->x11PictureHandle(), None, temp_pixmap->x11PictureHandle(), - 0, 0, 0, 0, r.width() - right->width(), top->height(), right->width(), right->height()); - XRenderComposite(dpy, PictOpSrc, bottom->x11PictureHandle(), None, temp_pixmap->x11PictureHandle(), - 0, 0, 0, 0, 0, r.height() - bottom->height(), bottom->width(), bottom->height()); } // paint the window @@ -539,8 +527,7 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat filter = ImageFilterFast; // do required transformations const QRect wr = mapToScreen(mask, data, QRect(0, 0, width(), height())); - const QRect cr = QRect(toplevel->clientPos(), toplevel->clientSize()); // Client rect (in the window) - const QRect dr = mapToScreen(mask, data, cr); // Destination rect + QRect cr = QRect(toplevel->clientPos(), toplevel->clientSize()); // Client rect (in the window) double xscale = 1; double yscale = 1; bool scaled = false; @@ -588,12 +575,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat // transform the shape for clipping in paintTransformedScreen() QVector rects = transformed_shape.rects(); - for (int i = 0; - i < rects.count(); - ++i) { + for (int i = 0; i < rects.count(); ++i) { QRect& r = rects[ i ]; - r = QRect(int(r.x() * xscale), int(r.y() * yscale), - int(r.width() * xscale), int(r.height() * yscale)); + r = QRect(qRound(r.x() * xscale), qRound(r.y() * yscale), + qRound(r.width() * xscale), qRound(r.height() * yscale)); } transformed_shape.setRects(rects.constData(), rects.count()); } @@ -602,6 +587,8 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat PaintClipper pcreg(region); // clip by the region to paint PaintClipper pc(transformed_shape); // clip by window's shape + const bool wantShadow = m_shadow && !m_shadow->shadowRegion().isEmpty() && (isOpaque() || !(mask & PAINT_DECORATION_ONLY)); + // In order to obtain a pixel perfect rescaling // we need to blit the window content togheter with // decorations in a temporary pixmap and scale @@ -610,19 +597,19 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat // the window has border // This solves a number of glitches and on top of this // it optimizes painting quite a bit - bool blitInTempPixmap = false; - if (scaled - && ((client && !client->noBorder()) - || (deleted && !deleted->noBorder()))) { - blitInTempPixmap = true; - } + const bool blitInTempPixmap = scaled && (wantShadow || (client && !client->noBorder()) || (deleted && !deleted->noBorder())); + Picture renderTarget = buffer; - if (!blitInTempPixmap) { + if (blitInTempPixmap) { + prepareTempPixmap(); + renderTarget = temp_pixmap->x11PictureHandle(); + } else { XRenderSetPictureTransform(display(), pic, &xform); if (filter == ImageFilterGood) { XRenderSetPictureFilter(display(), pic, const_cast("good"), NULL, 0); } + //BEGIN OF STUPID RADEON HACK // This is needed to avoid hitting a fallback in the radeon driver. // The Render specification states that sampling pixels outside the // source picture results in alpha=0 pixels. This can be achieved by @@ -637,133 +624,133 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat attr.repeat = RepeatPad; XRenderChangePicture(display(), pic, CPRepeat, &attr); } + //END OF STUPID RADEON HACK } +#define MAP_RECT_TO_TARGET(_RECT_) \ + if (blitInTempPixmap) _RECT_.translate(-decorationRect.topLeft()); else _RECT_ = mapToScreen(mask, data, _RECT_) + + //BEGIN deco preparations + QRect decorationRect; + bool noBorder = true; + const QPixmap *left = NULL; + const QPixmap *top = NULL; + const QPixmap *right = NULL; + const QPixmap *bottom = NULL; + QRect dtr, dlr, drr, dbr; + if (client || deleted) { + if (client && !client->noBorder()) { + client->ensureDecorationPixmapsPainted(); + noBorder = client->noBorder(); + left = client->leftDecoPixmap(); + top = client->topDecoPixmap(); + right = client->rightDecoPixmap(); + bottom = client->bottomDecoPixmap(); + client->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative); + decorationRect = client->decorationRect(); + } + if (deleted && !deleted->noBorder()) { + noBorder = deleted->noBorder(); + left = deleted->leftDecoPixmap(); + top = deleted->topDecoPixmap(); + right = deleted->rightDecoPixmap(); + bottom = deleted->bottomDecoPixmap(); + deleted->layoutDecorationRects(dlr, dtr, drr, dbr); + decorationRect = deleted->decorationRect(); + } + if (!noBorder) { + MAP_RECT_TO_TARGET(dtr); + MAP_RECT_TO_TARGET(dlr); + MAP_RECT_TO_TARGET(drr); + MAP_RECT_TO_TARGET(dbr); + } + } + //END deco preparations + + //BEGIN shadow preparations QRect stlr, str, strr, srr, sbrr, sbr, sblr, slr; - Picture shadowAlpha; SceneXRenderShadow* m_xrenderShadow = static_cast(m_shadow); - const bool wantShadow = m_shadow && !m_shadow->shadowRegion().isEmpty() && (isOpaque() || !(mask & PAINT_DECORATION_ONLY)); + if (wantShadow) { m_xrenderShadow->layoutShadowRects(str, strr, srr, sbrr, sbr, sblr, slr, stlr); - shadowAlpha = alphaMask(data.opacity); - if (!scaled) { - stlr = mapToScreen(mask, data, stlr); - str = mapToScreen(mask, data, str); - strr = mapToScreen(mask, data, strr); - srr = mapToScreen(mask, data, srr); - sbrr = mapToScreen(mask, data, sbrr); - sbr = mapToScreen(mask, data, sbr); - sblr = mapToScreen(mask, data, sblr); - slr = mapToScreen(mask, data, slr); + MAP_RECT_TO_TARGET(stlr); + MAP_RECT_TO_TARGET(str); + MAP_RECT_TO_TARGET(strr); + MAP_RECT_TO_TARGET(srr); + MAP_RECT_TO_TARGET(sbrr); + MAP_RECT_TO_TARGET(sbr); + MAP_RECT_TO_TARGET(sblr); + MAP_RECT_TO_TARGET(slr); + } + //BEGIN end preparations + + //BEGIN client preparations + QRect dr = cr; + if (blitInTempPixmap) { + dr.translate(-decorationRect.topLeft()); + } else { + dr = mapToScreen(mask, data, dr); // Destination rect + if (scaled) { + cr.moveLeft(cr.x() * xscale); + cr.moveTop(cr.y() * yscale); } - // else TODO } - for (PaintClipper::Iterator iterator; - !iterator.isDone(); - iterator.next()) { + const int clientRenderOp = (opaque || blitInTempPixmap) ? PictOpSrc : PictOpOver; + //END client preparations + +#undef MAP_RECT_TO_TARGET + + for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) { #define RENDER_SHADOW_TILE(_TILE_, _RECT_) \ XRenderComposite(display(), PictOpOver, m_xrenderShadow->x11ShadowPictureHandle(WindowQuadShadow##_TILE_), \ - shadowAlpha, buffer, 0, 0, 0, 0, _RECT_.x(), _RECT_.y(), _RECT_.width(), _RECT_.height()) + shadowAlpha, renderTarget, 0, 0, 0, 0, _RECT_.x(), _RECT_.y(), _RECT_.width(), _RECT_.height()) //shadow if (wantShadow) { - if (!scaled) { - RENDER_SHADOW_TILE(TopLeft, stlr); - RENDER_SHADOW_TILE(Top, str); - RENDER_SHADOW_TILE(TopRight, strr); - RENDER_SHADOW_TILE(Left, slr); - RENDER_SHADOW_TILE(Right, srr); - RENDER_SHADOW_TILE(BottomLeft, sblr); - RENDER_SHADOW_TILE(Bottom, sbr); - RENDER_SHADOW_TILE(BottomRight, sbrr); - } else { - //FIXME: At the moment shadows are not painted for scaled windows - } + Picture shadowAlpha = opaque ? None : alphaMask(data.opacity); + RENDER_SHADOW_TILE(TopLeft, stlr); + RENDER_SHADOW_TILE(Top, str); + RENDER_SHADOW_TILE(TopRight, strr); + RENDER_SHADOW_TILE(Left, slr); + RENDER_SHADOW_TILE(Right, srr); + RENDER_SHADOW_TILE(BottomLeft, sblr); + RENDER_SHADOW_TILE(Bottom, sbr); + RENDER_SHADOW_TILE(BottomRight, sbrr); } - #undef RENDER_SHADOW_TILE - QRect decorationRect; +#define RENDER_DECO_PART(_PART_, _RECT_) \ +XRenderComposite(display(), PictOpOver, _PART_->x11PictureHandle(), decorationAlpha, renderTarget,\ + 0, 0, 0, 0, _RECT_.x(), _RECT_.y(), _RECT_.width(), _RECT_.height()) + if (client || deleted) { - bool noBorder = true; - const QPixmap *left = NULL; - const QPixmap *top = NULL; - const QPixmap *right = NULL; - const QPixmap *bottom = NULL; - QRect tr, lr, rr, br; - if (client && !client->noBorder()) { - noBorder = client->noBorder(); - client->ensureDecorationPixmapsPainted(); - - left = client->leftDecoPixmap(); - top = client->topDecoPixmap(); - right = client->rightDecoPixmap(); - bottom = client->bottomDecoPixmap(); - client->layoutDecorationRects(lr, tr, rr, br, Client::WindowRelative); - decorationRect = client->decorationRect(); - } - if (deleted && !deleted->noBorder()) { - noBorder = deleted->noBorder(); - left = deleted->leftDecoPixmap(); - top = deleted->topDecoPixmap(); - right = deleted->rightDecoPixmap(); - bottom = deleted->bottomDecoPixmap(); - deleted->layoutDecorationRects(lr, tr, rr, br); - decorationRect = deleted->decorationRect(); - } if (!noBorder) { - // Paint the decoration - Picture alpha = alphaMask(data.opacity * data.decoration_opacity); - Display *dpy = display(); - - if (!scaled) { - tr = mapToScreen(mask, data, tr); - lr = mapToScreen(mask, data, lr); - rr = mapToScreen(mask, data, rr); - br = mapToScreen(mask, data, br); - - XRenderComposite(dpy, PictOpOver, top->x11PictureHandle(), alpha, buffer, - 0, 0, 0, 0, tr.x(), tr.y(), tr.width(), tr.height()); - XRenderComposite(dpy, PictOpOver, left->x11PictureHandle(), alpha, buffer, - 0, 0, 0, 0, lr.x(), lr.y(), lr.width(), lr.height()); - XRenderComposite(dpy, PictOpOver, right->x11PictureHandle(), alpha, buffer, - 0, 0, 0, 0, rr.x(), rr.y(), rr.width(), rr.height()); - XRenderComposite(dpy, PictOpOver, bottom->x11PictureHandle(), alpha, buffer, - 0, 0, 0, 0, br.x(), br.y(), br.width(), br.height()); - } else { - prepareTempPixmap(left, top, right, bottom); - // Will blit later - } + Picture decorationAlpha = alphaMask(data.opacity * data.decoration_opacity); + RENDER_DECO_PART(top, dtr); + RENDER_DECO_PART(left, dlr); + RENDER_DECO_PART(right, drr); + RENDER_DECO_PART(bottom, dbr); } } +#undef RENDER_DECO_PART + if (!(mask & PAINT_DECORATION_ONLY)) { // Paint the window contents - if (opaque) { - if (blitInTempPixmap) { - XRenderComposite(display(), PictOpSrc, pic, None, temp_pixmap->x11PictureHandle(), cr.x(), cr.y(), 0, 0, cr.x()-decorationRect.left(), cr.y()-decorationRect.top(), cr.width(), cr.height()); - } else { - XRenderComposite(display(), PictOpSrc, pic, None, buffer, cr.x() * xscale, cr.y() * yscale, 0, 0, dr.x(), dr.y(), dr.width(), dr.height()); - } - } else { - Picture alpha = alphaMask(data.opacity); - if (blitInTempPixmap) { - XRenderComposite(display(), PictOpSrc, pic, alpha, temp_pixmap->x11PictureHandle(), cr.x(), cr.y(), 0, 0, cr.x()-decorationRect.left(), cr.y()-decorationRect.top(), cr.width(), cr.height()); - } else { - XRenderComposite(display(), PictOpOver, pic, alpha, buffer, cr.x() * xscale, cr.y() * yscale, 0, 0, dr.x(), dr.y(), dr.width(), dr.height()); - } + Picture clientAlpha = opaque ? None : alphaMask(data.opacity); + XRenderComposite(display(), clientRenderOp, pic, clientAlpha, renderTarget, cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height()); + if (!opaque) transformed_shape = QRegion(); - } } if (data.brightness < 1.0) { // fake brightness change by overlaying black XRenderColor col = { 0, 0, 0, 0xffff *(1 - data.brightness) * data.opacity }; if (blitInTempPixmap) { - XRenderFillRectangle(display(), PictOpOver, temp_pixmap->x11PictureHandle(), &col, -decorationRect.left(), -decorationRect.top(), width(), height()); + XRenderFillRectangle(display(), PictOpOver, renderTarget, &col, -decorationRect.left(), -decorationRect.top(), width(), height()); } else { - XRenderFillRectangle(display(), PictOpOver, buffer, &col, wr.x(), wr.y(), wr.width(), wr.height()); + XRenderFillRectangle(display(), PictOpOver, renderTarget, &col, wr.x(), wr.y(), wr.width(), wr.height()); } } if (blitInTempPixmap) { @@ -771,7 +758,7 @@ XRenderComposite(display(), PictOpOver, m_xrenderShadow->x11ShadowPictureHandle( XRenderSetPictureTransform(display(), temp_pixmap->x11PictureHandle(), &xform); XRenderSetPictureFilter(display(), temp_pixmap->x11PictureHandle(), const_cast("good"), NULL, 0); XRenderComposite(display(), PictOpOver, temp_pixmap->x11PictureHandle(), alpha, buffer, - 0, 0, 0, 0, r.x(), r.y(), r.width(), r.height()); + 0, 0, 0, 0, r.x(), r.y(), r.width(), r.height()); XRenderSetPictureTransform(display(), temp_pixmap->x11PictureHandle(), &identity); } } @@ -1029,14 +1016,20 @@ void SceneXRenderShadow::buildQuads() QRect stlr, str, strr, srr, sbrr, sbr, sblr, slr; layoutShadowRects(str, strr, srr, sbrr, sbr, sblr, slr, stlr); - m_resizedElements[ShadowElementTop] = shadowPixmap(ShadowElementTop).scaled(str.size()); - m_resizedElements[ShadowElementTopLeft] = shadowPixmap(ShadowElementTopLeft).scaled(stlr.size()); - m_resizedElements[ShadowElementTopRight] = shadowPixmap(ShadowElementTopRight).scaled(strr.size()); - m_resizedElements[ShadowElementLeft] = shadowPixmap(ShadowElementLeft).scaled(slr.size()); - m_resizedElements[ShadowElementRight] = shadowPixmap(ShadowElementRight).scaled(srr.size()); - m_resizedElements[ShadowElementBottom] = shadowPixmap(ShadowElementBottom).scaled(sbr.size()); - m_resizedElements[ShadowElementBottomLeft] = shadowPixmap(ShadowElementBottomLeft).scaled(sblr.size()); - m_resizedElements[ShadowElementBottomRight] = shadowPixmap(ShadowElementBottomRight).scaled(sbrr.size()); + m_resizedElements[ShadowElementTop] = shadowPixmap(ShadowElementTop);//.scaled(str.size()); + m_resizedElements[ShadowElementTopLeft] = shadowPixmap(ShadowElementTopLeft);//.scaled(stlr.size()); + m_resizedElements[ShadowElementTopRight] = shadowPixmap(ShadowElementTopRight);//.scaled(strr.size()); + m_resizedElements[ShadowElementLeft] = shadowPixmap(ShadowElementLeft);//.scaled(slr.size()); + m_resizedElements[ShadowElementRight] = shadowPixmap(ShadowElementRight);//.scaled(srr.size()); + m_resizedElements[ShadowElementBottom] = shadowPixmap(ShadowElementBottom);//.scaled(sbr.size()); + m_resizedElements[ShadowElementBottomLeft] = shadowPixmap(ShadowElementBottomLeft);//.scaled(sblr.size()); + m_resizedElements[ShadowElementBottomRight] = shadowPixmap(ShadowElementBottomRight);//.scaled(sbrr.size()); + XRenderPictureAttributes attr; + attr.repeat = True; + for (int i = 0; i < ShadowElementsCount; ++i) { + XRenderChangePicture(display(), m_resizedElements[i].x11PictureHandle(), CPRepeat, &attr); + } + } } // namespace diff --git a/scene_xrender.h b/scene_xrender.h index f1a81d20e6..6c916c8ccc 100644 --- a/scene_xrender.h +++ b/scene_xrender.h @@ -86,7 +86,7 @@ private: Picture alphaMask(double opacity); QRect mapToScreen(int mask, const WindowPaintData &data, const QRect &rect) const; QPoint mapToScreen(int mask, const WindowPaintData &data, const QPoint &point) const; - void prepareTempPixmap(const QPixmap *left, const QPixmap *top, const QPixmap *right, const QPixmap *bottom); + void prepareTempPixmap(); Picture _picture; XRenderPictFormat* format; Picture alpha; From fe4744c1e97379612a18ff905d7b4d241c2654fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 07:56:30 +0200 Subject: [PATCH 17/25] Single quotes instead of double quotes Krazy-- SVN_SILENT --- effects/windowgeometry/windowgeometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/windowgeometry/windowgeometry.cpp b/effects/windowgeometry/windowgeometry.cpp index 64232ad406..d682751488 100644 --- a/effects/windowgeometry/windowgeometry.cpp +++ b/effects/windowgeometry/windowgeometry.cpp @@ -122,12 +122,12 @@ static inline QString number(int n) QString sign; if (n >= 0) { sign = KGlobal::locale()->positiveSign(); - if (sign.isEmpty()) sign = "+"; + if (sign.isEmpty()) sign = '+'; } else { n = -n; sign = KGlobal::locale()->negativeSign(); - if (sign.isEmpty()) sign = "-"; + if (sign.isEmpty()) sign = '-'; } return sign + QString::number(n); } From 371f5b30e2edce83c88a5f50cfa77c8ee2974eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 07:58:08 +0200 Subject: [PATCH 18/25] Adding missing newlines at end of file Krazy-- SVN_SILENT --- effects/login/login_config.cpp | 2 +- effects/login/login_config.desktop | 2 +- effects/login/login_config.h | 2 +- effects/login/login_config.ui | 2 +- tiling/tiling.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/effects/login/login_config.cpp b/effects/login/login_config.cpp index b1b814e7dd..5a4b57a5cb 100644 --- a/effects/login/login_config.cpp +++ b/effects/login/login_config.cpp @@ -78,4 +78,4 @@ void LoginEffectConfig::defaults() } // namespace -#include "login_config.moc" \ No newline at end of file +#include "login_config.moc" diff --git a/effects/login/login_config.desktop b/effects/login/login_config.desktop index f20f47aca8..803616e95a 100644 --- a/effects/login/login_config.desktop +++ b/effects/login/login_config.desktop @@ -6,4 +6,4 @@ X-KDE-Library=kcm_kwin4_effect_builtins X-KDE-ParentComponents=kwin4_effect_login X-KDE-PluginKeyword=login -Name=Login \ No newline at end of file +Name=Login diff --git a/effects/login/login_config.h b/effects/login/login_config.h index 892154a184..4de44fc5cb 100644 --- a/effects/login/login_config.h +++ b/effects/login/login_config.h @@ -54,4 +54,4 @@ private: } // namespace -#endif \ No newline at end of file +#endif diff --git a/effects/login/login_config.ui b/effects/login/login_config.ui index c45845ae8f..b4b1f307bb 100644 --- a/effects/login/login_config.ui +++ b/effects/login/login_config.ui @@ -35,4 +35,4 @@ - \ No newline at end of file + diff --git a/tiling/tiling.h b/tiling/tiling.h index 694bd9cde6..01b5ff031e 100644 --- a/tiling/tiling.h +++ b/tiling/tiling.h @@ -109,4 +109,4 @@ private Q_SLOTS: }; } -#endif // KWIN_TILING_H \ No newline at end of file +#endif // KWIN_TILING_H From 3232c2cb2a4b6f998b08b7eed9ef6d128d1e5bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 08:10:51 +0200 Subject: [PATCH 19/25] Remove duplicate includes Krazy-- SVN_SILENT --- effects/coverswitch/coverswitch.cpp | 1 - main.cpp | 1 - scene_opengl.cpp | 1 - 3 files changed, 3 deletions(-) diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index 4ffa40c980..45c762138e 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -36,7 +36,6 @@ along with this program. If not, see . #include -#include #include "../boxswitch/boxswitch_proxy.h" namespace KWin diff --git a/main.cpp b/main.cpp index 762446386f..3773063da2 100644 --- a/main.cpp +++ b/main.cpp @@ -39,7 +39,6 @@ along with this program. If not, see . #include #include #include -#include #include #include diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 0980229bb9..22f323f7dd 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -67,7 +67,6 @@ Sources and other compositing managers: */ #include "scene_opengl.h" -#include "kwinglplatform.h" #include From 055b4d032f8132347dfc3959dbaeae8ac3c4ae99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 08:12:50 +0200 Subject: [PATCH 20/25] Include own header first line Krazy-- SVN_SILENT --- overlaywindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlaywindow.cpp b/overlaywindow.cpp index 422dbc68e8..783b02651f 100644 --- a/overlaywindow.cpp +++ b/overlaywindow.cpp @@ -18,10 +18,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -#include - #include "overlaywindow.h" +#include + #include "kwinglobals.h" #include "assert.h" From f72f465c13c2e1e5535e6491173620a0f0d95bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 08:16:12 +0200 Subject: [PATCH 21/25] Fix Typos Krazy-- SVN_SILENT --- effects/blur/blur.cpp | 4 ++-- geometry.cpp | 2 +- scene.cpp | 2 +- scene_opengl.cpp | 2 +- scene_opengl_glx.cpp | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 83012b160d..c8b39b6cbb 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -245,7 +245,7 @@ void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int t } data.clip = newClip; - // we dont have to blur a region we dont see + // we don't have to blur a region we don't see m_currentBlur -= newClip; // if we have to paint a non-opaque part of this window that intersects with the // currently blurred region we have to redraw the whole region @@ -268,7 +268,7 @@ void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int t } m_currentBlur |= expandedBlur; - // we dont consider damaged areas which are occluded and are not + // we don't consider damaged areas which are occluded and are not // explicitly damaged by this window m_damagedArea -= data.clip; m_damagedArea |= data.paint; diff --git a/geometry.cpp b/geometry.cpp index 5c0f303e53..071682ab53 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2631,7 +2631,7 @@ void Client::finishMoveResize(bool cancel) setQuickTileMode(electricMode); const ElectricBorder border = electricBorderFromMode(electricMode); if (border == ElectricNone) - kDebug(1212) << "invalid electric mode" << electricMode << "leading to invalid array acces,\ + kDebug(1212) << "invalid electric mode" << electricMode << "leading to invalid array access,\ this should not have happened!"; #ifdef KWIN_BUILD_SCREENEDGES else diff --git a/scene.cpp b/scene.cpp index eb3e4172ec..8509400dd2 100644 --- a/scene.cpp +++ b/scene.cpp @@ -324,7 +324,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region) // Clip out the client area, so we only draw the rest in the next pass data->region -= data->clip; - // if prePaintWindow didnt change the clipping area we only have to paint + // if prePaintWindow didn't change the clipping area we only have to paint // the decoration if (data-> clip == data.key()->clientShape().translated(data.key()->x(), data.key()->y())) { data->mask |= PAINT_DECORATION_ONLY; diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 22f323f7dd..2346a1ea77 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -656,7 +656,7 @@ void SceneOpenGL::Window::paintDecoration(const QPixmap* decoration, TextureType // This is especially needed if we draw the opaque part of the window // and the decoration in two different passes (as we in Scene::paintSimpleWindow do). // Otherwise we run into the situation that in the first pass there are some - // pending decoration repaints but we dont paint the decoration and in the + // pending decoration repaints but we don't paint the decoration and in the // second pass it's the other way around. if (quads.isEmpty()) return; diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index 5eeb5c7406..9ceeb761db 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -672,7 +672,7 @@ void SceneOpenGL::Texture::bind() { glEnable(mTarget); glBindTexture(mTarget, mTexture); - // if one of the GLTexture::load functions is called, the glxpixmap doesnt + // if one of the GLTexture::load functions is called, the glxpixmap doesn't // have to exist if (options->glStrictBinding && glxpixmap) { glXReleaseTexImageEXT(display(), glxpixmap, GLX_FRONT_LEFT_EXT); @@ -691,7 +691,7 @@ void SceneOpenGL::Texture::unbind() if (hasGLVersion(1, 4, 0)) { glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f); } - // if one of the GLTexture::load functions is called, the glxpixmap doesnt + // if one of the GLTexture::load functions is called, the glxpixmap doesn't // have to exist if (options->glStrictBinding && glxpixmap) { glBindTexture(mTarget, mTexture); From ebdb0f00ff15e20a6709a331e47a2966ed68e0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 08:20:58 +0200 Subject: [PATCH 22/25] Use QLatin1String where possible Krazy-- SVN_SILENT --- effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects.cpp b/effects.cpp index 0c7701db54..b23e5d8c64 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1041,7 +1041,7 @@ KLibrary* EffectsHandlerImpl::findEffectLibrary(KService* service) { QString libname = service->library(); #ifdef KWIN_HAVE_OPENGLES - if (libname.startsWith("kwin4_effect_")) { + if (libname.startsWith(QLatin1String("kwin4_effect_"))) { libname.replace("kwin4_effect_", "kwin4_effect_gles_"); } #endif From df756448173e169122305c0be3792af669530dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 16:39:36 +0200 Subject: [PATCH 23/25] Fix compilation with OpenGL ES and without OpenGL If we have OpenGL ES but not OpenGL the KWIN_HAVE_OPENGL is set causing the first compile pass to fail as it tries to build against OpenGL. As a solution the first pass links against OpenGL ES if OpenGL is not found. This means both kwin and kwin_gles are built against GLES. --- CMakeLists.txt | 3 +++ effects/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7efb982392..56d6130819 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,9 @@ if(OPENGL_FOUND) endif(DL_LIBRARY) # must be after opengl, to be initialized first by the linker target_link_libraries(kdeinit_kwin kwinnvidiahack) +elseif(OPENGLES_FOUND) + target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(OPENGL_FOUND) install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 00ad0c0ce4..3af7a6f365 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -16,6 +16,9 @@ macro( KWIN4_ADD_EFFECT name ) if(OPENGL_FOUND) target_link_libraries(kwin4_effect_${name} kwinglutils) set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL) + elseif(OPENGLES_FOUND) + target_link_libraries(kwin4_effect_${name} kwinglesutils) + set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(OPENGL_FOUND) install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} ) endif(OPENGL_FOUND OR NOT(OPENGL_FOUND AND OPENGLES_FOUND)) From 9f78276dc7c29587804d9938ed6a293f93d58b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2011 20:00:11 +0200 Subject: [PATCH 24/25] Detect Driver "Software Rasterizer" Fixes a major regression which allowed OpenGL compositing to be used with software rasterizer, which either did not work or crashed directly. Cherry-picked from cf2f572 in branch KDE/4.7. --- libkwineffects/kwinglplatform.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index ce1f3f6d0a..237c14374b 100644 --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -675,6 +675,10 @@ void GLPlatform::detect() m_driverVersion = 0; } + else if (m_renderer == "Software Rasterizer") { + m_driver = Driver_Swrast; + } + // Driver/GPU specific features // ==================================================== From 857a61e30f6547ab156ad52e5b5f713d867f72d9 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 4 Aug 2011 10:39:45 +0200 Subject: [PATCH 25/25] SVN_SILENT made messages (.desktop file) --- clients/aurorae/src/aurorae.desktop | 3 +- effects/cube/cube.desktop | 2 +- effects/cube/cubeslide.desktop | 2 +- effects/dashboard/dashboard.desktop | 3 +- effects/dialogparent/dialogparent.desktop | 4 +- effects/login/login.desktop | 84 +++++++++++++++++++++ effects/login/login_config.desktop | 84 +++++++++++++++++++++ effects/outline/outline.desktop | 1 + effects/slidingpopups/slidingpopups.desktop | 2 +- kcmkwin/kwinoptions/kwinfocus.desktop | 2 +- kwin.notifyrc | 2 +- 11 files changed, 180 insertions(+), 9 deletions(-) diff --git a/clients/aurorae/src/aurorae.desktop b/clients/aurorae/src/aurorae.desktop index a30d9c662d..9fb77c769a 100644 --- a/clients/aurorae/src/aurorae.desktop +++ b/clients/aurorae/src/aurorae.desktop @@ -23,6 +23,7 @@ Name[ga]=Inneall Téama Maisiúcháin Aurorae Name[gl]=Motor de temas de decoración Aurorae Name[he]=מנוע ערכת התצוגה Aurorae Decoration Name[hr]=Tematski mehanizam za ukrase Aurorae +Name[hu]=Aurorae ablakdekorációs témamodul Name[ia]=Motor de thema de decoration Aurorae Name[id]=Mesin Tema Dekorasi Aurorae Name[is]=Aurorae skjáskreytiþemavél @@ -56,7 +57,7 @@ Name[sv]=Aurora dekorationstemagränssnitt Name[tg]=Системаи мавзӯъҳои аврора Name[th]=กลไกชุดตกแต่ง Aurorae Name[tr]=Aurorae Dekorasyon Teması Motoru -Name[ug]=Aurorae زىننەتلەش ئۆرنەك موتورى +Name[ug]=Aurorae زىننەتلەش ئۆرنەك ماتورى Name[uk]=Рушій декорації тем Aurorae Name[wa]=Moteur di tinme di gåyotaedje Aurorae Name[x-test]=xxAurorae Decoration Theme Enginexx diff --git a/effects/cube/cube.desktop b/effects/cube/cube.desktop index 6a9efa0775..c9304d72a6 100644 --- a/effects/cube/cube.desktop +++ b/effects/cube/cube.desktop @@ -144,7 +144,7 @@ Comment[ta]=பணிமேசை தோற்றங்கள் ஒவ்வொ Comment[tg]=Мизи кории 1 интихоб шуд Comment[th]=แสดงแต่ละพื้นที่ทำงานเสมือนบนด้านของกล่องลูกบาศก์ Comment[tr]=Sanal masaüstlerini bir küpün yanı olarak göster -Comment[ug]=كۇپنىڭ ھەر قايسى يۈزلىرىدە مەۋھۇم ئۈستەلئۈستىنى كۆرسەت +Comment[ug]=كۈپنىڭ ھەر قايسى يۈزلىرىدە مەۋھۇم ئۈستەلئۈستىنى كۆرسەت Comment[uk]=Показ всіх віртуальні стільниць на поверхні куба Comment[wa]=Håyene tchaeke forveyou scribanne sos on costé d' on cube Comment[x-test]=xxDisplay each virtual desktop on a side of a cubexx diff --git a/effects/cube/cubeslide.desktop b/effects/cube/cubeslide.desktop index 4f8e6580f5..f52abbc003 100644 --- a/effects/cube/cubeslide.desktop +++ b/effects/cube/cubeslide.desktop @@ -124,7 +124,7 @@ Comment[sr@latin]=Prebacivanje površi animirano kroz kocku Comment[sv]=Animera skrivbordsbyte med en kub Comment[th]=แสดงการเคลื่อนไหวของพื้นที่ทำงานกล่องลูกบาศก์เมื่อทำการเปลี่ยนพื้นที่ Comment[tr]=Masaüstü değiştirmeyi küp ile canlandır -Comment[ug]=ئۈستەلئۈستى ئالماشتۇرۇشنى كۇپ شەكلىدە جانلاندۇر +Comment[ug]=ئۈستەلئۈستى ئالماشتۇرۇشنى كۈپ شەكلىدە جانلاندۇر Comment[uk]=Створювати анімацію перемикання стільниць куба Comment[wa]=Anime li candjaedje di scribanne avou on cube Comment[x-test]=xxAnimate desktop switching with a cubexx diff --git a/effects/dashboard/dashboard.desktop b/effects/dashboard/dashboard.desktop index cba645bad4..e0f478f028 100644 --- a/effects/dashboard/dashboard.desktop +++ b/effects/dashboard/dashboard.desktop @@ -93,6 +93,7 @@ Comment[fi]=Sekaväritä työpöytä kun näytetään Plasma-kojelauta Comment[fr]=Dé-sature le bureau lors de l'affichage du panneau de contrôle de Plasma Comment[he]=החשכת שולחן העבודה בזמן הצגת ה־dashboard של Plasma Comment[hr]=Mijenja boje radne površine u crno-bijele tonove prilikom prikaza ploče s widgetima u Plasmi +Comment[hu]=Csökkentett színek az asztalon a Plasmaáttekintő-nézet megjelenítésekor Comment[ia]=De-satura le scriptorio quando il monstra le pannello de instrumentos de Plasma Comment[is]=Afmetta skjáborð þegar Plasma stjórnborðið birtist Comment[it]=Desatura il desktop quando appare il quadro degli strumenti di Plasma @@ -120,7 +121,7 @@ Comment[sr@latin]=Posivljuje površ pri pojavi instrument-table Plasme Comment[sv]=Försvaga skrivbordet när Plasmas instrumentpanel visas Comment[th]=ลดความอิ่มสีของพื้นที่ทำงาน เมื่อมีการแสดงแดชบอร์ดของพลาสมา Comment[tr]=Plasma kontrol paneli gösterilirken masaüstünü solgunlaştır -Comment[ug]=پىلازما تىزگىن تاختىنى كۆرسەتكەندە ئۈستەلئۈستىنى سۇسلاشتۇر +Comment[ug]=پلازما تىزگىن تاختىنى كۆرسەتكەندە ئۈستەلئۈستىنى سۇسلاشتۇر Comment[uk]=Зменшення насиченості кольорів стільниці під час показу панелі приладів Плазми Comment[wa]=Rinde moens noer li scribanne cwand i mostere li tåvlea d' boird di Plasma Comment[x-test]=xxDesaturate the desktop when displaying the Plasma dashboardxx diff --git a/effects/dialogparent/dialogparent.desktop b/effects/dialogparent/dialogparent.desktop index 92a24f3338..800e12c1d9 100644 --- a/effects/dialogparent/dialogparent.desktop +++ b/effects/dialogparent/dialogparent.desktop @@ -38,7 +38,7 @@ Name[kk]=Диалогтың аталығы Name[km]=ប្រអប់​មេ​ Name[kn]=ಸಂವಾದ ಪೂರ್ವಜ (ಪೇರೆಂಟ್) Name[ko]=대화 상자 부모 -Name[lt]=Dialogo sąvininkas +Name[lt]=Dialogo savininkas Name[lv]=Dialoga vecāks Name[mai]=मूल संवाद Name[ml]=മാതൃജാലകം @@ -112,7 +112,7 @@ Comment[kk]=Белсенді диалогтың аталық терезесін Comment[km]=ធ្វើ​ឲ្យ​បង្អួច​មេ​របស់​ប្រអប់​សកម្ម​បច្ចុប្បន្ន​ងងឹត​ Comment[kn]=ಸಕ್ರಿಯವಾಗಿರುವ ಸಂವಾದದ ಪೂರ್ವಜ ಕಿಟಕಿಯನ್ನು ಮಸುಕಾಗಿಸುತ್ತದೆ Comment[ko]=현재 활성 대화 상자의 부모 창을 어둡게 합니다 -Comment[lt]=Užtemdo dialogo sąvininką kai aktyvuojamas dialogo langas +Comment[lt]=Užtemdo dialogo savininką kai aktyvuojamas dialogo langas Comment[lv]=Satumšina aktīvā loga vecāka logu Comment[ml]=സജീവഡയലോഗിന്റെ മാതൃജാലകം കറുപ്പിക്കുക Comment[mr]=वर्तमान सक्रीय संवादचे मुख्य चौकट काळसर करतो diff --git a/effects/login/login.desktop b/effects/login/login.desktop index 1cb215ef93..1d574271cb 100644 --- a/effects/login/login.desktop +++ b/effects/login/login.desktop @@ -1,5 +1,89 @@ [Desktop Entry] Name=Login +Name[af]=Aanteken +Name[ar]=ولوج +Name[ast]=Accesu +Name[be]=Уваход +Name[be@latin]=Uvachod +Name[bg]=Вход +Name[bn]=লগ-ইন +Name[bn_IN]=লগ-ইন করুন +Name[bs]=Prijava +Name[ca]=Entrada +Name[ca@valencia]=Entrada +Name[cs]=Přihlášení +Name[csb]=Logòwanié +Name[da]=Login +Name[de]=Anmelden +Name[el]=Σύνδεση +Name[en_GB]=Login +Name[eo]=Ensaluto +Name[es]=Acceso +Name[et]=Sisselogimine +Name[eu]=Saio hasiera +Name[fi]=Sisäänkirjautuminen +Name[fr]=Connexion +Name[fy]=Ynlogge +Name[ga]=Logáil Isteach +Name[gl]=Acceso +Name[gu]=પ્રવેશ +Name[he]=כניסה +Name[hi]=लॉगइन +Name[hne]=लागइन +Name[hr]=Prijava +Name[hsb]=Přizjewjenje +Name[hu]=Bejelentkezés +Name[ia]=Accesso de identification +Name[id]=Log Masuk +Name[is]=Innskráning +Name[it]=Accesso +Name[ja]=ログイン +Name[kk]=Кіру +Name[km]=ចូល +Name[kn]=ಪ್ರವೇಶಿಸು (ಲಾಗಿನ್) +Name[ko]=로그인 +Name[ku]=Têketin +Name[lt]=Prisijungti +Name[lv]=Pieteikties +Name[mai]=लागिन +Name[mk]=Најавување +Name[ml]=അകത്തുകയറുക +Name[mr]=दाखलन +Name[nb]=Logg inn +Name[nds]=Anmellen +Name[ne]=लगइन गर्नुहोस् +Name[nl]=Aanmelden +Name[nn]=Innlogging +Name[oc]=Connexion +Name[or]=ଲଗଇନ +Name[pa]=ਲਾਗਇਨ +Name[pl]=Logowanie +Name[pt]=Arranque +Name[pt_BR]=Início de sessão +Name[ro]=Autentificare +Name[ru]=Вход в систему +Name[se]=Sisačáliheapmi +Name[si]=පිවිසුම +Name[sk]=Prihlásenie +Name[sl]=Prijava +Name[sr]=Пријава +Name[sr@ijekavian]=Пријава +Name[sr@ijekavianlatin]=Prijava +Name[sr@latin]=Prijava +Name[sv]=Inloggning +Name[ta]=நுழைக +Name[te]=లాగిన్ +Name[tg]=Воридот +Name[th]=ลงบันทึกเข้าระบบ +Name[tr]=Giriş +Name[ug]=تىزىمغا كىر +Name[uk]=Вхід +Name[uz]=Kirish +Name[uz@cyrillic]=Кириш +Name[wa]=Elodjaedje +Name[x-test]=xxLoginxx +Name[zh_CN]=登录 +Name[zh_TW]=登入 Icon=preferences-system-windows-effect-login Comment=Smoothly fade to the desktop when logging in Comment[ar]=اظهار سطح المكتب بنعومة عند الولوج diff --git a/effects/login/login_config.desktop b/effects/login/login_config.desktop index 803616e95a..16a560a5f0 100644 --- a/effects/login/login_config.desktop +++ b/effects/login/login_config.desktop @@ -7,3 +7,87 @@ X-KDE-ParentComponents=kwin4_effect_login X-KDE-PluginKeyword=login Name=Login +Name[af]=Aanteken +Name[ar]=ولوج +Name[ast]=Accesu +Name[be]=Уваход +Name[be@latin]=Uvachod +Name[bg]=Вход +Name[bn]=লগ-ইন +Name[bn_IN]=লগ-ইন করুন +Name[bs]=Prijava +Name[ca]=Entrada +Name[ca@valencia]=Entrada +Name[cs]=Přihlášení +Name[csb]=Logòwanié +Name[da]=Login +Name[de]=Anmelden +Name[el]=Σύνδεση +Name[en_GB]=Login +Name[eo]=Ensaluto +Name[es]=Acceso +Name[et]=Sisselogimine +Name[eu]=Saio hasiera +Name[fi]=Sisäänkirjautuminen +Name[fr]=Connexion +Name[fy]=Ynlogge +Name[ga]=Logáil Isteach +Name[gl]=Acceso +Name[gu]=પ્રવેશ +Name[he]=כניסה +Name[hi]=लॉगइन +Name[hne]=लागइन +Name[hr]=Prijava +Name[hsb]=Přizjewjenje +Name[hu]=Bejelentkezés +Name[ia]=Accesso de identification +Name[id]=Log Masuk +Name[is]=Innskráning +Name[it]=Accesso +Name[ja]=ログイン +Name[kk]=Кіру +Name[km]=ចូល +Name[kn]=ಪ್ರವೇಶಿಸು (ಲಾಗಿನ್) +Name[ko]=로그인 +Name[ku]=Têketin +Name[lt]=Prisijungti +Name[lv]=Pieteikties +Name[mai]=लागिन +Name[mk]=Најавување +Name[ml]=അകത്തുകയറുക +Name[mr]=दाखलन +Name[nb]=Logg inn +Name[nds]=Anmellen +Name[ne]=लगइन गर्नुहोस् +Name[nl]=Aanmelden +Name[nn]=Innlogging +Name[oc]=Connexion +Name[or]=ଲଗଇନ +Name[pa]=ਲਾਗਇਨ +Name[pl]=Logowanie +Name[pt]=Arranque +Name[pt_BR]=Início de sessão +Name[ro]=Autentificare +Name[ru]=Вход в систему +Name[se]=Sisačáliheapmi +Name[si]=පිවිසුම +Name[sk]=Prihlásenie +Name[sl]=Prijava +Name[sr]=Пријава +Name[sr@ijekavian]=Пријава +Name[sr@ijekavianlatin]=Prijava +Name[sr@latin]=Prijava +Name[sv]=Inloggning +Name[ta]=நுழைக +Name[te]=లాగిన్ +Name[tg]=Воридот +Name[th]=ลงบันทึกเข้าระบบ +Name[tr]=Giriş +Name[ug]=تىزىمغا كىر +Name[uk]=Вхід +Name[uz]=Kirish +Name[uz@cyrillic]=Кириш +Name[wa]=Elodjaedje +Name[x-test]=xxLoginxx +Name[zh_CN]=登录 +Name[zh_TW]=登入 diff --git a/effects/outline/outline.desktop b/effects/outline/outline.desktop index 8c24f11da4..cc27cfb7dd 100644 --- a/effects/outline/outline.desktop +++ b/effects/outline/outline.desktop @@ -10,6 +10,7 @@ Name[et]=Kontuur Name[fi]=Ääriviiva Name[fr]=Esquisse Name[hr]=Kontura +Name[hu]=Körvonal Name[ia]=Profilo Name[is]=Útlína Name[kk]=Айнала сызық diff --git a/effects/slidingpopups/slidingpopups.desktop b/effects/slidingpopups/slidingpopups.desktop index ec1261a96e..0b2824b1a3 100644 --- a/effects/slidingpopups/slidingpopups.desktop +++ b/effects/slidingpopups/slidingpopups.desktop @@ -117,7 +117,7 @@ Comment[sv]=Glidande animering av Plasmarutor Comment[tg]=Данные об указателе мыши для плазмоидов Comment[th]=ลูกเล่นสำหรับเลื่อนแบบเคลื่อนไหวสำหรับหน้าต่างผุดของพลาสมา Comment[tr]=Açılan Plasma bildirimleri için kaydırma canlandırması -Comment[ug]=پىلازما قاڭقىش كۆزنىكى كۆرۈنگەندە سېرىلما جانلاندۇرۇم كۆرسەت +Comment[ug]=پلازما قاڭقىش كۆزنىكى كۆرۈنگەندە سېرىلما جانلاندۇرۇم كۆرسەت Comment[uk]=Анімація з ковзанням для контекстних вікон Плазми Comment[wa]=Animåcion d' ridaedje po ls aspitants purneas di Plasma Comment[x-test]=xxSliding animation for Plasma popupsxx diff --git a/kcmkwin/kwinoptions/kwinfocus.desktop b/kcmkwin/kwinoptions/kwinfocus.desktop index 35f96298e5..8406169809 100644 --- a/kcmkwin/kwinoptions/kwinfocus.desktop +++ b/kcmkwin/kwinoptions/kwinfocus.desktop @@ -172,7 +172,7 @@ Comment[te]=విండో దృష్టి విధానంను ఆక Comment[tg]=Настройка политики фокусирования окон Comment[th]=ปรับแต่งรูปแบบการได้รับโฟกัสของหน้าต่าง Comment[tr]=Pencere odaklama yöntemini yapılandır -Comment[ug]=كۆزنەك فوكۇس نوقتا تەدبىرىنىڭ سەپلىمىسى +Comment[ug]=كۆزنەك فوكۇس نۇقتا تەدبىرىنىڭ سەپلىمىسى Comment[uk]=Налаштування поведінку фокусу вікна Comment[uz]=Oynani fokuslash qoidasini moslash Comment[uz@cyrillic]=Ойнани фокуслаш қоидасини мослаш diff --git a/kwin.notifyrc b/kwin.notifyrc index e89dce2e20..e9cfb39c79 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -6940,7 +6940,7 @@ Comment[sr@latin]=Drugi program je zatražio da se slaganje suspenduje. Comment[sv]=Ett annat program har begärt att stoppa sammansättning. Comment[th]=โปรแกรมอื่นบางตัวได้ร้องขอทำการพักการทำงานของการทำคอมโพสิต Comment[tr]=Başka bir uygulama birleşikliğin askıya alınmasını istedi. -Comment[ug]=باشقا بىر قوللىنىشچان پىروگرامما ئارىلاش مەشغۇلاتىنى توختىتىشنى تەلەپ قىلدى. +Comment[ug]=باشقا بىر پروگرامما ئارىلاش مەشغۇلاتىنى توختىتىشنى تەلەپ قىلدى. Comment[uk]=Ще одна програма надіслала запит на вимикання композитного режиму. Comment[wa]=Èn ôte programe a dmandé d' djoker l' môde compôzite. Comment[x-test]=xxAnother application has requested to suspend compositing.xx