Merge branch 'master' into frameworks-scratch

Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
icc-effect-5.14.5
Martin Gräßlin 2013-08-07 09:53:08 +02:00
commit 9291b18cee
123 changed files with 894 additions and 572 deletions

View File

@ -248,7 +248,6 @@ set(kwin_XCB_LIBS
${XCB_RENDER_LIBRARIES}
${XCB_RANDR_LIBRARIES}
${XCB_KEYSYMS_LIBRARIES}
${XCB_ICCCM_LIBRARIES}
)
set(kwin_WAYLAND_LIBS
@ -309,8 +308,6 @@ if(OPENGL_FOUND)
if (DL_LIBRARY)
target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
endif()
# 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})
set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
@ -329,18 +326,6 @@ if(OPENGLES_FOUND)
install(TARGETS kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} )
endif()
########### next target ###############
set( kwinnvidiahack_LIB_SRCS
nvidiahack.cpp )
kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
set_target_properties(kwinnvidiahack PROPERTIES OUTPUT_NAME ${KWIN_NAME}nvidiahack)
install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
########### install files ###############
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg )

View File

@ -246,11 +246,20 @@ void Workspace::setActiveClient(Client* c)
}
active_client = c;
Q_ASSERT(c == NULL || c->isActive());
if (active_client != NULL)
last_active_client = active_client;
if (active_client) {
last_active_client = active_client;
FocusChain::self()->update(active_client, FocusChain::MakeFirst);
active_client->demandAttention(false);
// activating a client can cause a non active fullscreen window to loose the ActiveLayer status on > 1 screens
if (screens()->count() > 1) {
for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) {
if (*it != active_client && (*it)->layer() == ActiveLayer && (*it)->screen() == active_client->screen()) {
updateClientLayer(*it);
}
}
}
}
pending_take_activity = NULL;

View File

