Merge branch 'master' of git.kde.org:kde-workspace
This commit is contained in:
commit
ce0862d726
58 changed files with 588 additions and 229 deletions
|
@ -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} )
|
||||
|
|
2
client.h
2
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;
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#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)
|
||||
|
|
|
@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <kwinglutils.h>
|
||||
#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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]=वर्तमान सक्रीय संवादचे मुख्य चौकट काळसर करतो
|
||||
|
|
|
@ -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 )
|
|
@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <KDE/KConfigGroup>
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
81
effects/login/login_config.cpp
Normal file
81
effects/login/login_config.cpp
Normal file
|
@ -0,0 +1,81 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2010 Martin Gräßlin <kde@martin-graesslin.com>
|
||||
Copyright (C) 2011 Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "login_config.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
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<bool>("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"
|
93
effects/login/login_config.desktop
Normal file
93
effects/login/login_config.desktop
Normal file
|
@ -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]=登入
|
57
effects/login/login_config.h
Normal file
57
effects/login/login_config.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2010 Martin Gräßlin <kde@martin-graesslin.com>
|
||||
Copyright (C) 2011 Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef KWIN_LOGIN_CONFIG_H
|
||||
#define KWIN_LOGIN_CONFIG_H
|
||||
|
||||
#include <kcmodule.h>
|
||||
|
||||
#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
|
38
effects/login/login_config.ui
Normal file
38
effects/login/login_config.ui
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>KWin::LoginEffectConfigForm</class>
|
||||
<widget class="QWidget" name="KWin::LoginEffectConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>160</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fadetoblackBox">
|
||||
<property name="text">
|
||||
<string>Fade to black (fullscreen splash screens only)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -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]=Айнала сызық
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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]=מציג גדלי החלון בהזזתו או בשינוי גודלו
|
||||
|
|
|
@ -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]=גדלי חלונות
|
||||
|
|
28
geometry.cpp
28
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
|
||||
|
|
|
@ -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<bool>("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<bool>("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);
|
||||
}
|
||||
|
|
|
@ -771,17 +771,7 @@ p, li { white-space: pre-wrap; }
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="glDirect">
|
||||
<property name="text">
|
||||
<string>Enable direct rendering</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="glVSync">
|
||||
<property name="text">
|
||||
<string>Use VSync</string>
|
||||
|
@ -791,7 +781,7 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="glShaders">
|
||||
<property name="toolTip">
|
||||
<string>If enabled all rendering will be performed with Shaders written in the OpenGL Shading Language.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of rows:</string>
|
||||
|
@ -78,7 +78,7 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="KIntSpinBox" name="rowsSpinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -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]=Ойнани фокуслаш қоидасини мослаш
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]=הגדרת ההתנהגות בניווט בין חלונות
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -847,7 +847,7 @@ void WindowMotionManager::calculate(int time)
|
|||
// Just skip it completely if the user wants no animation
|
||||
m_movingWindowsSet.clear();
|
||||
QHash<EffectWindow*, WindowMotion>::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<EffectWindow*, WindowMotion>::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<EffectWindow*, WindowMotion>::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());
|
||||
|
|
|
@ -675,6 +675,10 @@ void GLPlatform::detect()
|
|||
m_driverVersion = 0;
|
||||
}
|
||||
|
||||
else if (m_renderer == "Software Rasterizer") {
|
||||
m_driver = Driver_Swrast;
|
||||
}
|
||||
|
||||
|
||||
// Driver/GPU specific features
|
||||
// ====================================================
|
||||
|
|
1
main.cpp
1
main.cpp
|
@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kxerrorhandler.h>
|
||||
#include <kdefakes.h>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <stdlib.h>
|
||||
#include <QMessageBox>
|
||||
#include <QEvent>
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -18,10 +18,10 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
|
||||
#include <config-X11.h>
|
||||
|
||||
#include "overlaywindow.h"
|
||||
|
||||
#include <config-X11.h>
|
||||
|
||||
#include "kwinglobals.h"
|
||||
|
||||
#include "assert.h"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -67,7 +67,6 @@ Sources and other compositing managers:
|
|||
*/
|
||||
|
||||
#include "scene_opengl.h"
|
||||
#include "kwinglplatform.h"
|
||||
|
||||
#include <kxerrorhandler.h>
|
||||
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Client*>(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<QRect> 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<char*>("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<SceneXRenderShadow*>(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<char*>("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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -109,4 +109,4 @@ private Q_SLOTS:
|
|||
};
|
||||
}
|
||||
|
||||
#endif // KWIN_TILING_H
|
||||
#endif // KWIN_TILING_H
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ void Workspace::groupTabPopupAboutToShow()
|
|||
return;
|
||||
add_tabs_popup->clear();
|
||||
int index = 0;
|
||||
for (QList<ClientGroup*>::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); i++, index++) {
|
||||
for (QList<ClientGroup*>::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);
|
||||
|
|
|
@ -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<ClientGroup*> tmpGroups = clientGroups; // Prevent crashing
|
||||
for (QList<ClientGroup*>::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); i++)
|
||||
for (QList<ClientGroup*>::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<int>("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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue