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/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/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/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/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/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/effects.cpp b/effects.cpp
index 45233136f8..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
@@ -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;
}
diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt
index 986f5921c9..3af7a6f365 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
@@ -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))
@@ -50,12 +53,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 )
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/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/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/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp
index 6bc98b3a02..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
@@ -775,7 +774,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 +786,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;
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/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 8e5a45f673..e0f478f028 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,10 +88,12 @@ 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
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
@@ -119,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/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/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/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..fd26f52142 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", false));
+}
+
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..1d574271cb 100644
--- a/effects/login/login.desktop
+++ b/effects/login/login.desktop
@@ -153,10 +153,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..5a4b57a5cb
--- /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", false));
+
+ 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"
diff --git a/effects/login/login_config.desktop b/effects/login/login_config.desktop
new file mode 100644
index 0000000000..16a560a5f0
--- /dev/null
+++ b/effects/login/login_config.desktop
@@ -0,0 +1,93 @@
+[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
+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/login/login_config.h b/effects/login/login_config.h
new file mode 100644
index 0000000000..4de44fc5cb
--- /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
diff --git a/effects/login/login_config.ui b/effects/login/login_config.ui
new file mode 100644
index 0000000000..b4b1f307bb
--- /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
+
+
+
+
+
+
+
+
+
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/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/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/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);
}
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/geometry.cpp b/geometry.cpp
index af6ce8c50c..071682ab53 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;
}
@@ -1157,15 +1161,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 +1170,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,
@@ -2623,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/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/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/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/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/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);
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..e9cfb39c79 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
@@ -6939,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
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/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
// ====================================================
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/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());
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"
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 0980229bb9..2346a1ea77 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
@@ -657,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);
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;
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
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();
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 74a854e5ef..6195639bbf 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();
@@ -572,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;
}
@@ -988,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();
@@ -1092,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;
}