@ -805,7 +805,7 @@ void Client::hideClient(bool hide)
*/
bool Client::isMinimizable() const
{
if (isSpecialWindow())
if (isSpecialWindow() && !isTransient())
return false;
if (!rules()->checkMinimize(true))
return false;
@ -1162,6 +1162,8 @@ void Client::internalKeep()
if (old == Unmapped || old == Withdrawn)
map();
m_decoInputExtent.unmap();
if (isActive())
workspace()->focusToNull(); // get rid of input focus, bug #317484
updateHiddenPreview();
addWorkspaceRepaint(visibleRect());
workspace()->clientHidden(this);

View File

@ -3,6 +3,7 @@ Type=ServiceType
X-KDE-ServiceType=KWin/Decoration
Comment=KWin Window Decoration
Comment[bs]=KWin Dekoracije prozora
Comment[ca]=Decoració de finestres del KWin
Comment[ca@valencia]=Decoració de finestres del KWin
Comment[cs]=Dekorace oken KWin

View File

@ -89,6 +89,7 @@ Name[x-test]=xxPlastikxx
Name[zh_CN]=Plastik
Name[zh_TW]=Plastik
Comment=The classic theme known from KDE 3
Comment[bs]=Klasična tema iz KDE 3
Comment[ca]=El tema clàssic conegut des del KDE 3
Comment[ca@valencia]=El tema clàssic conegut des del KDE 3
Comment[cs]=Klasický motiv známý z KDE 3

View File

@ -98,6 +98,7 @@ Compositor::Compositor(QObject* workspace)
connect(&unredirectTimer, SIGNAL(timeout()), SLOT(delayedCheckUnredirect()));
connect(&compositeResetTimer, SIGNAL(timeout()), SLOT(restart()));
connect(workspace, SIGNAL(configChanged()), SLOT(slotConfigChanged()));
connect(options, SIGNAL(unredirectFullscreenChanged()), SLOT(delayedCheckUnredirect()));
unredirectTimer.setSingleShot(true);
compositeResetTimer.setSingleShot(true);
nextPaintReference.invalidate(); // Initialize the timer
@ -693,7 +694,7 @@ void Compositor::checkUnredirect(bool force)
void Compositor::delayedCheckUnredirect()
{
if (!hasScene() || m_scene->overlayWindow()->window() == None || !options->isUnredirectFullscreen())
if (!hasScene() || m_scene->overlayWindow()->window() == None || !(options->isUnredirectFullscreen() || sender() == options))
return;
ToplevelList list;
bool changed = forceUnredirectCheck;
@ -1047,7 +1048,8 @@ void Toplevel::addWorkspaceRepaint(const QRect& r2)
bool Toplevel::updateUnredirectedState()
{
assert(compositing());
bool should = shouldUnredirect() && !unredirectSuspend && !shape() && !hasAlpha() && opacity() == 1.0 &&
bool should = options->isUnredirectFullscreen() && shouldUnredirect() && !unredirectSuspend &&
!shape() && !hasAlpha() && opacity() == 1.0 &&
!static_cast<EffectsHandlerImpl*>(effects)->activeFullScreenEffect();
if (should == unredirect)
return false;

View File

@ -166,7 +166,7 @@ X11Cursor::X11Cursor(QObject *parent)
m_resetTimeStampTimer->setSingleShot(true);
connect(m_resetTimeStampTimer, SIGNAL(timeout()), SLOT(resetTimeStamp()));
// TODO: How often do we really need to poll?
m_mousePollingTimer->setInterval(100);
m_mousePollingTimer->setInterval(50);
connect(m_mousePollingTimer, SIGNAL(timeout()), SLOT(mousePolled()));
}

View File

@ -59,9 +59,9 @@ install( TARGETS kwin_update_settings_411 DESTINATION ${LIB_INSTALL_DIR}/kconf_u
install( FILES fsp_workarounds_1.kwinrules DESTINATION ${DATA_INSTALL_DIR}/kwin/default_rules )
install( FILES pop.wav DESTINATION ${SOUND_INSTALL_DIR} )
install( FILES kwin_fsp_workarounds_1.upd kwin_update_tabbox_settings.upd kwin_remove_effects.upd kwin_update_tabbox_qml_settings.upd kwin_remove_delay_focus.upd kwin_update_49.upd kwin_update_410.upd kwin_translate_activity_rule.upd
install( FILES kwin_fsp_workarounds_1.upd kwin_update_tabbox_settings.upd kwin_remove_effects.upd kwin_update_tabbox_qml_settings.upd kwin_remove_delay_focus.upd kwin_update_49.upd kwin_update_410.upd kwin_translate_activity_rule.upd kwin_translate_confrequest_rule.upd
kwin_update_411.upd
DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( PROGRAMS kwin_remove_delay_focus.sh kwin_translate_activity_rule.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( PROGRAMS kwin_remove_delay_focus.sh kwin_translate_activity_rule.sh kwin_translate_confrequest_rule.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( FILES stripTitle.js DESTINATION ${DATA_INSTALL_DIR}/kwin )

View File

@ -0,0 +1,14 @@
#!/bin/sh
COUNT=`kreadconfig --file kwinrulesrc --group General --key count`
if [ -z "$COUNT" ]; then
exit 0 # nothing to do for us
fi
# can you imaging how *much* faster sed is?
# it's however less reliable (installation, ini config, etc.)
for i in `seq 1 $COUNT`; do
if [ "`kreadconfig --file kwinrulesrc --group $i --key ignoregeometryrule`" = "2" ]; then
kwriteconfig --file kwinrulesrc --group $i --key ignoregeometryrule "3"
fi
done

View File

@ -0,0 +1,2 @@
Id=Kwin-4.11
Script=kwin_translate_confrequest_rule.sh

View File

@ -41,6 +41,7 @@ Deleted::Deleted()
, m_minimized(false)
, m_modal(false)
, m_paintRedirector(NULL)
, m_wasClient(false)
{
}
@ -81,6 +82,7 @@ void Deleted::copyToDeleted(Toplevel* c)
cinfo->disable();
Client* client = dynamic_cast<Client*>(c);
if (client) {
m_wasClient = true;
no_border = client->noBorder();
padding_left = client->paddingLeft();
padding_right = client->paddingRight();

View File

@ -66,6 +66,9 @@ public:
PaintRedirector *decorationPaintRedirector() {
return m_paintRedirector;
}
bool wasClient() const {
return m_wasClient;
}
protected:
virtual void debug(QDebug& stream) const;
virtual bool shouldUnredirect() const;
@ -93,6 +96,7 @@ private:
bool m_modal;
ClientList m_mainClients;
PaintRedirector *m_paintRedirector;
bool m_wasClient;
};
inline void Deleted::refWindow()

View File

@ -223,7 +223,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
dbus.registerObject(QStringLiteral("/Effects"), this);
dbus.registerService(QStringLiteral("org.kde.kwin.Effects"));
// init is important, otherwise causes crashes when quads are build before the first painting pass start
m_currentBuildQuadsIterator = m_activeEffects.end();
m_currentBuildQuadsIterator = m_activeEffects.constEnd();
Workspace *ws = Workspace::self();
VirtualDesktopManager *vds = VirtualDesktopManager::self();
@ -282,6 +282,7 @@ void EffectsHandlerImpl::setupClientConnections(Client* c)
connect(c, SIGNAL(opacityChanged(KWin::Toplevel*,qreal)), this, SLOT(slotOpacityChanged(KWin::Toplevel*,qreal)));
connect(c, SIGNAL(clientMinimized(KWin::Client*,bool)), this, SLOT(slotClientMinimized(KWin::Client*,bool)));
connect(c, SIGNAL(clientUnminimized(KWin::Client*,bool)), this, SLOT(slotClientUnminimized(KWin::Client*,bool)));
connect(c, SIGNAL(modalChanged()), this, SLOT(slotClientModalityChanged()));
connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), this, SLOT(slotGeometryShapeChanged(KWin::Toplevel*,QRect)));
connect(c, SIGNAL(paddingChanged(KWin::Toplevel*,QRect)), this, SLOT(slotPaddingChanged(KWin::Toplevel*,QRect)));
connect(c, SIGNAL(damaged(KWin::Toplevel*,QRect)), this, SLOT(slotWindowDamaged(KWin::Toplevel*,QRect)));
@ -304,6 +305,7 @@ void EffectsHandlerImpl::reconfigure()
QFutureWatcher<KService::List> *watcher = new QFutureWatcher<KService::List>(this);
connect(watcher, SIGNAL(finished()), this, SLOT(slotEffectsQueried()));
watcher->setFuture(QtConcurrent::run(KServiceTypeTrader::self(), &KServiceTypeTrader::query, QStringLiteral("KWin/Effect"), QString()));
watcher->waitForFinished(); // TODO: remove once KConfigGroup is thread safe, bug #321576
}
void EffectsHandlerImpl::slotEffectsQueried()
@ -356,7 +358,7 @@ void EffectsHandlerImpl::slotEffectsQueried()
// the idea is that effects call this function again which calls the next one
void EffectsHandlerImpl::prePaintScreen(ScreenPrePaintData& data, int time)
{
if (m_currentPaintScreenIterator != m_activeEffects.end()) {
if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) {
(*m_currentPaintScreenIterator++)->prePaintScreen(data, time);
--m_currentPaintScreenIterator;
}
@ -365,7 +367,7 @@ void EffectsHandlerImpl::prePaintScreen(ScreenPrePaintData& data, int time)
void EffectsHandlerImpl::paintScreen(int mask, QRegion region, ScreenPaintData& data)
{
if (m_currentPaintScreenIterator != m_activeEffects.end()) {
if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) {
(*m_currentPaintScreenIterator++)->paintScreen(mask, region, data);
--m_currentPaintScreenIterator;
} else
@ -380,8 +382,8 @@ void EffectsHandlerImpl::paintDesktop(int desktop, int mask, QRegion region, Scr
m_currentRenderedDesktop = desktop;
m_desktopRendering = true;
// save the paint screen iterator
QList<Effect*>::iterator savedIterator = m_currentPaintScreenIterator;
m_currentPaintScreenIterator = m_activeEffects.begin();
EffectsIterator savedIterator = m_currentPaintScreenIterator;
m_currentPaintScreenIterator = m_activeEffects.constBegin();
effects->paintScreen(mask, region, data);
// restore the saved iterator
m_currentPaintScreenIterator = savedIterator;
@ -390,7 +392,7 @@ void EffectsHandlerImpl::paintDesktop(int desktop, int mask, QRegion region, Scr
void EffectsHandlerImpl::postPaintScreen()
{
if (m_currentPaintScreenIterator != m_activeEffects.end()) {
if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) {
(*m_currentPaintScreenIterator++)->postPaintScreen();
--m_currentPaintScreenIterator;
}
@ -399,7 +401,7 @@ void EffectsHandlerImpl::postPaintScreen()
void EffectsHandlerImpl::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time)
{
if (m_currentPaintWindowIterator != m_activeEffects.end()) {
if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) {
(*m_currentPaintWindowIterator++)->prePaintWindow(w, data, time);
--m_currentPaintWindowIterator;
}
@ -408,7 +410,7 @@ void EffectsHandlerImpl::prePaintWindow(EffectWindow* w, WindowPrePaintData& dat
void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
{
if (m_currentPaintWindowIterator != m_activeEffects.end()) {
if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) {
(*m_currentPaintWindowIterator++)->paintWindow(w, mask, region, data);
--m_currentPaintWindowIterator;
} else
@ -417,7 +419,7 @@ void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, QRegion region,
void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity)
{
if (m_currentPaintEffectFrameIterator != m_activeEffects.end()) {
if (m_currentPaintEffectFrameIterator != m_activeEffects.constEnd()) {
(*m_currentPaintEffectFrameIterator++)->paintEffectFrame(frame, region, opacity, frameOpacity);
--m_currentPaintEffectFrameIterator;
} else {
@ -428,7 +430,7 @@ void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, QRegion region, do
void EffectsHandlerImpl::postPaintWindow(EffectWindow* w)
{
if (m_currentPaintWindowIterator != m_activeEffects.end()) {
if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) {
(*m_currentPaintWindowIterator++)->postPaintWindow(w);
--m_currentPaintWindowIterator;
}
@ -445,7 +447,7 @@ Effect *EffectsHandlerImpl::provides(Effect::Feature ef)
void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
{
if (m_currentDrawWindowIterator != m_activeEffects.end()) {
if (m_currentDrawWindowIterator != m_activeEffects.constEnd()) {
(*m_currentDrawWindowIterator++)->drawWindow(w, mask, region, data);
--m_currentDrawWindowIterator;
} else
@ -456,14 +458,14 @@ void EffectsHandlerImpl::buildQuads(EffectWindow* w, WindowQuadList& quadList)
{
static bool initIterator = true;
if (initIterator) {
m_currentBuildQuadsIterator = m_activeEffects.begin();
m_currentBuildQuadsIterator = m_activeEffects.constBegin();
initIterator = false;
}
if (m_currentBuildQuadsIterator != m_activeEffects.end()) {
if (m_currentBuildQuadsIterator != m_activeEffects.constEnd()) {
(*m_currentBuildQuadsIterator++)->buildQuads(w, quadList);
--m_currentBuildQuadsIterator;
}
if (m_currentBuildQuadsIterator == m_activeEffects.begin())
if (m_currentBuildQuadsIterator == m_activeEffects.constBegin())
initIterator = true;
}
@ -486,15 +488,16 @@ bool EffectsHandlerImpl::decorationSupportsBlurBehind() const
void EffectsHandlerImpl::startPaint()
{
m_activeEffects.clear();
for(QVector< KWin::EffectPair >::iterator it = loaded_effects.begin(); it != loaded_effects.end(); ++it) {
m_activeEffects.reserve(loaded_effects.count());
for(QVector< KWin::EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->isActive()) {
m_activeEffects << it->second;
}
}
m_currentDrawWindowIterator = m_activeEffects.begin();
m_currentPaintWindowIterator = m_activeEffects.begin();
m_currentPaintScreenIterator = m_activeEffects.begin();
m_currentPaintEffectFrameIterator = m_activeEffects.begin();
m_currentDrawWindowIterator = m_activeEffects.constBegin();
m_currentPaintWindowIterator = m_activeEffects.constBegin();
m_currentPaintScreenIterator = m_activeEffects.constBegin();
m_currentPaintEffectFrameIterator = m_activeEffects.constBegin();
}
void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, KDecorationDefines::MaximizeMode maxMode)
@ -554,9 +557,9 @@ void EffectsHandlerImpl::slotClientAdded(Client *c)
}
void EffectsHandlerImpl::slotUnmanagedAdded(Unmanaged *u)
{ // regardless, unmanaged windows are -yet?- not synced anyway
setupUnmanagedConnections(u);
emit windowAdded(u->effectWindow());
{
// it's never initially ready but has synthetic 50ms delay
connect(u, SIGNAL(windowShown(KWin::Toplevel*)), SLOT(slotUnmanagedShown(KWin::Toplevel*)));
}
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
@ -568,6 +571,14 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
emit windowAdded(c->effectWindow());
}
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
{ // regardless, unmanaged windows are -yet?- not synced anyway
Q_ASSERT(dynamic_cast<Unmanaged*>(t));
Unmanaged *u = static_cast<Unmanaged*>(t);
setupUnmanagedConnections(u);
emit windowAdded(u->effectWindow());
}
void EffectsHandlerImpl::slotDeletedRemoved(KWin::Deleted *d)
{
emit windowDeleted(d->effectWindow());
@ -601,6 +612,11 @@ void EffectsHandlerImpl::slotClientUnminimized(Client* c, bool animate)
}
}
void EffectsHandlerImpl::slotClientModalityChanged()
{
emit windowModalityChanged(static_cast<Client*>(sender())->effectWindow());
}
void EffectsHandlerImpl::slotCurrentTabAboutToChange(EffectWindow *from, EffectWindow *to)
{
emit currentTabAboutToChange(from, to);
@ -737,7 +753,7 @@ void* EffectsHandlerImpl::getProxy(QString name)
// All effects start with "kwin4_effect_", prepend it to the name
name.prepend(QStringLiteral("kwin4_effect_"));
for (QVector< EffectPair >::iterator it = loaded_effects.begin(); it != loaded_effects.end(); ++it)
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it)
if ((*it).first == name)
return (*it).second->proxy();
@ -1030,8 +1046,10 @@ EffectWindowList EffectsHandlerImpl::stackingOrder() const
{
ToplevelList list = Workspace::self()->xStackingOrder();
EffectWindowList ret;
foreach (Toplevel *w, list)
ret.append(effectWindow(w));
foreach (Toplevel *t, list) {
if (EffectWindow *w = effectWindow(t))
ret.append(w);
}
return ret;
}
@ -1489,7 +1507,7 @@ void EffectsHandlerImpl::unloadEffect(const QString& name)
void EffectsHandlerImpl::reconfigureEffect(const QString& name)
{
for (QVector< EffectPair >::iterator it = loaded_effects.begin(); it != loaded_effects.end(); ++it)
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it)
if ((*it).first == name) {
(*it).second->reconfigure(Effect::ReconfigureAll);
return;
@ -1508,7 +1526,7 @@ bool EffectsHandlerImpl::isEffectLoaded(const QString& name) const
void EffectsHandlerImpl::reloadEffect(Effect *effect)
{
QString effectName;
for (QVector< EffectPair >::iterator it = loaded_effects.begin(); it != loaded_effects.end(); ++it) {
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).second == effect) {
effectName = (*it).first;
break;
@ -1529,6 +1547,7 @@ void EffectsHandlerImpl::effectsChanged()
// kDebug(1212) << effect.first;
loaded_effects.append(effect);
}
m_activeEffects.reserve(loaded_effects.count());
}
QStringList EffectsHandlerImpl::activeEffects() const

View File

@ -222,6 +222,7 @@ protected Q_SLOTS:
void slotClientAdded(KWin::Client *c);
void slotClientShown(KWin::Toplevel*);
void slotUnmanagedAdded(KWin::Unmanaged *u);
void slotUnmanagedShown(KWin::Toplevel*);
void slotWindowClosed(KWin::Toplevel *c);
void slotClientActivated(KWin::Client *c);
void slotDeletedRemoved(KWin::Deleted *d);
@ -232,6 +233,7 @@ protected Q_SLOTS:
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
void slotClientMinimized(KWin::Client *c, bool animate);
void slotClientUnminimized(KWin::Client *c, bool animate);
void slotClientModalityChanged();
void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old);
void slotPaddingChanged(KWin::Toplevel *t, const QRect &old);
void slotWindowDamaged(KWin::Toplevel *t, const QRect& r);
@ -256,12 +258,14 @@ private Q_SLOTS:
void slotEffectsQueried();
private:
QList< Effect* > m_activeEffects;
QList< Effect* >::iterator m_currentDrawWindowIterator;
QList< Effect* >::iterator m_currentPaintWindowIterator;
QList< Effect* >::iterator m_currentPaintEffectFrameIterator;
QList< Effect* >::iterator m_currentPaintScreenIterator;
QList< Effect* >::iterator m_currentBuildQuadsIterator;
typedef QVector< Effect*> EffectsList;
typedef EffectsList::const_iterator EffectsIterator;
EffectsList m_activeEffects;
EffectsIterator m_currentDrawWindowIterator;
EffectsIterator m_currentPaintWindowIterator;
EffectsIterator m_currentPaintEffectFrameIterator;
EffectsIterator m_currentPaintScreenIterator;
EffectsIterator m_currentBuildQuadsIterator;
typedef QHash< QByteArray, QList< Effect*> > PropertyEffectMap;
PropertyEffectMap m_propertiesForEffects;
QHash<QByteArray, qulonglong> m_managedProperties;

View File

@ -20,7 +20,7 @@ Name[fi]=Levykansivaihtaja
Name[fr]=Défilement circulaire
Name[fy]=Foarplaat wiksel
Name[ga]=Cover Switch
Name[gl]=Mudanza en capas
Name[gl]=Cambio en capas
Name[gu]=ફેરફાર ઢાંકો
Name[he]=מחליף דפדוף בין תקליטים
Name[hi]=कवर स्विच

View File

@ -27,7 +27,7 @@ Name[fi]=Levykansivaihtaja
Name[fr]=Défilement circulaire
Name[fy]=Foarplaat wiksel
Name[ga]=Cover Switch
Name[gl]=Mudanza en capas
Name[gl]=Cambio en capas
Name[gu]=ફેરફાર ઢાંકો
Name[he]=מחליף דפדוף בין תקליטים
Name[hi]=कवर स्विच

View File

@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kdebug.h>
#include <KDE/KGlobal>
#include <QApplication>
#include <QColor>
#include <QRect>
#include <QEvent>
@ -52,7 +53,6 @@ KWIN_EFFECT_SUPPORTED(cube, CubeEffect::supported())
CubeEffect::CubeEffect()
: activated(false)
, mousePolling(false)
, cube_painting(false)
, keyboard_grab(false)
, schedule_close(false)
@ -122,8 +122,6 @@ CubeEffect::CubeEffect()
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
reconfigure(ReconfigureAll);
}
@ -1900,10 +1898,6 @@ void CubeEffect::setActive(bool active)
connect(watcher, SIGNAL(finished()), SLOT(slotWallPaperLoaded()));
watcher->setFuture(QtConcurrent::run(this, &CubeEffect::loadWallPaper, wallpaperPath));
}
if (!mousePolling) {
effects->startMousePolling();
mousePolling = true;
}
activated = true;
activeScreen = effects->activeScreen();
keyboard_grab = effects->grabKeyboard(this);
@ -1935,18 +1929,13 @@ void CubeEffect::setActive(bool active)
m_rotationMatrix.setToIdentity();
effects->addRepaintFull();
} else {
if (mousePolling) {
effects->stopMousePolling();
mousePolling = false;
}
schedule_close = true;
// we have to add a repaint, to start the deactivating
effects->addRepaintFull();
}
}
void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::MouseButtons buttons,
Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers, Qt::KeyboardModifiers)
void CubeEffect::windowInputMouseEvent(QEvent* e)
{
if (!activated)
return;
@ -1954,8 +1943,17 @@ void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::M
return;
if (stop)
return;
QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
if (buttons.testFlag(Qt::LeftButton)) {
QMouseEvent *mouse = dynamic_cast< QMouseEvent* >(e);
if (!mouse)
return;
static QPoint oldpos;
static QElapsedTimer dblClckTime;
static int dblClckCounter(0);
if (mouse->type() == QEvent::MouseMove && mouse->buttons().testFlag(Qt::LeftButton)) {
const QPoint pos = mouse->pos();
QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
bool repaint = false;
// vertical movement only if there is not a rotation
if (!verticalRotating) {
@ -1991,43 +1989,43 @@ void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::M
rotateCube();
effects->addRepaintFull();
}
oldpos = pos;
}
if (!oldbuttons.testFlag(Qt::LeftButton) && buttons.testFlag(Qt::LeftButton)) {
effects->defineCursor(Qt::ClosedHandCursor);
}
if (oldbuttons.testFlag(Qt::LeftButton) && !buttons.testFlag(Qt::LeftButton)) {
effects->defineCursor(Qt::OpenHandCursor);
if (closeOnMouseRelease)
setActive(false);
}
if (oldbuttons.testFlag(Qt::RightButton) && !buttons.testFlag(Qt::RightButton)) {
// end effect on right mouse button
setActive(false);
}
}
void CubeEffect::windowInputMouseEvent(QEvent* e)
{
QMouseEvent *mouse = dynamic_cast< QMouseEvent* >(e);
if (mouse && mouse->type() == QEvent::MouseButtonRelease) {
if (mouse->button() == Qt::XButton1) {
if (!rotating && !start) {
rotating = true;
if (invertMouse)
rotationDirection = Right;
else
rotationDirection = Left;
} else {
if (rotations.count() < effects->numberOfDesktops()) {
if (invertMouse)
rotations.enqueue(Right);
else
rotations.enqueue(Left);
}
else if (mouse->type() == QEvent::MouseButtonPress && mouse->button() == Qt::LeftButton) {
oldpos = mouse->pos();
if (dblClckTime.elapsed() > QApplication::doubleClickInterval())
dblClckCounter = 0;
if (!dblClckCounter)
dblClckTime.start();
}
else if (mouse->type() == QEvent::MouseButtonRelease) {
effects->defineCursor(Qt::OpenHandCursor);
if (mouse->button() == Qt::LeftButton && ++dblClckCounter == 2) {
dblClckCounter = 0;
if (dblClckTime.elapsed() < QApplication::doubleClickInterval()) {
setActive(false);
return;
}
effects->addRepaintFull();
}
if (mouse->button() == Qt::XButton2) {
else if (mouse->button() == Qt::XButton1) {
if (!rotating && !start) {
rotating = true;
if (invertMouse)
rotationDirection = Right;
else
rotationDirection = Left;
} else {
if (rotations.count() < effects->numberOfDesktops()) {
if (invertMouse)
rotations.enqueue(Right);
else
rotations.enqueue(Left);
}
}
effects->addRepaintFull();
} else if (mouse->button() == Qt::XButton2) {
if (!rotating && !start) {
rotating = true;
if (invertMouse)
@ -2043,6 +2041,8 @@ void CubeEffect::windowInputMouseEvent(QEvent* e)
}
}
effects->addRepaintFull();
} else if (mouse->button() == Qt::RightButton || (mouse->button() == Qt::LeftButton && closeOnMouseRelease)) {
setActive(false);
}
}
}

View File

@ -137,8 +137,6 @@ private Q_SLOTS:
void slotTabBoxAdded(int mode);
void slotTabBoxUpdated();
void slotTabBoxClosed();
void slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::MouseButtons buttons,
Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
void slotCubeCapLoaded();
void slotWallPaperLoaded();
private:
@ -171,7 +169,6 @@ private:
QImage loadCubeCap(const QString &capPath);
QImage loadWallPaper(const QString &file);
bool activated;
bool mousePolling;
bool cube_painting;
bool keyboard_grab;
bool schedule_close;

View File

@ -857,8 +857,6 @@ int DesktopGridEffect::posToDesktop(const QPoint& pos) const
double scaledY = (pos.y() - scaledOffset[screen].y() + double(border) / 2.0) / (scaledSize[screen].height() + border);
int gx = qBound(0, int(scaledX), gridSize.width() - 1); // Zero-based
int gy = qBound(0, int(scaledY), gridSize.height() - 1);
scaledX -= gx;
scaledY -= gy;
if (orientation == Qt::Horizontal)
return gy * gridSize.width() + gx + 1;
return gx * gridSize.height() + gy + 1;

View File

@ -129,7 +129,7 @@ Comment[ro]=Îndepărtează astfel încît toate birourile sînt afișate alătu
Comment[ru]=Показать все рабочие столы на одном экране
Comment[si]=සියළු වැඩතල ජාලයක පැත්තෙන් පැත්තට පෙනීම සඳහා විශාලනය අඩු කරන්න
Comment[sk]=Oddiali všetky plochy a zobrazí ich vedľa seba v mriežke
Comment[sl]=Oddalji prikaz, tako da so vsa namizja prikazana eno ob drugem v mreži
Comment[sl]=Oddalji pogled, tako da so vsa namizja prikazana eno ob drugem v mreži
Comment[sr]=Умањите тако да се све површи поређају једна до друге у мрежи
Comment[sr@ijekavian]=Умањите тако да се све површи поређају једна до друге у мрежи
Comment[sr@ijekavianlatin]=Umanjite tako da se sve površi poređaju jedna do druge u mreži

View File

@ -81,6 +81,7 @@ DesktopGridEffectConfig::DesktopGridEffectConfig(QWidget* parent, const QVariant
addConfig(DesktopGridConfig::self(), m_ui);
connect(m_ui->kcfg_LayoutMode, SIGNAL(currentIndexChanged(int)), this, SLOT(layoutSelectionChanged()));
connect(m_ui->desktopNameAlignmentCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(m_ui->shortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
load();
layoutSelectionChanged();

View File

@ -27,6 +27,10 @@ var dialogParentEffect = {
if (window === null || window.modal === false) {
return;
}
dialogParentEffect.dialogGotModality(window)
},
dialogGotModality: function (window) {
"use strict";
mainWindows = window.mainWindows();
for (i = 0; i < mainWindows.length; i += 1) {
w = mainWindows[i];
@ -60,6 +64,10 @@ var dialogParentEffect = {
if (window.modal === false) {
return;
}
dialogParentEffect.dialogLostModality(window);
},
dialogLostModality: function (window) {
"use strict";
mainWindows = window.mainWindows();
for (i = 0; i < mainWindows.length; i += 1) {
w = mainWindows[i];
@ -96,10 +104,17 @@ var dialogParentEffect = {
windows = effects.stackingOrder;
for (i = 0; i < windows.length; i += 1) {
window = windows[i];
dialogParentEffect.cancelAnimation(window);
dialogParentEffect.cancelAnimation(window);
dialogParentEffect.restartAnimation(window);
}
},
modalDialogChanged: function(dialog) {
"use strict";
if (dialog.modal === false)
dialogParentEffect.dialogLostModality(dialog);
else if (dialog.modal === true)
dialogParentEffect.dialogGotModality(dialog);
},
restartAnimation: function (window) {
"use strict";
if (window === null || window.findModal() === null) {
@ -110,10 +125,11 @@ var dialogParentEffect = {
init: function () {
"use strict";
var i, windows;
effects.windowActivated.connect(dialogParentEffect.windowAdded);
effects.windowAdded.connect(dialogParentEffect.windowAdded);
effects.windowClosed.connect(dialogParentEffect.windowClosed);
effects.windowMinimized.connect(dialogParentEffect.cancelAnimation);
effects.windowUnminimized.connect(dialogParentEffect.restartAnimation);
effects.windowModalityChanged.connect(dialogParentEffect.modalDialogChanged)
effects['desktopChanged(int,int)'].connect(dialogParentEffect.desktopChanged);
// start animation

View File

@ -19,7 +19,7 @@ Name[fi]=Kääntövaihtaja
Name[fr]=Empilement en perspective
Name[fy]=Flip wiksel
Name[ga]=Flip Switch
Name[gl]=Mudanza en fila
Name[gl]=Cambio en fila
Name[gu]=ફ્લિપ સ્વિચ
Name[he]=מחליף ערמה
Name[hi]=स्विच बदलें

View File

@ -26,7 +26,7 @@ Name[fi]=Kääntövaihtaja
Name[fr]=Empilement en perspective
Name[fy]=Flip wiksel
Name[ga]=Flip Switch
Name[gl]=Mudanza en fila
Name[gl]=Cambio en fila
Name[gu]=ફ્લિપ સ્વિચ
Name[he]=מחליף ערמה
Name[hi]=स्विच बदलें

View File

@ -14,8 +14,8 @@ void main()
tex.rgb = tex.rgb * vec3( saturation ) + desaturated * vec3( 1.0 - saturation );
}
tex *= modulation;
tex.rgb = vec3(1.0) - tex.rgb;
tex *= modulation;
tex.rgb *= tex.a;
gl_FragColor = tex;

View File

@ -17,8 +17,8 @@ void main()
tex.rgb = tex.rgb * vec3( saturation ) + desaturated * vec3( 1.0 - saturation );
}
tex *= modulation;
tex.rgb = vec3(1.0) - tex.rgb;
tex *= modulation;
tex.rgb *= tex.a;
fragColor = tex;

View File

@ -1,13 +1,20 @@
[Desktop Entry]
Name=Kscreen
Name[bs]=KScreen
Name[ca]=Kscreen
Name[cs]=Kscreen
Name[da]=KScreen
Name[de]=Kscreen
Name[el]=Kscreen
Name[es]=Kscreen
Name[fi]=KScreen
Name[fr]=KScreen
Name[gl]=KScreen
Name[hu]=Kscreen
Name[ia]=Kscreen
Name[it]=Kscreen
Name[kk]=Kscreen
Name[ko]=Kscreen
Name[nl]=Kscreen
Name[pa]=ਕੇਸਕਰੀਨ
Name[pt]=Kscreen
@ -20,20 +27,27 @@ Name[sr@ijekavian]=К‑екран
Name[sr@ijekavianlatin]=Kekran
Name[sr@latin]=Kekran
Name[sv]=Kskärm
Name[tr]=Kscreen
Name[uk]=Kscreen
Name[x-test]=xxKscreenxx
Name[zh_CN]=Kscreen
Name[zh_TW]=Kscreen
Icon=preferences-system-windows-effect-kscreen
Comment=Helper Effect for KScreen
Comment[bs]=Pomoćni efekat za KScreen
Comment[ca]=Efecte auxiliar pel KScreen
Comment[cs]=Pomocný efekt pro KScreen
Comment[da]=Hjælpeeffekt til KScreen
Comment[de]=Hilfseffekt für KScreen
Comment[es]=Efecto auxiliar para KScreen
Comment[fi]=Avustajatehoste KScreenille
Comment[fr]=Effet d'assistance pour KScreen
Comment[gl]=Efecto auxiliar para KScreen.
Comment[hu]=Segédeffektus a KScreenhez
Comment[ia]=Effecto de adjutante pro KScreen
Comment[it]=Effetto di assistenza per KScreen
Comment[kk]=KScreen-нің көмек эффекті
Comment[ko]=KScreen 도우미 효과
Comment[nl]=Effect van hulp voor KScreen
Comment[pa]=ਕੇਸਕਰੀਨ ਲਈ ਮੱਦਦ ਪ੍ਰਭਾਵ
Comment[pt]=Efeito auxiliar do KScreen
@ -46,6 +60,7 @@ Comment[sr@ijekavian]=Помоћни ефекат за К‑екран
Comment[sr@ijekavianlatin]=Pomoćni efekat za Kekran
Comment[sr@latin]=Pomoćni efekat za Kekran
Comment[sv]=Hjälpeffekt för Kskärm
Comment[tr]=KScreen için Yardımcı Efekt
Comment[uk]=Допоміжний ефект KScreen
Comment[x-test]=xxHelper Effect for KScreenxx
Comment[zh_CN]=KScreen 的帮助效果

View File

@ -15,6 +15,13 @@ install( FILES
# Data files
install( FILES
logout/data/vignetting.frag
logout/data/logout-blur.frag
DESTINATION ${DATA_INSTALL_DIR}/kwin )
logout/data/1.10/vignetting.frag
logout/data/1.10/logout-blur.frag
DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.10
)
install( FILES
logout/data/1.40/vignetting.frag
logout/data/1.40/logout-blur.frag
DESTINATION ${DATA_INSTALL_DIR}/kwin/shaders/1.40
)

View File

@ -50,6 +50,7 @@ LogoutEffect::LogoutEffect()
, ignoredWindows()
, m_vignettingShader(NULL)
, m_blurShader(NULL)
, m_shadersDir(QStringLiteral("kwin/shaders/1.10/"))
{
// Persistent effect
logoutAtom = XInternAtom(display(), "_KDE_LOGGING_OUT", False);
@ -71,6 +72,14 @@ LogoutEffect::LogoutEffect()
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
#ifdef KWIN_HAVE_OPENGLES
const qint64 coreVersionNumber = kVersionNumber(3, 0);
#else
const qint64 coreVersionNumber = kVersionNumber(1, 40);
#endif
if (GLPlatform::instance()->glslVersion() >= coreVersionNumber)
m_shadersDir = QStringLiteral("kwin/shaders/1.40/");
}
LogoutEffect::~LogoutEffect()
@ -296,10 +305,8 @@ void LogoutEffect::renderVignetting()
return;
}
if (!m_vignettingShader) {
QString shader = GLPlatform::instance()->glslVersion() >= kVersionNumber(1, 40) ?
QStringLiteral("kwin/vignetting-140.frag") : QStringLiteral("kwin/vignetting.frag");
m_vignettingShader = ShaderManager::instance()->loadFragmentShader(KWin::ShaderManager::ColorShader,
KGlobal::dirs()->findResource("data", shader));
KGlobal::dirs()->findResource("data", m_shadersDir + QStringLiteral("vignetting.frag")));
if (!m_vignettingShader->isValid()) {
kDebug(1212) << "Vignetting Shader failed to load";
return;
@ -378,10 +385,8 @@ void LogoutEffect::renderBlurTexture()
return;
}
if (!m_blurShader) {
QString shader = GLPlatform::instance()->glslVersion() >= kVersionNumber(1, 40) ?
QStringLiteral("kwin/logout-blur-140.frag") : QStringLiteral("kwin/logout-blur.frag");
m_blurShader = ShaderManager::instance()->loadFragmentShader(KWin::ShaderManager::SimpleShader,
KGlobal::dirs()->findResource("data", shader));
KGlobal::dirs()->findResource("data", m_shadersDir + QStringLiteral("logout-blur.frag")));
if (!m_blurShader->isValid()) {
kDebug(1212) << "Logout blur shader failed to load";
}

View File

@ -76,7 +76,7 @@ Name[te]=లాగ్అవుట్
Name[tg]=Баромадан
Name[th]=ลงบันทึกออกจากระบบ
Name[tr]=Çıkış
Name[ug]=تىزىمدىن چىىش
Name[ug]=تىزىمدىن چىقىش
Name[uk]=Вихід
Name[uz]=Chiqish
Name[uz@cyrillic]=Чиқиш

View File

@ -82,6 +82,7 @@ private:
QHash< EffectWindow*, double > windowsOpacities;
GLShader *m_vignettingShader;
GLShader *m_blurShader;
QString m_shadersDir;
};
} // namespace

View File

@ -258,7 +258,7 @@ void MagnifierEffect::zoomIn()
polling = true;
effects->startMousePolling();
}
if (!m_texture) {
if (effects->isOpenGLCompositing() && !m_texture) {
m_texture = new GLTexture(magnifier_size.width(), magnifier_size.height());
m_texture->setYInverted(false);
m_fbo = new GLRenderTarget(*m_texture);
@ -269,7 +269,7 @@ void MagnifierEffect::zoomIn()
void MagnifierEffect::zoomOut()
{
target_zoom /= 1.2;
if (target_zoom < 1) {
if (target_zoom <= 1) {
target_zoom = 1;
if (polling) {
polling = false;
@ -296,7 +296,7 @@ void MagnifierEffect::toggle()
polling = true;
effects->startMousePolling();
}
if (!m_texture) {
if (effects->isOpenGLCompositing() && !m_texture) {
m_texture = new GLTexture(magnifier_size.width(), magnifier_size.height());
m_texture->setYInverted(false);
m_fbo = new GLRenderTarget(*m_texture);

View File

@ -74,7 +74,7 @@ Name[te]=మాగ్నిఫైర్
Name[tg]=Увеличитель
Name[th]=แว่นขยาย
Name[tr]=Büyüteç
Name[ug]=لوپا ئەينەك
Name[ug]=چوڭايتقۇچ
Name[uk]=Лупа
Name[uz]=Kattalashtiruvchi
Name[uz@cyrillic]=Катталаштирувчи

View File

@ -81,7 +81,7 @@ Name[te]=మాగ్నిఫైర్
Name[tg]=Увеличитель
Name[th]=แว่นขยาย
Name[tr]=Büyüteç
Name[ug]=لوپا ئەينەك
Name[ug]=چوڭايتقۇچ
Name[uk]=Лупа
Name[uz]=Kattalashtiruvchi
Name[uz@cyrillic]=Катталаштирувчи

View File

@ -1,5 +1,6 @@
[Desktop Entry]
Comment=Animation for a window going to maximize/restore from maximize
Comment[bs]=Animacija za prozor koji ide u maksimiziranje/vraćanje iz maksimiziranja
Comment[ca]=Animació per una finestra que es maximitza/restaura des de maximització
Comment[ca@valencia]=Animació per una finestra que es maximitza/restaura des de maximització
Comment[da]=Animation til et vindue der er ved at maksimere/gendanne fra maksimering
@ -39,6 +40,7 @@ Comment[zh_TW]=視窗最大化/回復時的動畫
Encoding=UTF-8
Icon=preferences-system-windows-effect-maximize
Name=Maximize
Name[bs]=Maksimiziraj
Name[ca]=Maximitza
Name[ca@valencia]=Maximitza
Name[cs]=Maximalizovat
@ -76,6 +78,7 @@ Name[sr@ijekavianlatin]=Maksimizovanje
Name[sr@latin]=Maksimizovanje
Name[sv]=Maximera
Name[tr]=Ekranı Kapla
Name[ug]=چوڭايت
Name[uk]=Максимізація
Name[x-test]=xxMaximizexx
Name[zh_CN]=最大化效果

View File

@ -1,5 +1,6 @@
[Desktop Entry]
Name=Mouse Click Animation
Name[bs]=Animacija klika mišem
Name[ca]=Animació de clic de ratolí
Name[ca@valencia]=Animació de clic de ratolí
Name[cs]=Animace kliknutí myši
@ -43,6 +44,7 @@ Name[zh_TW]=滑鼠點擊動畫
Icon=preferences-system-windows-effect-mouseclick
Comment=Creates an animation whenever a mouse button is clicked. This is useful for screenrecordings/presentations.
Comment[bs]=Kreira animaciju kada se god protosne dugme miša. To je korisno zasnimanje ekrana/prezentacije.
Comment[ca]=Crea una animació quan es fa clic amb un botó del ratolí. Això és útil per enregistrar la pantalla o en presentacions.
Comment[ca@valencia]=Crea una animació quan es fa clic amb un botó del ratolí. Això és útil per enregistrar la pantalla o en presentacions.
Comment[da]=Opretter en animation når der klikkes på en museknap. Dette er nyttigt til skærmoptagelser/præsentationer.
@ -57,7 +59,7 @@ Comment[hu]=Animációt hoz létre, amikor az egérgombbal kattintanak. Ez haszn
Comment[ia]=Crea un animation quando un button de mus es pressate. Isto es util pro registrationes de schermo/presentationes
Comment[it]=Crea un'animazione ogni volta che viene premuto un pulsante del mouse. Utile per registrazioni dello schermo o presentazioni.
Comment[kk]=Тышқанның батырмасын түрткенде анимацияны жасайды.Экраннан демонстацияны түсіргнде/презентацияны жасағанда ыңғайлы.
Comment[ko]=마우스 단추를 눌렀을 때 애니메이션을 표시합니다. 화면 녹화/프젠테이션에서 유용합니다.
Comment[ko]=마우스 단추를 눌렀을 때 애니메이션을 표시합니다. 화면 녹화/프젠테이션에서 유용합니다.
Comment[lt]=Kuria animaciją kai pelės mygtukas paspaudžiamas. Tai naudojama ekrano įrašymams / pristatymams.
Comment[mr]=जेव्हा माऊस बटन क्लिक केले जाईल तेव्हा ऍनीमेशन करा. स्क्रीन रेकोर्डींग व प्रेझेंटेशनच्या वेळी हे उपयोगी आहे.
Comment[nb]=Lager en animasjon hver gang en museknapp trykkes. Dette er nyttig for skjermopptak/presentasjoner.

View File

@ -7,6 +7,7 @@ X-KDE-ParentComponents=kwin4_effect_mouseclick
X-KDE-PluginKeyword=mouseclick
Name=Mouse Click Animation
Name[bs]=Animacija klika mišem
Name[ca]=Animació de clic de ratolí
Name[ca@valencia]=Animació de clic de ratolí
Name[cs]=Animace kliknutí myši

View File

@ -26,7 +26,6 @@ Item {
Plasma.Button {
id: closeButton
objectName: "closeButton"
enabled: armed
iconSource: "window-close"
anchors.fill: parent
}

View File

@ -62,6 +62,7 @@ PresentWindowsEffect::PresentWindowsEffect()
, m_hasKeyboardGrab(false)
, m_mode(ModeCurrentDesktop)
, m_managerWindow(NULL)
, m_needInitialSelection(false)
, m_highlightedWindow(NULL)
, m_filterFrame(NULL)
, m_closeView(NULL)
@ -221,6 +222,10 @@ void PresentWindowsEffect::postPaintScreen()
}
effects->setActiveFullScreenEffect(NULL);
effects->addRepaintFull();
} else if (m_activated && m_needInitialSelection) {
m_needInitialSelection = false;
QMouseEvent me(QEvent::MouseMove, cursorPos(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
windowInputMouseEvent(&me);
}
// Update windows that are changing brightness or opacity
@ -330,7 +335,7 @@ void PresentWindowsEffect::paintWindow(EffectWindow *w, int mask, QRegion region
m_motionManager.apply(w, data);
QRect rect = m_motionManager.transformedGeometry(w).toRect();
if (m_activated && winData->highlight > 0.0 && !m_motionManager.areWindowsMoving()) {
if (m_activated && winData->highlight > 0.0) {
// scale the window (interpolated by the highlight level) to at least 105% or to cover 1/16 of the screen size - yet keep it in screen bounds
QRect area = effects->clientArea(FullScreenArea, w);
@ -533,6 +538,7 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
// We cannot use m_motionManager.windowAtPoint() as the window might not be visible
EffectWindowList windows = m_motionManager.managedWindows();
bool hovering = false;
EffectWindow *highlightCandidate = NULL;
for (int i = 0; i < windows.size(); ++i) {
DataHash::const_iterator winData = m_windowData.constFind(windows.at(i));
if (winData == m_windowData.constEnd())
@ -541,7 +547,7 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
winData->visible && !winData->deleted) {
hovering = true;
if (windows.at(i) && m_highlightedWindow != windows.at(i) && !m_dragInProgress)
setHighlightedWindow(windows.at(i));
highlightCandidate = windows.at(i);
break;
}
}
@ -553,6 +559,8 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
m_closeView->hide();
if (e->type() == QEvent::MouseButtonRelease) {
if (highlightCandidate)
setHighlightedWindow(highlightCandidate);
if (me->button() == Qt::LeftButton) {
if (m_dragInProgress && m_dragWindow) {
// handle drop
@ -612,13 +620,16 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
}
effects->defineCursor(Qt::PointingHandCursor);
} else if (e->type() == QEvent::MouseButtonPress && me->button() == Qt::LeftButton && hovering && m_dragToClose) {
if (highlightCandidate)
setHighlightedWindow(highlightCandidate);
m_dragStart = me->pos();
m_dragWindow = m_highlightedWindow;
m_dragInProgress = false;
m_highlightedDropTarget = NULL;
effects->setElevatedWindow(m_dragWindow, true);
effects->addRepaintFull();
}
} else if (highlightCandidate && !m_motionManager.areWindowsMoving())
setHighlightedWindow(highlightCandidate);
if (e->type() == QEvent::MouseMove && m_dragWindow) {
if ((me->pos() - m_dragStart).manhattanLength() > KGlobalSettings::dndEventDelay() && !m_dragInProgress) {
m_dragInProgress = true;
@ -1471,6 +1482,7 @@ void PresentWindowsEffect::setActive(bool active)
return;
m_activated = active;
if (m_activated) {
m_needInitialSelection = true;
m_closeButtonCorner = (Qt::Corner)effects->kwinOption(KWin::CloseButtonCorner).toInt();
m_decalOpacity = 0.0;
m_highlightedWindow = NULL;
@ -1545,6 +1557,7 @@ void PresentWindowsEffect::setActive(bool active)
}
}
} else {
m_needInitialSelection = false;
if (m_highlightedWindow)
effects->setElevatedWindow(m_highlightedWindow, false);
// Fade in/out all windows
@ -1945,8 +1958,6 @@ CloseWindowView::CloseWindowView(QWindow *parent)
setFlags(Qt::X11BypassWindowManagerHint);
setColor(Qt::transparent);
rootContext()->setContextProperty(QStringLiteral("armed"), QVariant(false));
setSource(QUrl(KStandardDirs::locate("data", QStringLiteral("kwin/effects/presentwindows/main.qml"))));
if (QObject *item = rootObject()->findChild<QObject*>(QStringLiteral("closeButton"))) {
connect(item, SIGNAL(clicked()), SIGNAL(requestClose()));
@ -1955,15 +1966,14 @@ CloseWindowView::CloseWindowView(QWindow *parent)
// setup the timer - attempt to prevent accidental clicks
m_armTimer->setSingleShot(true);
m_armTimer->setInterval(350); // 50ms until the window is elevated (seen!) and 300ms more to be "realized" by the user.
connect(m_armTimer, SIGNAL(timeout()), SLOT(arm()));
}
void CloseWindowView::windowInputMouseEvent(QMouseEvent *e)
{
if (m_armTimer->isActive())
return;
if (e->type() == QEvent::MouseMove) {
mouseMoveEvent(e);
} else if (m_armTimer->isActive()) {
return;
} else if (e->type() == QEvent::MouseButtonPress) {
mousePressEvent(e);
} else if (e->type() == QEvent::MouseButtonDblClick) {
@ -1973,17 +1983,19 @@ void CloseWindowView::windowInputMouseEvent(QMouseEvent *e)
}
}
void CloseWindowView::arm()
{
rootContext()->setContextProperty(QStringLiteral("armed"), QVariant(true));
}
void CloseWindowView::disarm()
{
rootContext()->setContextProperty(QStringLiteral("armed"), QVariant(false));
m_armTimer->start();
}
void CloseWindowView::hideEvent(QHideEvent *event)
{
const QPoint globalPos = mapToGlobal(QPoint(-1,-1));
QMouseEvent me(QEvent::MouseMove, QPoint(-1,-1), globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
mouseMoveEvent(&me);
QQuickView::hideEvent(event);
}
} // namespace
#include "presentwindows.moc"

View File

@ -39,12 +39,13 @@ public:
explicit CloseWindowView(QWindow *parent = 0);
void windowInputMouseEvent(QMouseEvent* e);
void disarm();
public Q_SLOTS:
void arm();
Q_SIGNALS:
void requestClose();
protected:
void hideEvent(QHideEvent *event);
private:
QTimer* m_armTimer;
};
@ -281,6 +282,7 @@ private:
EffectWindowList m_selectedWindows;
EffectWindow *m_managerWindow;
QString m_class;
bool m_needInitialSelection;
// Window data
WindowMotionManager m_motionManager;

View File

@ -37,7 +37,8 @@ namespace KWin
KWIN_EFFECT(resize, ResizeEffect)
ResizeEffect::ResizeEffect()
: m_active(false)
: AnimationEffect()
, m_active(false)
, m_resizeWindow(0)
{
reconfigure(ReconfigureAll);
@ -55,14 +56,14 @@ void ResizeEffect::prePaintScreen(ScreenPrePaintData& data, int time)
if (m_active) {
data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS;
}
effects->prePaintScreen(data, time);
AnimationEffect::prePaintScreen(data, time);
}
void ResizeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time)
{
if (m_active && w == m_resizeWindow)
data.mask |= PAINT_WINDOW_TRANSFORMED;
effects->prePaintWindow(w, data, time);
AnimationEffect::prePaintWindow(w, data, time);
}
void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
@ -118,8 +119,9 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
}
#endif
}
} else
effects->paintWindow(w, mask, region, data);
} else {
AnimationEffect::paintWindow(w, mask, region, data);
}
}
void ResizeEffect::reconfigure(ReconfigureFlags)
@ -148,6 +150,8 @@ void ResizeEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
if (m_active && w == m_resizeWindow) {
m_active = false;
m_resizeWindow = NULL;
if (m_features & TextureScale)
animate(w, CrossFadePrevious, 0, 150, FPx2(1.0));
effects->addRepaintFull();
}
}

View File

@ -21,7 +21,7 @@ Name[fi]=Ikkunan koon muuttaminen
Name[fr]=Redimensionner la fenêtre
Name[fy]=Finstergrutte feroarje
Name[ga]=Athraigh Méid na Fuinneoige
Name[gl]=Mudar o tamaño da xanela
Name[gl]=Cambiar o tamaño da xanela
Name[gu]=વિન્ડોનું માપ બદલો
Name[he]=שינוי גודל חלון
Name[hi]=विंडो आकार बदलें
@ -84,7 +84,7 @@ Comment[et]=Akende suuruse muutmine kiire tekstuuri skaleerimisega sisu uuendami
Comment[eu]=Leihoen neurria aldatzen du testura eskalatze azkar batekin edukia eguneratu ordez
Comment[fi]=Käyttää ikkunan kokoa muutettaessa nopeaa tekstuurin skaalausta sisällön päivittämisen sijaan
Comment[fr]=Redimensionne les fenêtres à l'aide d'une échelle texturée rapide au lieu de mettre à jour les contenus
Comment[gl]=Muda o tamaño das xanelas escalando cunha textura rápida no canto de actualizar o contido
Comment[gl]=Cambia o tamaño das xanelas escalando cunha textura rápida no canto de actualizar o contido
Comment[he]=שינוי גודל החלון על־ידי שינוי מהיר של גודל המבנה במקום לעדכן את התוכן
Comment[hr]=Mijenja veličinu prozora brzim skaliranjem teksture umjesto ažuriranjem sadržaja
Comment[hu]=Gyors textúraskálázással méretezi át az ablakokat a tartalom frissítése helyett

View File

@ -21,13 +21,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_RESIZE_H
#define KWIN_RESIZE_H
#include <kwineffects.h>
#include <kwinanimationeffect.h>
namespace KWin
{
class ResizeEffect
: public Effect
: public AnimationEffect
{
Q_OBJECT
Q_PROPERTY(bool textureScale READ isTextureScale)
@ -38,7 +38,7 @@ public:
virtual inline bool provides(Effect::Feature ef) {
return ef == Effect::Resize;
}
inline bool isActive() const { return m_active; }
inline bool isActive() const { return m_active || AnimationEffect::isActive(); }
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);

View File

@ -28,7 +28,7 @@ Name[fi]=Ikkunan koon muuttaminen
Name[fr]=Redimensionner la fenêtre
Name[fy]=Finstergrutte feroarje
Name[ga]=Athraigh Méid na Fuinneoige
Name[gl]=Mudar o tamaño da xanela
Name[gl]=Cambiar o tamaño da xanela
Name[gu]=વિન્ડોનું માપ બદલો
Name[he]=שינוי גודל חלון
Name[hi]=विंडो आकार बदलें

View File

@ -1,7 +1,9 @@
[Desktop Entry]
Name=Screen Edge
Name[bs]=Ivice ekrana
Name[ca]=Vora de la pantalla
Name[cs]=Hrana obrazovky
Name[da]=Skærmkant
Name[de]=Bildschirmkante
Name[el]=Άκρο οθόνης
Name[es]=Borde de la pantalla
@ -10,7 +12,9 @@ Name[fr]=Bord de l'écran
Name[gl]=Beira da pantalla
Name[hu]=Képernyőszél
Name[ia]=Margines de schermo
Name[it]=Bordo dello schermo
Name[kk]=Экран жиегі
Name[ko]=화면 경계
Name[lt]=Ekrano kraštas
Name[mr]=स्क्रीन किनारा
Name[nb]=Skjermkant
@ -28,14 +32,17 @@ Name[sr@ijekavianlatin]=Ivica ekrana
Name[sr@latin]=Ivica ekrana
Name[sv]=Skärmkant
Name[tr]=Ekran Kenarı
Name[ug]=ئېكران گىرۋىكى
Name[uk]=Край екрана
Name[x-test]=xxScreen Edgexx
Name[zh_CN]=屏幕边缘
Name[zh_TW]=螢幕邊緣
Icon=preferences-system-windows-effect-screenedge
Comment=Highlights a screen edge when approaching
Comment[bs]=Označava ivicu ekrana pri približavanju
Comment[ca]=Ressalta la vora de la pantalla en aproximar-se
Comment[cs]=Zvýrazní hranu obrazovky při přiblížení k ní
Comment[da]=Fremhæver en skærmkant når den nærmer sig
Comment[de]=Bildschirmkante bei Annäherung hervorheben
Comment[el]=Εμφανίζει τονισμένο το άκρο της οθόνης όταν το πλησιάζετε
Comment[es]=Resalta el borde de la pantalla al aproximarse a él
@ -44,7 +51,9 @@ Comment[fr]=Mettre en valeur le bord de l'écran à l'approche
Comment[gl]=Realza unha beira da pantalla cando se aproxima
Comment[hu]=Kiemeli a képernyő szélét megközelítéskor
Comment[ia]=Evidentia un margine de schermo quando on approxima se
Comment[it]=Evidenzia il bordo dello schermo quando ti avvicini
Comment[kk]=Экран жиегіне жақындағанда оны бояп белгілеу
Comment[ko]=화면 경계에 도달할 때 강조하기
Comment[lt]=Paryškina ekrano kraštą kai priartėjama
Comment[mr]=पोहोचताना स्क्रीन किनारे ठळक करतो
Comment[nb]=Fremhever en skjermkant når den kommer nær

View File

@ -54,7 +54,7 @@ Name[sv]=Skärmbild
Name[tg]=Сурати экран
Name[th]=จับภาพหน้าจอ
Name[tr]=Ekran Görüntüsü
Name[ug]=ئېكران كەسمىسى
Name[ug]=ئېكران كۆرۈنۈشى
Name[uk]=Знімок вікна
Name[wa]=Waitroûlêye
Name[x-test]=xxScreenshotxx

View File

@ -232,7 +232,18 @@ void ShowFpsEffect::paintGL(int fps)
paintDrawSizeGraph(x, y);
// Paint FPS numerical value
paintFPSText(fps);
if (fpsTextRect.isValid()) {
delete fpsText;
fpsText = new GLTexture(fpsTextImage(fps));
fpsText->bind();
ShaderBinder binder(ShaderManager::SimpleShader);
if (effects->compositingType() == OpenGL2Compositing) {
binder.shader()->setUniform("offset", QVector2D(0, 0));
}
fpsText->render(QRegion(fpsTextRect), fpsTextRect);
fpsText->unbind();
effects->addRepaint(fpsTextRect);
}
// Paint paint sizes
glDisable(GL_BLEND);
@ -284,6 +295,15 @@ void ShowFpsEffect::paintXrender(int fps)
// Paint amount of rendered pixels graph
paintDrawSizeGraph(x + FPS_WIDTH + MAX_TIME, y);
// Paint FPS numerical value
if (fpsTextRect.isValid()) {
QImage textImg(fpsTextImage(fps));
XRenderPicture textPic(textImg);
xcb_render_composite(connection(), XCB_RENDER_PICT_OP_OVER, textPic, XCB_RENDER_PICTURE_NONE,
effects->xrenderBufferPicture(), 0, 0, 0, 0, fpsTextRect.x(), fpsTextRect.y(), textImg.width(), textImg.height());
effects->addRepaint(fpsTextRect);
}
}
#endif
@ -450,26 +470,16 @@ void ShowFpsEffect::postPaintScreen()
effects->addRepaint(fps_rect);
}
void ShowFpsEffect::paintFPSText(int fps)
QImage ShowFpsEffect::fpsTextImage(int fps)
{
if (!fpsTextRect.isValid())
return;
QImage im(100, 100, QImage::Format_ARGB32);
im.fill(0);
im.fill(Qt::transparent);
QPainter painter(&im);
painter.setFont(textFont);
painter.setPen(textColor);
painter.drawText(QRect(0, 0, 100, 100), textAlign, QString::number(fps));
delete fpsText;
fpsText = new GLTexture(im);
fpsText->bind();
ShaderBinder binder(ShaderManager::SimpleShader);
if (effects->compositingType() == OpenGL2Compositing) {
binder.shader()->setUniform("offset", QVector2D(0, 0));
}
fpsText->render(QRegion(fpsTextRect), fpsTextRect);
fpsText->unbind();
effects->addRepaint(fpsTextRect);
painter.end();
return im;
}
} // namespace

View File

@ -80,7 +80,7 @@ private:
void paintFPSGraph(int x, int y);
void paintDrawSizeGraph(int x, int y);
void paintGraph(int x, int y, QList<int> values, QList<int> lines, bool colorize);
void paintFPSText(int fps);
QImage fpsTextImage(int fps);
QTime t;
enum { NUM_PAINTS = 100 }; // remember time needed to paint this many paints
int paints[ NUM_PAINTS ]; // time needed to paint

View File

@ -70,13 +70,19 @@ Name[zh_TW]=往回滑動
Type=Service
Comment=Slide back windows when another window is raised
Comment[bs]=Kliza unazad prozore kada se drugi prozor oslobodi
Comment[ca]=Llisca enrere les finestres quan s'eleva una altra finestra
Comment[da]=Glid vinduer tilbage når et andet vinduet hæves
Comment[de]=Fenster nach hinten gleiten wenn ein anderes Fenster aktiviert wird.
Comment[es]=Desliza las ventanas atrás cuando una ventana pasa a primer plano
Comment[fi]=Ikkunaa nostettaessa liuuttaa muut ikkunat sen taakse
Comment[fr]=Faire glisser en arrière les fenêtres lors de l'apparition d'une autre fenêtre
Comment[gl]=Despraza cara atrás as xanelas cando outra se eleva
Comment[hu]=Ablakok visszacsúsztatása másik ablak előtérbe hozásakor
Comment[ia]=Glissa retro fenestras quando un altere fenestra es elevate
Comment[it]=Fai scivolare indietro le altre finestre quando una nuova finestra appare
Comment[kk]=Басқа терезе алдына шығарылғанда терезелерді сырғанату.
Comment[ko]=다른 창을 올렸을 때 창 뒤로 밀기
Comment[lt]=Slinkti atgal langus, kai kitas langas yra pakeliamas
Comment[nb]=Skyv tilbake vinduer når et annet vindu heves
Comment[nl]=Schuif vensters terug wanneer een ander venster omhoog komt

View File

@ -155,7 +155,9 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
switch(m_type) {
case BouncingFeedback:
m_progress = (m_progress + time) % BOUNCE_DURATION;
m_frame = qRound((qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION) % BOUNCE_FRAMES;;
m_frame = qRound((qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION) % BOUNCE_FRAMES;
m_currentGeometry = feedbackRect(); // bounce alters geometry with m_frame
data.paint.unite(m_currentGeometry);
break;
case BlinkingFeedback:
m_progress = (m_progress + time) % BLINKING_DURATION;
@ -164,10 +166,6 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
default:
break; // nothing
}
data.paint.unite(m_dirtyRect);
m_dirtyRect = QRect();
m_currentGeometry = feedbackRect();
data.paint.unite(m_currentGeometry);
}
effects->prePaintScreen(data, time);
}
@ -243,18 +241,9 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat
void StartupFeedbackEffect::postPaintScreen()
{
if (m_active) {
switch(m_type) {
case BouncingFeedback: // fall through
case BlinkingFeedback:
// repaint the icon
m_dirtyRect = m_currentGeometry;
effects->addRepaint(m_dirtyRect);
break;
case PassiveFeedback: // fall through
default:
// no need to repaint - no change
break;
}
m_dirtyRect = m_currentGeometry; // ensure the now dirty region is cleaned on the next pass
if (m_type == BlinkingFeedback || m_type == BouncingFeedback)
effects->addRepaint(m_dirtyRect); // we also have to trigger a repaint
}
effects->postPaintScreen();
}
@ -324,7 +313,7 @@ void StartupFeedbackEffect::start(const QString& icon)
iconPixmap = SmallIcon(QStringLiteral("system-run"));
prepareTextures(iconPixmap);
m_dirtyRect = m_currentGeometry = feedbackRect();
effects->addRepaintFull();
effects->addRepaint(m_dirtyRect);
}
void StartupFeedbackEffect::stop()

View File

@ -148,7 +148,7 @@ void WindowGeometry::slotWindowStepUserMovedResized(EffectWindow *w, const QRect
{
if (iAmActivated && iAmActive && w == myResizeWindow) {
if (myExtraDirtyArea.isValid())
w->addLayerRepaint(myExtraDirtyArea);
effects->addRepaint(myExtraDirtyArea);
myExtraDirtyArea = QRect();
@ -200,11 +200,9 @@ void WindowGeometry::slotWindowStepUserMovedResized(EffectWindow *w, const QRect
myExtraDirtyArea |= myMeasure[1]->geometry();
myExtraDirtyArea |= myMeasure[2]->geometry();
myExtraDirtyArea.adjust(-6,-6,6,6);
if (w->expandedGeometry().contains(myExtraDirtyArea))
myExtraDirtyArea = QRect();
if (myExtraDirtyArea.isValid())
w->addLayerRepaint(myExtraDirtyArea);
effects->addRepaint(myExtraDirtyArea);
}
}

View File

@ -69,7 +69,7 @@ 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 son déplacement ou son redimensionnement
Comment[gl]=Mostra a xeometría da xanela ao mover ou mudar o tamaño
Comment[gl]=Mostra a xeometría da xanela ao mover ou cambiar o tamaño
Comment[he]=מציג גדלי החלון בהזזתו או בשינוי גודלו
Comment[hr]=Prikaži geometriju prozora pri micanju i mijenjanju veličine
Comment[hu]=Megjeleníti az ablakméretet mozgatás és átméretezés közben

View File

@ -259,7 +259,8 @@ void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time)
if (zoom == 1.0) {
showCursor();
if (altered) // reset the generic shader to avoid artifacts in plenty other effects
// reset the generic shader to avoid artifacts in plenty other effects
if (altered && effects->isOpenGLCompositing())
ShaderBinder binder(ShaderManager::GenericShader, true);
} else {
hideCursor();

View File

@ -54,6 +54,8 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) :
addConfig(ZoomConfig::self(), m_ui);
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
#warning Global Shortcuts need porting
#if KWIN_QT5_PORTING
// Shortcut config. The shortcut belongs to the component "kwin"!

View File

@ -72,6 +72,11 @@ void EglOnXBackend::init()
}
GLPlatform *glPlatform = GLPlatform::instance();
glPlatform->detect(EglPlatformInterface);
if (GLPlatform::instance()->driver() == Driver_Intel)
options->setUnredirectFullscreen(false); // bug #252817
options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting
if (options->glPreferBufferSwap() == Options::AutoSwapStrategy)
options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen
glPlatform->printResults();
initGL(EglPlatformInterface);
if (!hasGLExtension(QStringLiteral("GL_OES_EGL_image"))) {
@ -275,6 +280,18 @@ void EglOnXBackend::present()
eglWaitGL();
if (char result = m_swapProfiler.end()) {
gs_tripleBufferUndetected = gs_tripleBufferNeedsDetection = false;
if (result == 'd' && GLPlatform::instance()->driver() == Driver_NVidia) {
// TODO this is a workaround, we should get __GL_YIELD set before libGL checks it
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(0);
eglSwapInterval(dpy, 0);
kWarning(1212) << "\nIt seems you are using the nvidia driver without triple buffering\n"
"You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\n"
"For this reason, the tearing prevention has been disabled.\n"
"See https://bugs.kde.org/show_bug.cgi?id=322060\n";
}
}
setBlocksForRetrace(result == 'd');
}
}

View File

@ -59,6 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <X11/Xatom.h>
#include <QX11Info>
#include <xcb/sync.h>
#include <xcb/xcb_icccm.h>
#include "composite.h"
#include "killwindow.h"
@ -1245,10 +1246,10 @@ void Client::checkQuickTilingMaximizationZones(int xroot, int yroot)
QuickTileMode mode = QuickTileNone;
for (int i=0; i<screens()->count(); ++i) {
const QRect &area = screens()->geometry(i);
if (!area.contains(QPoint(xroot, yroot)))
if (!screens()->geometry(i).contains(QPoint(xroot, yroot)))
continue;
QRect area = workspace()->clientArea(MaximizeArea, QPoint(xroot, yroot), desktop());
if (options->electricBorderTiling()) {
if (xroot <= area.x() + 20)
mode |= QuickTileLeft;
@ -1305,15 +1306,15 @@ bool Client::motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_ro
workspace()->scheduleMouseMotionCompression([this, x, y, x_root, y_root]() {
const QRect oldGeo = geometry();
handleMoveResize(x, y, x_root, y_root);
if (!isFullScreen() && isMove() && oldGeo != geometry()) {
if (quick_tile_mode != QuickTileNone) {
if (!isFullScreen() && isMove()) {
if (quick_tile_mode != QuickTileNone && oldGeo != geometry()) {
GeometryUpdatesBlocker blocker(this);
setQuickTileMode(QuickTileNone);
moveOffset = QPoint(double(moveOffset.x()) / double(oldGeo.width()) * double(geom_restore.width()),
double(moveOffset.y()) / double(oldGeo.height()) * double(geom_restore.height()));
moveResizeGeom = geom_restore;
handleMoveResize(x, y, x_root, y_root); // fix position
} else if (isResizable()) {
} else if (quick_tile_mode == QuickTileNone && isResizable()) {
checkQuickTilingMaximizationZones(x_root, y_root);
}
}

View File

@ -56,6 +56,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace KWin
{
static inline int sign(int v) {
return (v > 0) - (v < 0);
}
//********************************************
// Workspace
//********************************************
@ -433,20 +437,20 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
padding[3] = 0;
if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snapX)) {
deltaX = xmin - (cx - padding[0]);
deltaX = xmin - cx;
nx = xmin - padding[0];
}
if ((sOWO ? (rx > xmax) : true) && (qAbs(rx - xmax) < snapX) && (qAbs(xmax - rx) < deltaX)) {
deltaX = rx + padding[1] - xmax;
deltaX = rx - xmax;
nx = xmax - cw + padding[1];
}
if ((sOWO ? (cy < ymin) : true) && (qAbs(ymin - cy) < snapY)) {
deltaY = ymin - (cy - padding[2]);
deltaY = ymin - cy;
ny = ymin - padding[2];
}
if ((sOWO ? (ry > ymax) : true) && (qAbs(ry - ymax) < snapY) && (qAbs(ymax - ry) < deltaY)) {
deltaY = ry + padding[3] - ymax;
deltaY = ry - ymax;
ny = ymax - ch + padding[3];
}
}
@ -456,63 +460,66 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
if (snap) {
QList<Client *>::ConstIterator l;
for (l = clients.constBegin(); l != clients.constEnd(); ++l) {
if ((((*l)->isOnDesktop(c->desktop()) && !(*l)->isMinimized())
|| (c->isOnDesktop(NET::OnAllDesktops) && (*l)->isOnDesktop(VirtualDesktopManager::self()->current())
&& !(*l)->isMinimized()))
&& (!(*l)->tabGroup() || (*l) == (*l)->tabGroup()->current())
&& (*l) != c) {
lx = (*l)->x();
ly = (*l)->y();
lrx = lx + (*l)->width();
lry = ly + (*l)->height();
if ((*l) == c)
continue;
if ((*l)->isMinimized())
continue; // is minimized
if ((*l)->tabGroup() && (*l) != (*l)->tabGroup()->current())
continue; // is not active tab
if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop())))
continue; // wrong virtual desktop
if (!(*l)->isOnCurrentActivity())
continue; // wrong activity
if ((*l)->isDesktop() || (*l)->isSplash())
continue;
if (((cy <= lry) && (cy >= ly)) ||
((ry >= ly) && (ry <= lry)) ||
((cy <= ly) && (ry >= lry))) {
if ((sOWO ? (cx < lrx) : true) && (qAbs(lrx - cx) < snap) && (qAbs(lrx - cx) < deltaX)) {
deltaX = qAbs(lrx - cx);
nx = lrx;
}
if ((sOWO ? (rx > lx) : true) && (qAbs(rx - lx) < snap) && (qAbs(rx - lx) < deltaX)) {
deltaX = qAbs(rx - lx);
nx = lx - cw;
}
}
lx = (*l)->x();
ly = (*l)->y();
lrx = lx + (*l)->width();
lry = ly + (*l)->height();
if (((cx <= lrx) && (cx >= lx)) ||
((rx >= lx) && (rx <= lrx)) ||
((cx <= lx) && (rx >= lrx))) {
if ((sOWO ? (cy < lry) : true) && (qAbs(lry - cy) < snap) && (qAbs(lry - cy) < deltaY)) {
deltaY = qAbs(lry - cy);
ny = lry;
}
//if ( (qAbs( ry-ly ) < snap) && (qAbs( ry - ly ) < deltaY ))
if ((sOWO ? (ry > ly) : true) && (qAbs(ry - ly) < snap) && (qAbs(ry - ly) < deltaY)) {
deltaY = qAbs(ry - ly);
ny = ly - ch;
}
if (((cy <= lry) && (cy >= ly)) || ((ry >= ly) && (ry <= lry)) || ((cy <= ly) && (ry >= lry))) {
if ((sOWO ? (cx < lrx) : true) && (qAbs(lrx - cx) < snap) && (qAbs(lrx - cx) < deltaX)) {
deltaX = qAbs(lrx - cx);
nx = lrx;
}
if ((sOWO ? (rx > lx) : true) && (qAbs(rx - lx) < snap) && (qAbs(rx - lx) < deltaX)) {
deltaX = qAbs(rx - lx);
nx = lx - cw;
}
}
// Corner snapping
if (nx == lrx || nx + cw == lx) {
if ((sOWO ? (ry > lry) : true) && (qAbs(lry - ry) < snap) && (qAbs(lry - ry) < deltaY)) {
deltaY = qAbs(lry - ry);
ny = lry - ch;
}
if ((sOWO ? (cy < ly) : true) && (qAbs(cy - ly) < snap) && (qAbs(cy - ly) < deltaY)) {
deltaY = qAbs(cy - ly);
ny = ly;
}
if (((cx <= lrx) && (cx >= lx)) || ((rx >= lx) && (rx <= lrx)) || ((cx <= lx) && (rx >= lrx))) {
if ((sOWO ? (cy < lry) : true) && (qAbs(lry - cy) < snap) && (qAbs(lry - cy) < deltaY)) {
deltaY = qAbs(lry - cy);
ny = lry;
}
if (ny == lry || ny + ch == ly) {
if ((sOWO ? (rx > lrx) : true) && (qAbs(lrx - rx) < snap) && (qAbs(lrx - rx) < deltaX)) {
deltaX = qAbs(lrx - rx);
nx = lrx - cw;
}
if ((sOWO ? (cx < lx) : true) && (qAbs(cx - lx) < snap) && (qAbs(cx - lx) < deltaX)) {
deltaX = qAbs(cx - lx);
nx = lx;
}
//if ( (qAbs( ry-ly ) < snap) && (qAbs( ry - ly ) < deltaY ))
if ((sOWO ? (ry > ly) : true) && (qAbs(ry - ly) < snap) && (qAbs(ry - ly) < deltaY)) {
deltaY = qAbs(ry - ly);
ny = ly - ch;
}
}
// Corner snapping
if (nx == lrx || nx + cw == lx) {
if ((sOWO ? (ry > lry) : true) && (qAbs(lry - ry) < snap) && (qAbs(lry - ry) < deltaY)) {
deltaY = qAbs(lry - ry);
ny = lry - ch;
}
if ((sOWO ? (cy < ly) : true) && (qAbs(cy - ly) < snap) && (qAbs(cy - ly) < deltaY)) {
deltaY = qAbs(cy - ly);
ny = ly;
}
}
if (ny == lry || ny + ch == ly) {
if ((sOWO ? (rx > lrx) : true) && (qAbs(lrx - rx) < snap) && (qAbs(lrx - rx) < deltaX)) {
deltaX = qAbs(lrx - rx);
nx = lrx - cw;
}
if ((sOWO ? (cx < lx) : true) && (qAbs(cx - lx) < snap) && (qAbs(cx - lx) < deltaX)) {
deltaX = qAbs(cx - lx);
nx = lx;
}
}
}
@ -525,20 +532,16 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
int diffY = qAbs((ymin + ymax) / 2 - (cy + ch / 2));
if (diffX < snap && diffY < snap && diffX < deltaX && diffY < deltaY) {
// Snap to center of screen
deltaX = diffX;
deltaY = diffY;
nx = (xmin + xmax) / 2 - cw / 2;
ny = (ymin + ymax) / 2 - ch / 2;
} else if (options->borderSnapZone()) {
// Enhance border snap
if ((nx == xmin || nx == xmax - cw) && diffY < snap && diffY < deltaY) {
// Snap to vertical center on screen edge
deltaY = diffY;
ny = (ymin + ymax) / 2 - ch / 2;
} else if (((unrestricted ? ny == ymin : ny <= ymin) || ny == ymax - ch) &&
diffX < snap && diffX < deltaX) {
// Snap to horizontal center on screen edge
deltaX = diffX;
nx = (xmin + xmax) / 2 - cw / 2;
}
}
@ -1599,24 +1602,43 @@ const QPoint Client::calculateGravitation(bool invert, int gravity) const
void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool)
{
if (rules()->checkIgnoreGeometry(false))
return; // user said: "FU!"
// "maximized" is a user setting -> we do not allow the client to resize itself
// away from this & against the users explicit wish
kDebug(1212) << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) <<
bool(maximizeMode() & MaximizeVertical) <<
bool(maximizeMode() & MaximizeHorizontal);
if (!app_noborder) { //
if (maximizeMode() & MaximizeVertical)
value_mask &= ~(CWY|CWHeight); // do not allow clients to drop out of vertical ...
if (maximizeMode() & MaximizeHorizontal)
value_mask &= ~(CWX|CWWidth); // .. or horizontal maximization (MaximizeFull == MaximizeVertical|MaximizeHorizontal)
// we want to (partially) ignore the request when the window is somehow maximized or quicktiled
bool ignore = !app_noborder && (quick_tile_mode != QuickTileNone || maximizeMode() != MaximizeRestore);
// however, the user shall be able to force obedience despite and also disobedience in general
ignore = rules()->checkIgnoreGeometry(ignore);
if (!ignore) { // either we're not max'd / q'tiled or the user allowed the client to break that - so break it.
quick_tile_mode = QuickTileNone;
max_mode = MaximizeRestore;
} else if (!app_noborder && quick_tile_mode == QuickTileNone &&
(maximizeMode() == MaximizeVertical || maximizeMode() == MaximizeHorizontal)) {
// ignoring can be, because either we do, or the user does explicitly not want it.
// for partially maximized windows we want to allow configures in the other dimension.
// so we've to ask the user again - to know whether we just ignored for the partial maximization.
// the problem here is, that the user can explicitly permit configure requests - even for maximized windows!
// we cannot distinguish that from passing "false" for partially maximized windows.
ignore = rules()->checkIgnoreGeometry(false);
if (!ignore) { // the user is not interested, so we fix up dimensions
if (maximizeMode() == MaximizeVertical)
value_mask &= ~(CWY|CWHeight);
if (maximizeMode() == MaximizeHorizontal)
value_mask &= ~(CWX|CWWidth);
if (!(value_mask & (CWX|CWWidth|CWY|CWHeight))) {
ignore = true; // the modification turned the request void
}
}
}
if (!(value_mask & (CWX|CWWidth|CWY|CWHeight))) {
if (ignore) {
kDebug(1212) << "DENIED";
return; // nothing to (left) to do for use - bugs #158974, #252314
return; // nothing to (left) to do for use - bugs #158974, #252314, #321491
}
kDebug(1212) << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight));
if (gravity == 0) // default (nonsense) value for the argument
@ -2093,12 +2115,15 @@ void Client::maximize(MaximizeMode m)
void Client::setMaximize(bool vertically, bool horizontally)
{
// changeMaximize() flips the state, so change from set->flip
MaximizeMode oldMode = maximizeMode();
changeMaximize(
max_mode & MaximizeVertical ? !vertically : vertically,
max_mode & MaximizeHorizontal ? !horizontally : horizontally,
false);
emit clientMaximizedStateChanged(this, max_mode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
if (oldMode != maximizeMode()) {
emit clientMaximizedStateChanged(this, max_mode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
}
}
@ -2847,6 +2872,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
// we are trying to resize in from the side?
bool breakLoop = false;
switch(mode) {
case PositionBottomLeft:
case PositionTopLeft:
case PositionLeft:
if (previousMoveResizeGeom.x() >= moveResizeGeom.x()) {
@ -2855,6 +2881,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
}
moveResizeGeom.setLeft(moveResizeGeom.x() - 1);
break;
case PositionBottomRight:
case PositionTopRight:
case PositionRight:
if (previousMoveResizeGeom.right() <= moveResizeGeom.right()) {
@ -2980,13 +3007,16 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
}
}
// Move it (Favour vertically)
if (previousMoveResizeGeom.y() != moveResizeGeom.y())
moveResizeGeom.translate(0,
previousMoveResizeGeom.y() > moveResizeGeom.y() ? 1 : -1);
else
moveResizeGeom.translate(previousMoveResizeGeom.x() > moveResizeGeom.x() ? 1 : -1,
0);
int dx = sign(previousMoveResizeGeom.x() - moveResizeGeom.x()),
dy = sign(previousMoveResizeGeom.y() - moveResizeGeom.y());
if (visiblePixels && dx) // means there's no full width cap -> favor horizontally
dy = 0;
else if (dy)
dx = 0;
// Move it back
moveResizeGeom.translate(dx, dy);
if (moveResizeGeom == previousMoveResizeGeom) {
break; // Prevent lockup
}

View File

@ -94,6 +94,11 @@ void GlxBackend::init()
// Initialize OpenGL
GLPlatform *glPlatform = GLPlatform::instance();
glPlatform->detect(GlxPlatformInterface);
if (GLPlatform::instance()->driver() == Driver_Intel)
options->setUnredirectFullscreen(false); // bug #252817
options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting
if (options->glPreferBufferSwap() == Options::AutoSwapStrategy)
options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen
glPlatform->printResults();
initGL(GlxPlatformInterface);
// Check whether certain features are supported
@ -168,6 +173,8 @@ bool GlxBackend::initRenderingContext()
};
const int attribs_legacy[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 1,
GLX_CONTEXT_MINOR_VERSION_ARB, 2,
0
};
@ -427,6 +434,18 @@ void GlxBackend::present()
glXWaitGL();
if (char result = m_swapProfiler.end()) {
gs_tripleBufferUndetected = gs_tripleBufferNeedsDetection = false;
if (result == 'd' && GLPlatform::instance()->driver() == Driver_NVidia) {
// TODO this is a workaround, we should get __GL_YIELD set before libGL checks it
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(0);
setSwapInterval(0);
kWarning(1212) << "\nIt seems you are using the nvidia driver without triple buffering\n"
"You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\n"
"For this reason, the tearing prevention has been disabled.\n"
"See https://bugs.kde.org/show_bug.cgi?id=322060\n";
}
}
setBlocksForRetrace(result == 'd');
}
}

View File

@ -816,7 +816,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
new_transient_for = rootWindow();
}
if (new_property_value != m_originalTransientForId)
xcb_icccm_set_wm_transient_for(connection(), window(), new_property_value);
Xcb::setTransientFor(window(), new_property_value);
return new_transient_for;
}

View File

@ -87,7 +87,7 @@ Name[te]=డెస్‍క్ టాప్ ప్రభావాలు
Name[tg]=Воситаҳои мизи корӣ
Name[th]=ลูกเล่นของพื้นที่ทำงาน
Name[tr]=Masaüstü Efektleri
Name[ug]=ئۈستەلئۈستى ئۈنۈملەر
Name[ug]=ئۈستەلئۈستى ئۈنۈملىرى
Name[uk]=Ефекти стільниці
Name[uz]=Ish stoli effektlari
Name[uz@cyrillic]=Иш столи эффектлари
@ -194,6 +194,7 @@ X-KDE-Keywords[fr]=kwin, fenêtre, gestionnaire, composition, effet, effets 3D,
X-KDE-Keywords[gl]=kwin,xanela,xestor,composición,efecto,efectos 3D,efectos 2D,OpenGl,XRender, configuración da imaxe,efectos gráficos, efectos do escritorio, animacións, efectos da xestión das xanelas,troco de xanela,animación,velocidade,controlador, render
X-KDE-Keywords[hu]=kwin,ablak,kezelő,kompozitálás,hatás,3D hatás,2D hatás,OpenGL,XRender,videobeállítások,grafikai hatások,asztali hatások,animációk,különféle animációk,ablakkezelő hatások,ablakváltó hatások,asztalváltó hatások,animációk,animáció sebesség,asztali animációk,meghajtók,meghajtó beállítások,leképezés,renderelés,fordított hatás,tükörhatás,nagyító hatás,elkapás segítő hatás,egérkövetés hatás,nagyítás hatás,elmosás hatás,áttekintő hatás,robbanás hatás,elhalványulás hatás,asztal elhalványulása hatás,széteső hatás,csúszás hatás,ablak kiemelése hatás,belépés hatás,kilépés hatás,varázslámpa hatás,minimalizálás animáció hatás,egérjelölés hatás,méretezés hatás,képernyőkép hatás,munkalap hatás,dia hatás,csúszó felugrók hatás,feladatsáv bélyegképek hatás,bélyegképek félre hatás,áttetszőség,áttetszőség hatás,átlátszóság,ablak geometria hatás,ingó ablak hatás,indulási visszajelzés hatás,párbeszédablak szülő hatás,dim inaktív hatás,dim kijelző hatás,dia vissza hatás,látványelem,édesség,FPS megjelenítése hatás,festék megjelenése hatás,dobozváltás hatás,eltakarás váltás hatás,asztal kocka hatás,asztal kockaanimáció hatás,asztal rács hatás,tükrözésváltás hatás,körvonal hatás,jelenlegi ablakok hatás,ablak átméretezése hatás
X-KDE-Keywords[ia]=kwin,fenestra,gerente,componente,effecto,effectos 3D,effectos 2D,OpenGL,XRender,preferentias de video,effectos graphic,effectos de scriptorio,animationes,varie animationes,effectos de gestion de genestra,effecto de commutation de fenestra, effecto de commutation de scriptorio,animationes,velocitate de animation,animationes de scriptorio,drivers, preferentias de driver,rendering,render,effecto de inverter,effecto speculo,effecto aggrandor,effecto de adjuta de photo (snap),effecto de tracia de mus,effecto zoom,effecto indistincte,effecto tabuliero,effecto explosion,effecto discolorate,effect de scriptorio discolorate,effecto de collapsar,effecto glissante, effecto de fenestra evidentiare,effecto de authenticar se,effecto de clauder session ,effecto lampada magic,minimisa effecto de animation,effecto de marca de mus,effecto de scalar,effecto de captura schermo,effecto folio,effecto diapositiva, effecto de popups glissante,effecto de miniatura de barra de carga,effecto de miniatura a parte,translucentia, effecto translucentia,transparentia, effecto de geometria de fenestra, effecto de fenestra tremulante,effecto de retro action, effecto de geniytor de dialogo, effecto inactive obscur, effecto de schermo obscur,effecto de retro glissar,eye candy,candy,monstra effecto FPS,monstra effecto pictura, effecto commuta cassa,effecto de commuta coperturat,effecto cubo de scriptorio,animation de cubo de scriptorio,effecto grillia de scriptorio,effecto flip switch,effecto contorno,effecto de fenestra actual,effect de fenestra redimensionante
X-KDE-Keywords[it]=kwin,finestra,gestore,composizione,effetto,effetti 3D,effetti 2D,OpenGL,XRender,impostazioni video,effetti grefici,effetti desktop,animazioni,animazioni varie, effetti del gestore delle finestre,effetto dello scambiafinestre, effetto dello scambiatore di desktop,animazioni,velocità animazioni,animazioni desktop,driver,impostazioni driver,disegno,rendering,effetto invertito,effetto vetro,effetto lente,effetto snap helper,effetto evidenzia mouse,effetto ingrandimento, effetto sfocatura,effetto quadro degli strumenti,effetto esplosione,effetto dissolvenza,effetto dissolvenza desktop,effetto caduta,effetto planatura,effetto evidenziazione finestra,effetto schermata di accesso, effetto disconnessione,effetto lampada magica,effetto animazione di minimizzazione,effetto tracciatura mouse, effetto scalatura,effetto istantanea,effetto foglio,effetto diapositiva,effetto scivolamento,effetto icone nella barra delle applicazioni,effetto miniatura su un lato,translucenza,effetto translucenza, trasparenza,effetto geometria finestra,effetto finestre tremolanti,effetto segnale di avvio,effetto finestra padre,effetto oscura finestra inattiva,effetto oscura schermo,effetto scivola all'indietro,gradevole,effetto gradevole,effetto mostra FPS,effetto ridisegno,effetto scambio cubi,effetto scambio copertina,effetto cubi del desktop,effetto animazione cubi del desktop,effetto griglia desktop,effetto scambiatore con inversione,effetto riquadro,effetto finestra presente,effetto ridimensionamento finestra
X-KDE-Keywords[kk]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect
X-KDE-Keywords[km]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect
X-KDE-Keywords[nb]=kwin,vindusbehandler,sammensetting,effekt,3D-effekter,2D-effekter,OpenGL,XRender,videoinnstillinger,grafiske effekter,skrivebordseffekter,animasjoner,diverse animasjoner,vindusbytteeffekter,effekter ved skrivebordsbytte,animasjoner,animasjonsfart,skrivebordsanimasjoner,drivere,driverinnstillinger,opptegning,opptegner,inverteringseffekt,speileffekt,lupeeffekt,gripehjelpereffekt,musesporeffekt,forstørreeffekt,sløreffekt,kontrollpulteffekt,eksplosjonseffekt,uttoningseffekt,skrivebordtoningseffekt,henfallseffekt,glidereffekt,framhev vindu-effekt,innlogingseffekt,utloggingsefffekt,magisk lampe-effekt, animasjonseffekt ved vindusminimering,musmerkeeffekt,innskalerngseffekt,skjermdumpeffekt,ark-effekt,lysbildeeffekt,glidende oppspretteffekt,effekt for minibilder på oppgavelinja,effekt for minibilder på siden,gjennomskinnelighetseffekt,gjennomsiktighet,vindusgeometri-effekt,skjelvende vinduer-effekt,effekt for oppstartsmelding,effekt for foreldredialog,effekt for mørk inaktiv,effekt for mørk skjerm,gli tilbake-effekt,øyesnop,snop,vis FPS-effekt,vis malingseffekt,boksbytteeffekt,lokkbytteeffekt,skrivebordsterning-effekt,effek for animert skrivebordsterning,effekt for skrivebordsruter,effekt for flipp-bytte,omriss-effekt,effekt for vinduer tilstede,effekt for vinduer som endrer størrelse

View File

@ -139,7 +139,7 @@ Comment[ru]=Настройка внешнего вида заголовков о
Comment[se]=Heivet lásenamahusaid fárdda
Comment[si]=කවුළු ශීර්‍ෂයන්හී පෙනුම හා හැඟීම සකසන්න
Comment[sk]=Nastavenie vzhľadu titulkov okien
Comment[sl]=Nastavite videz in delovanje naslovnih vrstic okna.
Comment[sl]=Nastavi videz in delovanje naslovnih vrstic okna.
Comment[sr]=Подешавање изгледа и осећаја за наслове прозора
Comment[sr@ijekavian]=Подешавање изгледа и осјећаја за наслове прозора
Comment[sr@ijekavianlatin]=Podešavanje izgleda i osjećaja za naslove prozora

View File

@ -56,7 +56,7 @@
<item row="1" column="1">
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_2">

View File

@ -101,15 +101,20 @@ Name[zh_CN]=动作
Name[zh_TW]=動作
Comment=Configure mouse actions on windows
Comment[bs]=Podešavanje radnji miša pri akcijama nad prozorima
Comment[ca]=Configura les accions de ratolí en les finestres
Comment[cs]=Nastavení činností myši na oknech
Comment[da]=Indstilling af musehandlinger på vinduer
Comment[de]=Maus-Aktionen für Fenster einrichten
Comment[es]=Configurar las acciones del ratón sobre las ventanas
Comment[fi]=Ikkunoiden hiiritoimintojen asetukset
Comment[fr]=Configurer les actions de souris pour les fenêtres
Comment[gl]=Configura a accións do rato nas xanelas
Comment[hu]=Egérműveletek beállítása az ablakokon
Comment[ia]=Configura actiones de mus sur fenestras
Comment[it]=Configura le azioni del mouse sulla finestra
Comment[kk]=Терезелердегі тышқанның әрекеттерін баптау
Comment[ko]=창 마우스 동작 설정
Comment[lt]=Konfigūruoti pelės veiksmus langams
Comment[nb]=Sett opp musehandlingeer på vinduer
Comment[nl]=Muisacties op vensters instellen
@ -118,7 +123,7 @@ Comment[pt]=Configurar as acções do rato nas janelas
Comment[pt_BR]=Configura as ações do mouse nas janelas
Comment[ru]=Настройка действий мыши для окон
Comment[sk]=Nastaviť akcie myši na oknách
Comment[sl]=Nastavite dejanja miške na oknih
Comment[sl]=Nastavi dejanja miške na oknih
Comment[sr]=Подешавање радњи миша на прозорима
Comment[sr@ijekavian]=Подешавање радњи миша на прозорима
Comment[sr@ijekavianlatin]=Podešavanje radnji miša na prozorima
@ -148,6 +153,7 @@ X-KDE-Keywords[ia]=tinta,maximisa,maximisa,minimisa,minimisa,plus basse,menu de
X-KDE-Keywords[it]=ombra,massimizza,minimizza,abbassa,menu operazioni,barra del titolo,ridimensiona
X-KDE-Keywords[kk]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize
X-KDE-Keywords[km]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize
X-KDE-Keywords[ko]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,최대화,최소화,제목 표시줄,크기 조정
X-KDE-Keywords[nb]=rull,maksimer,minimer,senk,handlinger,meny,tittellinje,endre størrelse
X-KDE-Keywords[nl]=verdonkeren,maximaliseren,minimaliseren,naar onderen,bedieningsmenu,titelbalk,grootte wijzigen
X-KDE-Keywords[pl]=zwiń,maksymalizuj,minimalizuj,obniż,operacje na menu,pasek tytułu,zmień rozmiar

View File

@ -164,7 +164,7 @@ Comment[ru]=Настройка дополнительных возможност
Comment[se]=Heivet viiddiduvvon lásegieđahanfunkšuvnnaid
Comment[si]=උසස් කවුළු පරිපාලන විශේෂාංග සකසන්න
Comment[sk]=Nastavenie pokročilých možností správy okien
Comment[sl]=Nastavitve dodatnih zmožnosti upravljanja oken
Comment[sl]=Nastavi dodatne zmožnosti upravljanja oken
Comment[sr]=Подешавање напредних могућности управљања прозорима
Comment[sr@ijekavian]=Подешавање напредних могућности управљања прозорима
Comment[sr@ijekavianlatin]=Podešavanje naprednih mogućnosti upravljanja prozorima
@ -199,8 +199,10 @@ X-KDE-Keywords[fr]=ombres, bord, survol, bords actifs, mosaïque, onglets, tabul
X-KDE-Keywords[gl]=sombra,bordo,beira,pasar,contornos activos,beiras activas,lapelas,agrupar xanelas, situación das xanelas, posicionamento das xanelas,comportamento avanzado das xanelas
X-KDE-Keywords[hu]=árnyékolás,szegély,lebegés,aktív szegélyek,csempézés,bejárás,ablakbejárás,ablakcsoportosítás,ablakcsempézés,ablakelhelyezés,ablakok elhelyezése,ablak speciális viselkedése
X-KDE-Keywords[ia]=umbrar,margine,planante,margines active,con tegulas,schedas,tabbing,tabbing de fenestra,gruppante fenestra,fenestra con tegulas,placiamento de fenestra,placiamento de fenestras, comportamento avantiate de fenestra
X-KDE-Keywords[it]=ombreggiatura,bordo,sovrapponi,bordi attivi,affiancatura,schede,navigazione schede,finestre a schede,regruppamento finestre,affaincatura finestre,posizionamento finestre,posizionamento delle finestre,comportamento avanzato delle finestre
X-KDE-Keywords[kk]=shading,border,hover,active borders,tiling,tabs,tabbing,window tabbing,window grouping,window tiling,window placement,placement of windows,window advanced behavior
X-KDE-Keywords[km]=shading,border,hover,active borders,tiling,tabs,tabbing,window tabbing,window grouping,window tiling,window placement,placement of windows,window advanced behavior
X-KDE-Keywords[ko]=shading,border,hover,active borders,tiling,tabs,tabbing,window tabbing,window grouping,window tiling,window placement,placement of windows,window advanced behavior,그림자,경계선,호버,지나다니기,타일,탭,창 탭,창 그룹,창 타일,창 위치
X-KDE-Keywords[nb]=-gardinrulling,kant,sveve,aktive kanter,flislegging,faner,vindusfaner,vindusgruppering,vindus-flislegging,vindusplassering,plassering av vinduer,avansert vindusoppførsel
X-KDE-Keywords[nl]=verduisteren,rand,overzweven,actieve randen,schuin achter elkaar,tabbladen,met tabbladen werken,venstertabbladen,verstergroepering,vensters schuin achter elkaar,vensterplaatsing,plaatsing van vensters,geavanceerd gedrag van vensters
X-KDE-Keywords[pl]=zwijanie,obramowanie,unoszenie,aktywne obramowania,kafelkowanie,karty,tworzenie kart, umieszczanie okien w kartach,grupowanie okien,kafelkowanie okien,umieszczanie okien, zaawansowane zachowania okien

View File

@ -161,7 +161,7 @@ Comment[ru]=Настройка поведения фокуса окон
Comment[se]=Heivet lásefohkusa doaibmanvuogi
Comment[si]=කවුළෘ නාඹිගත කිරීමේ ප්‍රතිපත්ති සකසන්න
Comment[sk]=Nastavenie spôsobu zamerania okien
Comment[sl]=Nastavitve ravnanja s žariščem okna
Comment[sl]=Nastavi ravnanje s žariščem okna
Comment[sr]=Подешавање начина фокусирања прозора
Comment[sr@ijekavian]=Подешавање начина фокусирања прозора
Comment[sr@ijekavianlatin]=Podešavanje načina fokusiranja prozora
@ -196,8 +196,10 @@ X-KDE-Keywords[fr]=focus, placement, agrandissement automatique, agrandissement,
X-KDE-Keywords[gl]=foco,posicionamento,erguer,teclado,CDE,alt-tab,todo o escritorio,foco segue o rato,prevención do foco,roubar o foco,política de focalización
X-KDE-Keywords[hu]=fókusz,elhelyezés,automatikus felemelés,felemelés,kattintásra felemelés,billentyűzet,CDE,alt-tab,összes asztal,egérkövető fókusz,fókuszmegelőzés,fókuszlopás,fókusz házirend,ablakfókusz működése,ablakképernyő működése
X-KDE-Keywords[ia]=focus,placiamento,auto raise,raise,click raise,clavierp,CDE,alt-tab,all desktop,focus seque mus,prevention de focus,focus stealing,politica de focus,comportamento de foco de fenestra,comportamento de schermo de fenestra
X-KDE-Keywords[it]=fuoco,posizionamento,avanzamento automatico,avanzamento,avanzamento con clic,tastiera,CDE,alt-tab,tutti i desktop,il fuco segue il mouse,impedisci il fuoco,mantieni il fuoco,regole fuoco,regole fuoco finestra,comportamento finestra
X-KDE-Keywords[kk]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,focus follows mouse,focus prevention,focus stealing,focus policy,window focus behavior,window screen behavior
X-KDE-Keywords[km]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,focus follows mouse,focus prevention,focus stealing,focus policy,window focus behavior,window screen behavior
X-KDE-Keywords[ko]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,focus follows mouse,focus prevention,focus stealing,focus policy,window focus behavior,window screen behavior,초점,위치,키보드,모든 데스크톱,초점,초점 훔치기,초점 훔치기 방지,초점 정책,창 초점 행동,창 화면 행동
X-KDE-Keywords[nb]=fokus,plassering,autohev,hev,klikk-hev,tastatur,CDE,alt-tab,alle skrivebord,fokus følger mus,fokushindring,fokus-stjeling,fokuspraksis,fokusoppførsel for vinduer,vindusoppførsel på skjerm
X-KDE-Keywords[nl]=focus,plaatsing,automatisch omhoog komen,omhoog komen,omhoog komen bij klikken,toetsenbord,CDE,alt-tab,alle bureaubladen,focus volgt muis,voorkomen van focus,focus stelen,focusbeleid,focusgedrag in venster,gedrag van vensterscherm
X-KDE-Keywords[pl]=uaktywnienie,umieszczenie,auto wznoszenie,wznoszenie,wznoszenie na kliknięcie,klawiatura,CDE,alt-tab,wszystkie pulpity

View File

@ -163,7 +163,7 @@ Comment[ru]=Настройка перемещения окон
Comment[se]=Heivet mo láset lihkaduvvot
Comment[si]=කවුළු ගමන්කරන ආකාරය සකසන්න
Comment[sk]=Nastavenie presunu okien
Comment[sl]=Nastavitve načinov premikanja okna
Comment[sl]=Nastavi načine premikanja oken
Comment[sr]=Подешавање начина на који се прозори померају
Comment[sr@ijekavian]=Подешавање начина на који се прозори помијерају
Comment[sr@ijekavianlatin]=Podešavanje načina na koji se prozori pomijeraju

View File

@ -168,7 +168,7 @@ Comment[ru]=Настройка поведения окон
Comment[se]=Heivet láseláhttema
Comment[si]=කවුළු හැසිරීම් සකසන්න
Comment[sk]=Nastavenie správania okna
Comment[sl]=Nastavite obnašanje oken
Comment[sl]=Nastavi obnašanje oken
Comment[sr]=Подешавање понашања прозора
Comment[sr@ijekavian]=Подешавање понашања прозора
Comment[sr@ijekavianlatin]=Podešavanje ponašanja prozora

View File

@ -139,7 +139,7 @@ Comment[ru]=Настройка особых параметров для конк
Comment[se]=Heivehusat erenoamáš láse várás
Comment[si]=එක් කවුළුවකට විශේෂයෙන් සැකසුම් සාදන්න
Comment[sk]=Nastavenie pre jednotlivé okná
Comment[sl]=Nastavite možnosti glede na posamezno okno
Comment[sl]=Nastavi možnosti glede na posamezno okno
Comment[sr]=Поставке које важе посебно за сваки прозор
Comment[sr@ijekavian]=Поставке које важе посебно за сваки прозор
Comment[sr@ijekavianlatin]=Postavke koje važe posebno za svaki prozor

View File

@ -123,7 +123,6 @@ RulesWidget::RulesWidget(QWidget* parent)
SETUP(disableglobalshortcuts, force);
SETUP(blockcompositing, force);
connect (machine_match, SIGNAL(currentIndexChanged(int)), SLOT(machineMatchChanged()));
connect (shortcut_edit, SIGNAL(clicked()), SLOT(shortcutEditClicked()));
edit_reg_wmclass->hide();

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>630</width>
<width>486</width>
<height>588</height>
</rect>
</property>
@ -2597,7 +2597,7 @@ but this may sometimes fail or superact.
<slot>detectClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>321</x>
<x>285</x>
<y>124</y>
</hint>
<hint type="destinationlabel">
@ -2613,7 +2613,7 @@ but this may sometimes fail or superact.
<slot>wmclassMatchChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>301</x>
<x>297</x>
<y>196</y>
</hint>
<hint type="destinationlabel">
@ -2629,7 +2629,7 @@ but this may sometimes fail or superact.
<slot>roleMatchChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>301</x>
<x>297</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
@ -2638,5 +2638,37 @@ but this may sometimes fail or superact.
</hint>
</hints>
</connection>
<connection>
<sender>title_match</sender>
<signal>activated(int)</signal>
<receiver>KWin::RulesWidgetBase</receiver>
<slot>titleMatchChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>231</x>
<y>482</y>
</hint>
<hint type="destinationlabel">
<x>242</x>
<y>293</y>
</hint>
</hints>
</connection>
<connection>
<sender>machine_match</sender>
<signal>activated(int)</signal>
<receiver>KWin::RulesWidgetBase</receiver>
<slot>machineMatchChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>194</x>
<y>509</y>
</hint>
<hint type="destinationlabel">
<x>242</x>
<y>293</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -133,7 +133,7 @@ Comment[ro]=Configurează muchiile active ale ecranului
Comment[ru]=Настройка действий для краёв экрана
Comment[si]=සක්‍රිය තිර කෙලවර වින්‍යාසගත කරන්න
Comment[sk]=Nastavenie aktívnych okrajov obrazovky
Comment[sl]=Nastavitve dejavnih robov zaslona
Comment[sl]=Nastavi dejavne robove zaslona
Comment[sr]=Подешавање активних ивица екрана
Comment[sr@ijekavian]=Подешавање активних ивица екрана
Comment[sr@ijekavianlatin]=Podešavanje aktivnih ivica ekrana
@ -163,8 +163,10 @@ X-KDE-Keywords[fr]=kwin, fenêtre, gestionnaire, effet, bord, bordure, action, b
X-KDE-Keywords[gl]=kwin,xanela,xestor,efecto,beira,bordo,contorno,acción,trocar,escritorio,contorno do escritorio,maximizar xanelas,escritorio virtual,esquinas da pantalla
X-KDE-Keywords[hu]=kwin,ablak,kezelő,effektus,szél,szegély,művelet,váltás,asztal,kwin képernyőszél,asztalszél,képernyőszél,ablakok maximalizálása,ablakcím,képernyőoldal,képernyő működése,asztalváltás,virtuális asztal,képernyősarkok
X-KDE-Keywords[ia]=kwin,fenestra,gerente,effecto,bordo,margine,action,commuta,scriptorio,bordos de schermo de kwin,bordos de scriptorio,bordos de scriptorio,maximisa fenestras,tegula fenestras,parte de schermo, comportamento de schermo,commuta scriptorio,scriptorio virtual,angulos de schermo
X-KDE-Keywords[it]=kwin,finestra,gestore,effetto,bordo,azione,scambiatore,desktop,bordi schermo kwin,bordi desktop,bordi schermo,massimizza finestre,affianca finestre,lato dello schermo,comportamento schermo,scambia desktop,desktop virtuale,angoli dello schermo
X-KDE-Keywords[kk]=kwin,window,manager,effect,edge,border,action,switch,desktop,kwin screen edges,desktop edges,screen edges,maximize windows,tile windows,side of screen,screen behavior,switch desktop,virtual desktop,screen corners
X-KDE-Keywords[km]=kwin,window,manager,effect,edge,border,action,switch,desktop,kwin screen edges,desktop edges,screen edges,maximize windows,tile windows,side of screen,screen behavior,switch desktop,virtual desktop,screen corners
X-KDE-Keywords[ko]=kwin,window,manager,effect,edge,border,action,switch,desktop,kwin screen edges,desktop edges,screen edges,maximize windows,tile windows,side of screen,screen behavior,switch desktop,virtual desktop,screen corners,창,관리자,효과,경계,경계선,동작,액션,전환,kwin 화면 경계,화면 경계,창 최대화,최대화,바둑판식 배열,화면 행동,데스크톱 전환,가상 데스크톱,화면 모서리
X-KDE-Keywords[nb]=kwin,vindu,behandler,effekt,kant,ramme,handling,bytte,skrivebord,kwin skjermkanter,skrivebordkanter,skjermkanter,maksimere vinduer,flislegge vinduer,skjermside,skjermoppførsel,bytte skrivebord,virtuelt skrivebord,skjermhjørner
X-KDE-Keywords[nl]=kwin,venster,beheerder,effect,kant,rand,actie,omschakelen,bureaublad,schermranden van kwin,bureaubladkanten,schermkanten,vensters maximaliseren,venster schuin achter elkaar,zijkant van het scherm,schermgedrag,bureaublad omschakelen,virtueel bureaublad,schermhoeken
X-KDE-Keywords[pl]=kwin,okno,menadżer,efekt,krawędź,obramowanie,działanie,przełącz,pulpit, krawędzie ekranu kwin,krawędzie pulpitu,krawędzie ekranu,maksymalizacja okien, kafelkowanie okien,strona ekranu,zachowanie ekranu,przełączanie pulpitu,wirtualny pulpit, krawędzie ekranu

View File

@ -111,7 +111,7 @@ Comment[pt_BR]=Configura o comportamento da navegação pelas janelas
Comment[ro]=Configurează comportamentul navigării printre ferestre
Comment[ru]=Настройка поведения переключателя окон
Comment[sk]=Nastavenie správania pre prepínanie medzi oknami
Comment[sl]=Nastavite obnašanje pri preklapljanju med okni
Comment[sl]=Nastavi obnašanje pri preklapljanju med okni
Comment[sr]=Подешавање понашања при кретању кроз прозоре
Comment[sr@ijekavian]=Подешавање понашања при кретању кроз прозоре
Comment[sr@ijekavianlatin]=Podešavanje ponašanja pri kretanju kroz prozore

View File

@ -52,7 +52,6 @@ void KillWindow::start()
if (m_active) {
return;
}
m_active = true;
xcb_connection_t *c = connection();
ScopedCPointer<xcb_grab_pointer_reply_t> grabPointer(xcb_grab_pointer_reply(c, xcb_grab_pointer_unchecked(c, false, rootWindow(),
@ -64,7 +63,11 @@ void KillWindow::start()
if (grabPointer.isNull() || grabPointer->status != XCB_GRAB_STATUS_SUCCESS) {
return;
}
grabXKeyboard();
m_active = grabXKeyboard();
if (!m_active) {
xcb_ungrab_pointer(connection(), XCB_TIME_CURRENT_TIME);
return;
}
grabXServer();
}

View File

@ -117,7 +117,7 @@ Name[ro]=Compoziționarea a fost suspendată
Name[ru]=Графические эффекты были отключены
Name[si]=රචනය අත්හිටුවිය
Name[sk]=Kompozícia bola pozastavená
Name[sl]=Skladnja 3D je bila začasno zaustavljena
Name[sl]=Skladnja 3D je bila prestavljena v pripravljenost
Name[sr]=Слагање је суспендовано
Name[sr@ijekavian]=Слагање је суспендовано
Name[sr@ijekavianlatin]=Slaganje je suspendovano
@ -179,7 +179,7 @@ Comment[ro]=Altă aplicație a cerut suspendarea compoziționării.
Comment[ru]=Одно из приложений отключило графические эффекты
Comment[si]=වෙනත් යෙදුමක් මගින් රචනය අත්හිටුවීමට ඉල්ලා ඇත.
Comment[sk]=Iná aplikácia si vyžiadala pozastavenie kompozície.
Comment[sl]=Drug program je zahteval začasno zaustavitev skladnje 3D.
Comment[sl]=Drug program je zahteval prestavitev skladnje 3D v pripravljenost.
Comment[sr]=Други програм је затражио да се слагање суспендује.
Comment[sr@ijekavian]=Други програм је затражио да се слагање суспендује.
Comment[sr@ijekavianlatin]=Drugi program je zatražio da se slaganje suspenduje.
@ -197,13 +197,19 @@ Action=Popup
[Event/graphicsreset]
Name=Graphics Reset
Name[bs]=Reset grafike
Name[ca]=Reinici dels gràfics
Name[cs]=Resetovat grafiku
Name[da]=Grafiknulstilling
Name[es]=Reinicio gráfico
Name[fi]=Grafiikan nollaus
Name[fr]=Réinitialisation graphique
Name[gl]=Reinicio dos gráficos
Name[hu]=Grafikai visszaállítás
Name[ia]=Reinitia Graphic
Name[it]=Azzeramento grafica
Name[kk]=Графиканы ысыру
Name[ko]=그래픽 초기화
Name[lt]=Grafikos atstatymas
Name[nl]=Grafische reset
Name[pa]=ਗਰਾਫਿਕਸ ਮੁੜ-ਸੈੱਟ
@ -224,12 +230,18 @@ Name[x-test]=xxGraphics Resetxx
Name[zh_CN]=图形重置
Name[zh_TW]=圖形重置
Comment=A graphics reset event occurred
Comment[bs]=Grafički reset događaj se desio
Comment[ca]=Ha ocorregut un esdeveniment de reinici dels gràfics
Comment[da]=En grafiknulstillingshændelse fandt sted
Comment[es]=Ha ocurrido un evento de reinicio gráfico
Comment[fi]=Sattui grafiikan nollaustapahtuma
Comment[fr]=Un évènement de réinitialisation graphique est intervenu
Comment[gl]=Aconteceu un reinicio de gráficos
Comment[hu]=Egy grafikai visszaállítás esemény történt
Comment[ia]=Il necessita un evento de reinitiar le graphic
Comment[it]=Si è verificato un evento di azzeramento della grafica
Comment[kk]=Графиканы ысыру оқиғасы болды
Comment[ko]=그래픽 초기화 이벤트가 발생함
Comment[nl]=Een gebeurtenis van een grafische reset deed zich voor
Comment[pl]=Nastąpiło zdarzenie resetu grafiki
Comment[pt]=Ocorreu um evento de reinício gráfico

View File

@ -77,8 +77,8 @@ void LanczosFilter::init()
// The lanczos filter is reported to be broken with the Intel driver prior SandyBridge
if (gl->driver() == Driver_Intel && gl->chipClass() < SandyBridge)
return;
// Broken on IvyBridge with Mesa 9.1 - BUG 313613
if (gl->driver() == Driver_Intel && gl->chipClass() == IvyBridge && gl->mesaVersion() >= kVersionNumber(9, 1) && gl->mesaVersion() < kVersionNumber(9, 2))
// Broken on Intel chips with Mesa 9.1 - BUG 313613
if (gl->driver() == Driver_Intel && gl->mesaVersion() >= kVersionNumber(9, 1) && gl->mesaVersion() < kVersionNumber(9, 2))
return;
// also radeon before R600 has trouble
if (gl->isRadeon() && gl->chipClass() < R600)
@ -184,28 +184,14 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region,
init();
const QRect screenRect = Workspace::self()->clientArea(ScreenArea, w->screen(), w->desktop());
// window geometry may not be bigger than screen geometry to fit into the FBO
if (m_shader && w->width() <= screenRect.width() && w->height() <= screenRect.height()) {
double left = 0;
double top = 0;
double right = w->width();
double bottom = w->height();
foreach (const WindowQuad & quad, data.quads) {
// we need this loop to include the decoration padding
left = qMin(left, quad.left());
top = qMin(top, quad.top());
right = qMax(right, quad.right());
bottom = qMax(bottom, quad.bottom());
}
double width = right - left;
double height = bottom - top;
if (width > screenRect.width() || height > screenRect.height()) {
// window with padding does not fit into the framebuffer
// so cut of the shadow
left = 0;
top = 0;
width = w->width();
height = w->height();
}
QRect winGeo(w->expandedGeometry());
if (m_shader && winGeo.width() <= screenRect.width() && winGeo.height() <= screenRect.height()) {
winGeo.translate(-w->geometry().topLeft());
double left = winGeo.left();
double top = winGeo.top();
double width = winGeo.right() - left;
double height = winGeo.bottom() - top;
int tx = data.xTranslation() + w->x() + left * data.xScale();
int ty = data.yTranslation() + w->y() + top * data.yScale();
int tw = width * data.xScale();

View File

@ -284,6 +284,7 @@ void AnimationEffect::prePaintScreen( ScreenPrePaintData& data, int time )
AniData *aData = &(*anim);
if (aData->attribute == KWin::AnimationEffect::CrossFadePrevious) {
oldW->unreferencePreviousWindowPixmap();
effects->addRepaint(oldW->expandedGeometry());
}
animationEnded(oldW, anim->attribute, anim->meta);
// NOTICE animationEnded is an external call and might have called "::animate"

View File

@ -332,7 +332,7 @@ qreal WindowPaintData::crossFadeProgress() const
void WindowPaintData::setCrossFadeProgress(qreal factor)
{
d->crossFadeProgress = qBound(0.0, factor, 1.0);
d->crossFadeProgress = qBound(qreal(0.0), factor, qreal(1.0));
}
qreal WindowPaintData::multiplyDecorationOpacity(qreal factor)

View File

@ -1079,6 +1079,12 @@ Q_SIGNALS:
* @since 4.7
**/
void windowUnminimized(KWin::EffectWindow *w);
/**
* Signal emitted when a window either becomes modal (ie. blocking for its main client) or looses that state.
* @param w The window which was unminimized
* @since 4.11
**/
void windowModalityChanged(KWin::EffectWindow *w);
/**
* Signal emitted when an area of a window is scheduled for repainting.
* Use this signal in an effect if another area needs to be synced as well.
@ -1751,7 +1757,6 @@ private:
class KWIN_EXPORT WindowQuad
{
public:
explicit WindowQuad();
explicit WindowQuad(WindowQuadType type, int id = -1);
WindowQuad makeSubQuad(double x1, double y1, double x2, double y2) const;
WindowVertex& operator[](int index);
@ -1778,7 +1783,7 @@ private:
};
class KWIN_EXPORT WindowQuadList
: public QVector<WindowQuad>
: public QList< WindowQuad >
{
public:
WindowQuadList splitAtX(double x) const;
@ -2687,13 +2692,6 @@ void WindowVertex::setY(double y)
WindowQuad
***************************************************************/
inline
WindowQuad::WindowQuad()
: quadType(WindowQuadError)
, quadID(-1)
{
}
inline
WindowQuad::WindowQuad(WindowQuadType t, int id)
: quadType(t)

View File

@ -34,27 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QPair>
#include <QVector3D>
#ifdef KWIN_HAVE_OPENGLES
#define CC_TEXTURE_INTERNAL_FORMAT GL_RGB
/*
* A bit of ugliness to allow building with OpenGL ES < 3, without
* ifdef's everywhere in the code. These should not actually be used anywhere.
*/
#ifndef GL_TEXTURE_3D
#define GL_TEXTURE_3D 0x806F // From OES_texture_3D extension
#define GL_TEXTURE_WRAP_R 0x8072 // From OES_texture_3D extension
void glTexImage3D(GLenum, int, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)
{
Q_ASSERT(false); // Execution must not reach here
}
#endif // defined(GL_TEXTURE_3D)
#else // KWIN_HAVE_OPENGLES
#define CC_TEXTURE_INTERNAL_FORMAT GL_RGB16
#endif // KWIN_HAVE_OPENGLES
namespace KWin {
/*
@ -305,11 +284,14 @@ bool ColorCorrection::setEnabled(bool enabled)
return false;
}
#ifdef KWIN_HAVE_OPENGLES
const GLPlatform *gl = GLPlatform::instance();
if (enabled && gl->isGLES() && (gl->glVersion() >> 32) < 3) {
kError(1212) << "color correction is not supported with OpenGL ES < 3.0";
if (enabled && gl->isGLES() && glTexImage3D == 0) {
kError(1212) << "color correction is not supported on OpenGL ES without OES_texture_3D";
d->m_hasError = true;
return false;
}
#endif // KWIN_HAVE_OPENGLES
if (enabled) {
// Update all profiles and regions
@ -642,9 +624,22 @@ bool ColorCorrectionPrivate::setupCCTexture(GLuint texture, const Clut& clut)
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage3D(GL_TEXTURE_3D, 0, CC_TEXTURE_INTERNAL_FORMAT,
#ifndef KWIN_HAVE_OPENGLES
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB16,
LUT_GRID_POINTS, LUT_GRID_POINTS, LUT_GRID_POINTS,
0, GL_RGB, GL_UNSIGNED_SHORT, clut.data());
#else
const int textureDataSize = clut.size();
QVector<quint8> textureData(textureDataSize);
quint8 *pTextureData = textureData.data();
const quint16 *pClutData = clut.data();
for (int i = 0; i < textureDataSize; ++i)
*(pTextureData++) = *(pClutData++) >> 8;
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB,
LUT_GRID_POINTS, LUT_GRID_POINTS, LUT_GRID_POINTS,
0, GL_RGB, GL_UNSIGNED_BYTE, textureData.data());
#endif // KWIN_HAVE_OPENGLES
return !checkGLError("setupCCTexture");
}
@ -667,7 +662,16 @@ void ColorCorrectionPrivate::colorServerUpdateSucceededSlot()
// Reload all shaders
ShaderManager::cleanup();
ShaderManager::instance();
if (!ShaderManager::instance()->isValid()) {
kError(1212) << "Shader reinitialization failed, possible compile problems with the shaders "
"altered for color-correction";
m_hasError = true;
kDebug(1212) << "Color correction has been disabled due to shader issues";
m_enabled = false;
GLShader::sColorCorrect = false;
ShaderManager::cleanup();
ShaderManager::instance();
}
}
emit q->changed();

View File

@ -602,6 +602,7 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
}
m_chipset = "Unknown";
m_preferBufferSubData = false;
// Mesa classic drivers
@ -794,8 +795,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
if (m_driver == Driver_NVidia && m_chipClass < NV40)
m_supportsGLSL = false; // High likelihood of software emulation
if (m_driver == Driver_NVidia)
if (m_driver == Driver_NVidia) {
m_looseBinding = true;
m_preferBufferSubData = true;
}
if (m_chipClass < NV20) {
m_recommendedCompositor = XRenderCompositing;
@ -1051,6 +1054,11 @@ CompositingType GLPlatform::recommendedCompositor() const
return m_recommendedCompositor;
}
bool GLPlatform::preferBufferSubData() const
{
return m_preferBufferSubData;
}
bool GLPlatform::isGLES() const
{
#ifdef KWIN_HAVE_OPENGLES

View File

@ -307,6 +307,14 @@ public:
**/
CompositingType recommendedCompositor() const;
/**
* Returns true if glMapBufferRange() is likely to perform worse than glBufferSubData()
* when updating an unused range of a buffer object, and false otherwise.
*
* @since 4.11
*/
bool preferBufferSubData() const;
/**
* @returns a human readable form of the @p version.
* @since 4.9
@ -359,6 +367,7 @@ private:
bool m_textureNPOT: 1;
bool m_limitedNPOT: 1;
bool m_virtualMachine: 1;
bool m_preferBufferSubData: 1;
static GLPlatform *s_platform;
};

View File

@ -988,7 +988,6 @@ void ShaderManager::resetShader(ShaderType type)
bool GLRenderTarget::sSupported = false;
bool GLRenderTarget::s_blitSupported = false;
QStack<GLRenderTarget*> GLRenderTarget::s_renderTargets = QStack<GLRenderTarget*>();
QSize GLRenderTarget::s_oldViewport;
void GLRenderTarget::initStatic()
{
@ -1013,12 +1012,6 @@ bool GLRenderTarget::blitSupported()
void GLRenderTarget::pushRenderTarget(GLRenderTarget* target)
{
if (s_renderTargets.isEmpty()) {
GLint params[4];
glGetIntegerv(GL_VIEWPORT, params);
s_oldViewport = QSize(params[2], params[3]);
}
target->enable();
s_renderTargets.push(target);
}
@ -1027,11 +1020,13 @@ GLRenderTarget* GLRenderTarget::popRenderTarget()
{
GLRenderTarget* ret = s_renderTargets.pop();
ret->disable();
if (!s_renderTargets.isEmpty()) {
s_renderTargets.top()->enable();
} else if (!s_oldViewport.isEmpty()) {
glViewport (0, 0, s_oldViewport.width(), s_oldViewport.height());
} else {
glViewport (0, 0, displayWidth(), displayHeight());
}
return ret;
}
@ -1597,6 +1592,7 @@ public:
void interleaveArrays(float *array, int dim, const float *vertices, const float *texcoords, int count);
void bindArrays();
void unbindArrays();
void reallocateBuffer(size_t size);
GLvoid *mapNextFreeRange(size_t size);
GLuint buffer;
@ -1731,6 +1727,17 @@ void GLVertexBufferPrivate::unbindArrays()
#endif
}
void GLVertexBufferPrivate::reallocateBuffer(size_t size)
{
// Round the size up to 4 Kb for streaming/dynamic buffers.
const size_t minSize = 32768; // Minimum size for streaming buffers
const size_t alloc = usage != GL_STATIC_DRAW ? align(qMax(size, minSize), 4096) : size;
glBufferData(GL_ARRAY_BUFFER, alloc, 0, usage);
bufferSize = alloc;
}
GLvoid *GLVertexBufferPrivate::mapNextFreeRange(size_t size)
{
GLbitfield access = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT;
@ -1738,13 +1745,7 @@ GLvoid *GLVertexBufferPrivate::mapNextFreeRange(size_t size)
if ((nextOffset + size) > bufferSize) {
// Reallocate the data store if it's too small.
if (size > bufferSize) {
// Round the size up to 4 Kb for streaming/dynamic buffers.
const size_t minSize = 32768; // Minimum size for streaming buffers
const size_t alloc = usage != GL_STATIC_DRAW ? align(qMax(size, minSize), 4096) : size;
glBufferData(GL_ARRAY_BUFFER, alloc, 0, usage);
bufferSize = alloc;
reallocateBuffer(size);
} else {
access |= GL_MAP_INVALIDATE_BUFFER_BIT;
access ^= GL_MAP_UNSYNCHRONIZED_BIT;
@ -1802,7 +1803,9 @@ GLvoid *GLVertexBuffer::map(size_t size)
if (GLVertexBufferPrivate::supported)
glBindBuffer(GL_ARRAY_BUFFER, d->buffer);
if (GLVertexBufferPrivate::hasMapBufferRange)
bool preferBufferSubData = GLPlatform::instance()->preferBufferSubData();
if (GLVertexBufferPrivate::hasMapBufferRange && !preferBufferSubData)
return (GLvoid *) d->mapNextFreeRange(size);
// If we can't map the buffer we allocate local memory to hold the
@ -1816,26 +1819,38 @@ GLvoid *GLVertexBuffer::map(size_t size)
void GLVertexBuffer::unmap()
{
if (GLVertexBufferPrivate::hasMapBufferRange) {
bool preferBufferSubData = GLPlatform::instance()->preferBufferSubData();
if (GLVertexBufferPrivate::hasMapBufferRange && !preferBufferSubData) {
glUnmapBuffer(GL_ARRAY_BUFFER);
d->baseAddress = d->nextOffset;
d->nextOffset += align(d->mappedSize, 16); // Align to 16 bytes for SSE
} else {
if (GLVertexBufferPrivate::supported) {
// Upload the data from local memory to the buffer object
glBufferData(GL_ARRAY_BUFFER, d->mappedSize, d->dataStore.data(), d->usage);
} else if (GLVertexBufferPrivate::supported) {
// Upload the data from local memory to the buffer object
if (preferBufferSubData) {
if ((d->nextOffset + d->mappedSize) > d->bufferSize) {
d->reallocateBuffer(d->mappedSize);
d->nextOffset = 0;
}
// Free the local memory buffer if it's unlikely to be used again
if (d->usage == GL_STATIC_DRAW)
d->dataStore = QByteArray();
glBufferSubData(GL_ARRAY_BUFFER, d->nextOffset, d->mappedSize, d->dataStore.constData());
d->baseAddress = 0;
d->baseAddress = d->nextOffset;
d->nextOffset += align(d->mappedSize, 16); // Align to 16 bytes for SSE
} else {
// If buffer objects aren't supported we just need to update
// the client memory pointer and we're done.
d->baseAddress = intptr_t(d->dataStore.data());
glBufferData(GL_ARRAY_BUFFER, d->mappedSize, d->dataStore.data(), d->usage);
d->baseAddress = 0;
}
// Free the local memory buffer if it's unlikely to be used again
if (d->usage == GL_STATIC_DRAW)
d->dataStore = QByteArray();
} else {
// If buffer objects aren't supported we just need to update
// the client memory pointer and we're done.
d->baseAddress = intptr_t(d->dataStore.data());
}
d->mappedSize = 0;
@ -1898,8 +1913,6 @@ void GLVertexBuffer::draw(const QRegion &region, GLenum primitiveMode, int first
{
#ifndef KWIN_HAVE_OPENGLES
if (primitiveMode == GL_QUADS) {
primitiveMode = GL_TRIANGLES;
IndexBuffer *&indexBuffer = GLVertexBufferPrivate::s_indexBuffer;
if (!indexBuffer)

View File

@ -580,7 +580,6 @@ private:
static bool sSupported;
static bool s_blitSupported;
static QStack<GLRenderTarget*> s_renderTargets;
static QSize s_oldViewport;
GLTexture mTexture;
bool mValid;

View File

@ -268,6 +268,9 @@ glMapBuffer_func glMapBuffer;
glUnmapBuffer_func glUnmapBuffer;
glGetBufferPointerv_func glGetBufferPointerv;
// GL_OES_texture_3D
glTexImage3DOES_func glTexImage3D;
// GL_EXT_map_buffer_range
glMapBufferRange_func glMapBufferRange;
glFlushMappedBufferRange_func glFlushMappedBufferRange;
@ -731,6 +734,12 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
glGetBufferPointerv = NULL;
}
if (hasGLExtension(QStringLiteral("GL_OES_texture_3D"))) {
glTexImage3D = (glTexImage3DOES_func)eglGetProcAddress("glTexImage3DOES");
} else {
glTexImage3D = NULL;
}
if (hasGLExtension(QStringLiteral("GL_EXT_map_buffer_range"))) {
// See http://www.khronos.org/registry/gles/extensions/EXT/EXT_map_buffer_range.txt
glMapBufferRange = (glMapBufferRange_func) eglGetProcAddress("glMapBufferRangeEXT");

View File

@ -538,6 +538,8 @@ extern KWIN_EXPORT glCopyBufferSubData_func glCopyBufferSubData;
#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
#define GL_TEXTURE_3D 0x806F
#define GL_TEXTURE_WRAP_R 0x8072
#endif
namespace KWin
@ -570,6 +572,10 @@ extern KWIN_EXPORT glMapBuffer_func glMapBuffer;
extern KWIN_EXPORT glUnmapBuffer_func glUnmapBuffer;
extern KWIN_EXPORT glGetBufferPointerv_func glGetBufferPointerv;
// GL_OES_texture_3D
typedef GLvoid(*glTexImage3DOES_func)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
extern KWIN_EXPORT glTexImage3DOES_func glTexImage3D;
// GL_EXT_map_buffer_range
typedef GLvoid *(*glMapBufferRange_func)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
typedef void (*glFlushMappedBufferRange_func)(GLenum target, GLintptr offset, GLsizeiptr length);

View File

@ -109,7 +109,11 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth)
XRenderPicture::XRenderPicture(const QPixmap &pix)
{
QImage img(pix.toImage());
XRenderPicture(pix.toImage());
}
XRenderPicture::XRenderPicture(const QImage &img)
{
const int depth = img.depth();
xcb_pixmap_t xpix = xcb_generate_id(connection());
xcb_create_pixmap(connection(), depth, xpix, rootWindow(), img.width(), img.height());

View File

@ -70,6 +70,7 @@ public:
explicit XRenderPicture(xcb_render_picture_t pic = XCB_RENDER_PICTURE_NONE);
// TODO: Qt5 - replace QPixmap by QImage to make it more obvious that it uses PutImage
explicit XRenderPicture(const QPixmap &pix);
explicit XRenderPicture(const QImage &img);
XRenderPicture(xcb_pixmap_t pix, int depth);
operator xcb_render_picture_t();
private:

View File

@ -476,8 +476,6 @@ KDE_EXPORT int kdemain(int argc, char * argv[])
QDBusConnection::sessionBus().interface()->registerService(
appname, QDBusConnectionInterface::DontQueueService);
KCmdLineArgs* sargs = KCmdLineArgs::parsedArgs();
return a.exec();
}

View File

@ -45,7 +45,7 @@ RootInfo *RootInfo::create()
XCB_COPY_FROM_PARENT, XCB_CW_OVERRIDE_REDIRECT, values);
const uint32_t lowerValues[] = { XCB_STACK_MODE_BELOW }; // See usage in layers.cpp
// we need to do the lower window with a roundtrip, otherwise NETRootInfo is not functioning
QScopedPointer<xcb_generic_error_t> error(xcb_request_check(connection(),
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(),
xcb_configure_window_checked(connection(), supportWindow, XCB_CONFIG_WINDOW_STACK_MODE, lowerValues)));
if (!error.isNull()) {
kDebug(1212) << "Error occurred while lowering support window: " << error->error_code;

View File

@ -1,51 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
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/>.
*********************************************************************/
// krazy:skip
/*
The only purpose of this file is to be later in the link order than
(nvidia's) libGL, thus being initialized by the dynamic linker before it,
allowing it to set __GL_YIELD=NOTHING soon enough for libGL to notice it.
*/
#include <stdlib.h>
class kwinnvidiahack
{
public:
kwinnvidiahack();
};
kwinnvidiahack::kwinnvidiahack()
{
const char* env = getenv("KWIN_NVIDIA_HACK");
#if 1 // turned on by default
if (env == NULL || env[ 0 ] != '0')
setenv("__GL_YIELD", "NOTHING", true);
#else // turned off by default
if (env != NULL && env[ 0 ] != '0')
setenv("__GL_YIELD", "NOTHING", true);
#endif
}
kwinnvidiahack kwinnvidiahackinst;

View File

@ -649,9 +649,14 @@ void Options::setHiddenPreviews(int hiddenPreviews)
void Options::setUnredirectFullscreen(bool unredirectFullscreen)
{
if (GLPlatform::instance()->driver() == Driver_Intel)
unredirectFullscreen = false; // bug #252817
if (m_unredirectFullscreen == unredirectFullscreen) {
return;
}
if (GLPlatform::instance()->driver() == Driver_Intel) { // write back the value
KConfigGroup(KGlobal::config(), "Compositing").writeEntry("UnredirectFullscreen", false);
}
m_unredirectFullscreen = unredirectFullscreen;
emit unredirectFullscreenChanged();
}
@ -763,7 +768,7 @@ void Options::setGlPreferBufferSwap(char glPreferBufferSwap)
// see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5
if (GLPlatform::instance()->driver() == Driver_NVidia)
glPreferBufferSwap = CopyFrontBuffer;
else
else if (GLPlatform::instance()->driver() != Driver_Unknown) // undetected, finally resolved when context is initialized
glPreferBufferSwap = ExtendDamage;
}
if (m_glPreferBufferSwap == (GlSwapStrategy)glPreferBufferSwap) {

View File

@ -345,6 +345,13 @@ void OpenGLPaintRedirector::resizePixmaps(const QRect *rects)
size[TopBottom] = QSize(align(qMax(rects[TopPixmap].width(), rects[BottomPixmap].width()), 128),
rects[TopPixmap].height() + rects[BottomPixmap].height());
if (!GLTexture::NPOTTextureSupported()) {
for (int i = 0; i < 2; i++) {
size[i].rwidth() = nearestPowerOfTwo(size[i].width());
size[i].rheight() = nearestPowerOfTwo(size[i].height());
}
}
bool fbo_bound = false;
for (int i = 0; i < 2; i++) {

View File

@ -140,7 +140,7 @@ void Placement::placeAtRandom(Client* c, const QRect& area, Policy /*next*/)
}
// TODO: one day, there'll be C++11 ...
static inline bool isIrrelevant(Client *client, Client *regarding, int desktop)
static inline bool isIrrelevant(const Client *client, const Client *regarding, int desktop)
{
if (!client)
return true;
@ -154,6 +154,8 @@ static inline bool isIrrelevant(Client *client, Client *regarding, int desktop)
return true;
if (!client->isOnCurrentActivity())
return true;
if (client->isDesktop())
return true;
return false;
}
@ -808,16 +810,14 @@ void Workspace::slotWindowQuickTileBottomRight()
int Workspace::packPositionLeft(const Client* cl, int oldx, bool left_edge) const
{
int newx = clientArea(MovementArea, cl).left();
int newx = clientArea(MaximizeArea, cl).left();
if (oldx <= newx) // try another Xinerama screen
newx = clientArea(MovementArea,
newx = clientArea(MaximizeArea,
QPoint(cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left();
if (oldx <= newx)
return oldx;
for (ClientList::ConstIterator it = clients.constBegin();
it != clients.constEnd();
++it) {
if (!(*it)->isShown(false) || !(*it)->isOnDesktop(active_client->desktop()))
for (ClientList::ConstIterator it = clients.constBegin(), end = clients.constEnd(); it != end; ++it) {
if (isIrrelevant(*it, cl, cl->desktop()))
continue;
int x = left_edge ? (*it)->geometry().right() + 1 : (*it)->geometry().left() - 1;
if (x > newx && x < oldx
@ -830,16 +830,14 @@ int Workspace::packPositionLeft(const Client* cl, int oldx, bool left_edge) cons
int Workspace::packPositionRight(const Client* cl, int oldx, bool right_edge) const
{
int newx = clientArea(MovementArea, cl).right();
int newx = clientArea(MaximizeArea, cl).right();
if (oldx >= newx) // try another Xinerama screen
newx = clientArea(MovementArea,
newx = clientArea(MaximizeArea,
QPoint(cl->geometry().right() + 1, cl->geometry().center().y()), cl->desktop()).right();
if (oldx >= newx)
return oldx;
for (ClientList::ConstIterator it = clients.constBegin();
it != clients.constEnd();
++it) {
if (!(*it)->isShown(false) || !(*it)->isOnDesktop(cl->desktop()))
for (ClientList::ConstIterator it = clients.constBegin(), end = clients.constEnd(); it != end; ++it) {
if (isIrrelevant(*it, cl, cl->desktop()))
continue;
int x = right_edge ? (*it)->geometry().left() - 1 : (*it)->geometry().right() + 1;
if (x < newx && x > oldx
@ -852,16 +850,14 @@ int Workspace::packPositionRight(const Client* cl, int oldx, bool right_edge) co
int Workspace::packPositionUp(const Client* cl, int oldy, bool top_edge) const
{
int newy = clientArea(MovementArea, cl).top();
int newy = clientArea(MaximizeArea, cl).top();
if (oldy <= newy) // try another Xinerama screen
newy = clientArea(MovementArea,
newy = clientArea(MaximizeArea,
QPoint(cl->geometry().center().x(), cl->geometry().top() - 1), cl->desktop()).top();
if (oldy <= newy)
return oldy;
for (ClientList::ConstIterator it = clients.constBegin();
it != clients.constEnd();
++it) {
if (!(*it)->isShown(false) || !(*it)->isOnDesktop(cl->desktop()))
for (ClientList::ConstIterator it = clients.constBegin(), end = clients.constEnd(); it != end; ++it) {
if (isIrrelevant(*it, cl, cl->desktop()))
continue;
int y = top_edge ? (*it)->geometry().bottom() + 1 : (*it)->geometry().top() - 1;
if (y > newy && y < oldy
@ -874,16 +870,14 @@ int Workspace::packPositionUp(const Client* cl, int oldy, bool top_edge) const
int Workspace::packPositionDown(const Client* cl, int oldy, bool bottom_edge) const
{
int newy = clientArea(MovementArea, cl).bottom();
int newy = clientArea(MaximizeArea, cl).bottom();
if (oldy >= newy) // try another Xinerama screen
newy = clientArea(MovementArea,
newy = clientArea(MaximizeArea,
QPoint(cl->geometry().center().x(), cl->geometry().bottom() + 1), cl->desktop()).bottom();
if (oldy >= newy)
return oldy;
for (ClientList::ConstIterator it = clients.constBegin();
it != clients.constEnd();
++it) {
if (!(*it)->isShown(false) || !(*it)->isOnDesktop(cl->desktop()))
for (ClientList::ConstIterator it = clients.constBegin(), end = clients.constEnd(); it != end; ++it) {
if (isIrrelevant(*it, cl, cl->desktop()))
continue;
int y = bottom_edge ? (*it)->geometry().top() - 1 : (*it)->geometry().bottom() + 1;
if (y < newy && y > oldy

View File

@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screens.h"
#include "workspace.h"
#include <math.h>
#include <cmath>
#include <unistd.h>
#include <stddef.h>
@ -1349,26 +1349,33 @@ void SceneOpenGL2Window::setupLeafNodes(LeafNode *nodes, const WindowQuadList *q
getDecorationTextures(textures);
nodes[LeftRightLeaf].texture = textures[0];
nodes[LeftRightLeaf].opacity = data.opacity() * data.decorationOpacity();
nodes[LeftRightLeaf].opacity = data.opacity();
nodes[LeftRightLeaf].hasAlpha = true;
nodes[LeftRightLeaf].coordinateType = UnnormalizedCoordinates;
nodes[TopBottomLeaf].texture = textures[1];
nodes[TopBottomLeaf].opacity = data.opacity() * data.decorationOpacity();
nodes[TopBottomLeaf].opacity = data.opacity();
nodes[TopBottomLeaf].hasAlpha = true;
nodes[TopBottomLeaf].coordinateType = UnnormalizedCoordinates;
}
nodes[ContentLeaf].texture = s_frameTexture;
nodes[ContentLeaf].hasAlpha = !isOpaque();
nodes[ContentLeaf].opacity = data.opacity();
// TODO: ARGB crsoofading is atm. a hack, playing on opacities for two dumb SrcOver operations
// Should be a shader
if (data.crossFadeProgress() != 1.0 && (data.opacity() < 0.95 || toplevel->hasAlpha())) {
const float opacity = 1.0 - data.crossFadeProgress();
nodes[ContentLeaf].opacity = data.opacity() * (1 - pow(opacity, 1.0f + 2.0f * data.opacity()));
} else {
nodes[ContentLeaf].opacity = data.opacity();
}
nodes[ContentLeaf].coordinateType = UnnormalizedCoordinates;
if (data.crossFadeProgress() != 1.0) {
OpenGLWindowPixmap *previous = previousWindowPixmap<OpenGLWindowPixmap>();
nodes[PreviousContentLeaf].texture = previous ? previous->texture() : NULL;
nodes[PreviousContentLeaf].hasAlpha = !isOpaque();
nodes[PreviousContentLeaf].opacity = 1.0 - data.crossFadeProgress();
nodes[PreviousContentLeaf].opacity = data.opacity() * (1.0 - data.crossFadeProgress());
nodes[PreviousContentLeaf].coordinateType = NormalizedCoordinates;
}
}
@ -1599,7 +1606,14 @@ void SceneOpenGL1Window::performPaint(int mask, QRegion region, WindowPaintData
OpenGLWindowPixmap *previous = previousWindowPixmap<OpenGLWindowPixmap>();
const WindowQuadList contentQuads = data.quads.select(WindowQuadContents);
if (previous && data.crossFadeProgress() != 1.0) {
paintContent(s_frameTexture, region, mask, data.opacity(), data, contentQuads, false);
// TODO: ARGB crsoofading is atm. a hack, playing on opacities for two dumb SrcOver operations
// Will require a caching texture or sth. else 1.2 compliant
float opacity = data.opacity();
if (opacity < 0.95f || toplevel->hasAlpha()) {
opacity = 1 - data.crossFadeProgress();
opacity = data.opacity() * (1 - pow(opacity, 1.0f + 2.0f * data.opacity()));
}
paintContent(s_frameTexture, region, mask, opacity, data, contentQuads, false);
previous->texture()->setFilter(filter == Scene::ImageFilterGood ? GL_LINEAR : GL_NEAREST);
WindowQuadList oldContents;
const QRect &oldGeometry = previous->contentsRect();
@ -1620,7 +1634,8 @@ void SceneOpenGL1Window::performPaint(int mask, QRegion region, WindowPaintData
}
oldContents.append(newQuad);
}
paintContent(previous->texture(), region, mask, 1.0 - data.crossFadeProgress(), data, oldContents, true);
opacity = data.opacity() * (1.0 - data.crossFadeProgress());
paintContent(previous->texture(), region, mask, opacity, data, oldContents, true);
} else {
paintContent(s_frameTexture, region, mask, data.opacity(), data, contentQuads, false);
}
@ -1722,7 +1737,7 @@ void SceneOpenGL1Window::prepareStates(TextureType type, qreal opacity, qreal br
glColor4f(opacity, opacity, opacity, opacity);
tex->bind();
if (alpha || brightness != 1.0f) {
if (alpha || !opaque || brightness != 1.0f) {
glActiveTexture(GL_TEXTURE3);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);

View File

@ -48,6 +48,10 @@ namespace KWin
xcb_render_picture_t SceneXrender::buffer = XCB_RENDER_PICTURE_NONE;
ScreenPaintData SceneXrender::screen_paint;
#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))
#define FIXED_TO_DOUBLE(f) ((double) ((f) / 65536.0))
static xcb_render_pictformat_t findFormatForVisual(xcb_visualid_t visual)
{
static QHash<xcb_visualid_t, xcb_render_pictformat_t> s_cache;
@ -445,7 +449,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
if (toplevel->hasShadow())
transformed_shape |= toplevel->shadow()->shadowRegion();
#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))
xcb_render_transform_t xform = {
DOUBLE_TO_FIXED(1), DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(0),
DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(1), DOUBLE_TO_FIXED(0),
@ -479,7 +482,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
}
transformed_shape.setRects(rects.constData(), rects.count());
}
#undef DOUBLE_TO_FIXED
transformed_shape.translate(mapToScreen(mask, data, QPoint(0, 0)));
PaintClipper pcreg(region); // clip by the region to paint
@ -495,7 +497,8 @@ 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
const bool blitInTempPixmap = xRenderOffscreen() || (scaled && (wantShadow || (client && !client->noBorder()) || (deleted && !deleted->noBorder())));
const bool blitInTempPixmap = xRenderOffscreen() || (data.crossFadeProgress() < 1.0 && !opaque) ||
(scaled && (wantShadow || (client && !client->noBorder()) || (deleted && !deleted->noBorder())));
xcb_render_picture_t renderTarget = buffer;
if (blitInTempPixmap) {
@ -630,7 +633,38 @@ xcb_render_composite(connection(), XCB_RENDER_PICT_OP_OVER, m_xrenderShadow->pic
if (!opaque) {
clientAlpha = xRenderBlendPicture(data.opacity());
}
xcb_render_composite(connection(), clientRenderOp, pic, clientAlpha, renderTarget, cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height());
xcb_render_composite(connection(), clientRenderOp, pic, clientAlpha, renderTarget,
cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height());
if (data.crossFadeProgress() < 1.0 && data.crossFadeProgress() > 0.0) {
XRenderWindowPixmap *previous = previousWindowPixmap<XRenderWindowPixmap>();
if (previous && previous != pixmap) {
static XRenderPicture cFadeAlpha(XCB_RENDER_PICTURE_NONE);
static xcb_render_color_t cFadeColor = {0, 0, 0, 0};
cFadeColor.alpha = uint16_t((1.0 - data.crossFadeProgress()) * 0xffff);
if (cFadeAlpha == XCB_RENDER_PICTURE_NONE) {
cFadeAlpha = xRenderFill(cFadeColor);
} else {
xcb_rectangle_t rect = {0, 0, 1, 1};
xcb_render_fill_rectangles(connection(), XCB_RENDER_PICT_OP_SRC, cFadeAlpha, cFadeColor , 1, &rect);
}
if (previous->size() != pixmap->size()) {
xcb_render_transform_t xform2 = {
DOUBLE_TO_FIXED(FIXED_TO_DOUBLE(xform.matrix11) * previous->size().width() / pixmap->size().width()), DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(0),
DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(FIXED_TO_DOUBLE(xform.matrix22) * previous->size().height() / pixmap->size().height()), DOUBLE_TO_FIXED(0),
DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(0), DOUBLE_TO_FIXED(1)
};
xcb_render_set_picture_transform(connection(), previous->picture(), xform2);
}
xcb_render_composite(connection(), opaque ? XCB_RENDER_PICT_OP_OVER : XCB_RENDER_PICT_OP_ATOP,
previous->picture(), cFadeAlpha, renderTarget,
cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height());
if (previous->size() != pixmap->size()) {
xcb_render_set_picture_transform(connection(), previous->picture(), identity);
}
}
}
if (!opaque)
transformed_shape = QRegion();
}
@ -675,7 +709,7 @@ xcb_render_composite(connection(), XCB_RENDER_PICT_OP_OVER, _PART_, decorationAl
if (blitInTempPixmap) {
const QRect r = mapToScreen(mask, data, temp_visibleRect);
xcb_render_set_picture_transform(connection(), *s_tempPicture, xform);
setPictureFilter(*s_tempPicture, KWin::Scene::ImageFilterGood);
setPictureFilter(*s_tempPicture, filter);
xcb_render_composite(connection(), XCB_RENDER_PICT_OP_OVER, *s_tempPicture,
XCB_RENDER_PICTURE_NONE, buffer,
0, 0, 0, 0, r.x(), r.y(), r.width(), r.height());
@ -926,7 +960,7 @@ void SceneXrender::EffectFrame::renderUnstyled(xcb_render_picture_t pict, const
qreal x = roundness;//we start at angle = 0
qreal y = 0;
#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))
QVector<xcb_render_pointfix_t> points;
xcb_render_pointfix_t point;
point.x = DOUBLE_TO_FIXED(roundness);
@ -944,7 +978,6 @@ void SceneXrender::EffectFrame::renderUnstyled(xcb_render_picture_t pict, const
XRenderPicture fill = xRenderFill(Qt::black);
xcb_render_tri_fan(connection(), XCB_RENDER_PICT_OP_OVER, fill, *s_effectFrameCircle,
0, 0, 0, points.count(), points.constData());
#undef DOUBLE_TO_FIXED
}
// TODO: merge alpha mask with SceneXrender::Window::alphaMask
// alpha mask
@ -1096,5 +1129,8 @@ xcb_render_picture_t SceneXRenderShadow::picture(Shadow::ShadowElements element)
return *m_pictures[element];
}
#undef DOUBLE_TO_FIXED
#undef FIXED_TO_DOUBLE
} // namespace
#endif

View File

@ -47,8 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace KWin {
// Reset timeout
static const int TRESHOLD_RESET = 250;
// Mouse should not move more than this many pixels
static const int DISTANCE_RESET = 30;
@ -133,7 +131,7 @@ void Edge::check(const QPoint &cursorPos, const QDateTime &triggerTime, bool for
bool directActivate = forceNoPushBack || edges()->cursorPushBackDistance().isNull();
if (directActivate || canActivate(cursorPos, triggerTime)) {
m_lastTrigger = triggerTime;
m_lastReset = triggerTime;
m_lastReset = QDateTime(); // invalidate
handle(cursorPos);
} else {
pushCursorBack(cursorPos);
@ -143,7 +141,11 @@ void Edge::check(const QPoint &cursorPos, const QDateTime &triggerTime, bool for
bool Edge::canActivate(const QPoint &cursorPos, const QDateTime &triggerTime)
{
if (m_lastReset.msecsTo(triggerTime) > TRESHOLD_RESET) {
// we check whether either the timer has explicitly been invalidated (successfull trigger) or is
// bigger than the reactivation threshold (activation "aborted", usually due to moving away the cursor
// from the corner after successfull activation)
// either condition means that "this is the first event in a new attempt"
if (!m_lastReset.isValid() || m_lastReset.msecsTo(triggerTime) > edges()->reActivationThreshold()) {
m_lastReset = triggerTime;
return false;
}

Some files were not shown because too many files have changed in this diff Show More