Merge branch 'KDE/4.11'

This commit is contained in:
Thomas Lübking 2013-09-09 00:07:58 +02:00
commit 42beb68855
8 changed files with 25 additions and 13 deletions

View file

@ -450,6 +450,7 @@ void Client::createDecoration(const QRect& oldgeom)
connect(this, SIGNAL(shadeChanged()), decoration, SLOT(shadeChange()));
connect(this, SIGNAL(desktopChanged()), decoration, SLOT(desktopChange()));
connect(this, SIGNAL(captionChanged()), decoration, SLOT(captionChange()));
connect(this, SIGNAL(iconChanged()), decoration, SLOT(iconChange()));
connect(this, SIGNAL(activeChanged()), decoration, SLOT(activeChange()));
connect(this, SIGNAL(clientMaximizedStateChanged(KWin::Client*,KDecorationDefines::MaximizeMode)),
decoration, SLOT(maximizeChange()));

View file

@ -1030,7 +1030,7 @@ int EffectsHandlerImpl::displayWidth() const
int EffectsHandlerImpl::displayHeight() const
{
return KWin::displayWidth();
return KWin::displayHeight();
}
EffectWindow* EffectsHandlerImpl::findWindow(WId id) const

View file

@ -51,11 +51,14 @@ DashboardEffect::~DashboardEffect()
void DashboardEffect::reconfigure(ReconfigureFlags)
{
DashboardConfig::self()->readConfig();
brightness = DashboardConfig::brightness()/ 100.0;
saturation = DashboardConfig::saturation()/ 100.0;
blur = DashboardConfig::blur();
timeline.setDuration(animationTime<DashboardConfig>(500));
if (transformWindow)
effects->addRepaintFull();
}
void DashboardEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)

View file

@ -109,12 +109,15 @@ void HighlightWindowEffect::slotWindowAdded(EffectWindow* w)
{
if (!m_highlightedWindows.isEmpty()) {
// The effect is activated thus we need to add it to the opacity hash
if (w->isNormalWindow() || w->isDialog()) // Only fade out windows
m_windowOpacity[w] = isInitiallyHidden(w) ? 0.0 : 0.15;
else
m_windowOpacity[w] = 1.0;
foreach (const WId id, m_highlightedIds) {
if (w == effects->findWindow(id)) {
m_windowOpacity[w] = 1.0; // this window was demanded to be highlighted before it appeared
return;
}
}
m_windowOpacity[w] = 0.15; // this window is not currently highlighted
}
slotPropertyNotify(w, m_atom); // Check initial value
slotPropertyNotify(w, m_atom, w); // Check initial value
}
void HighlightWindowEffect::slotWindowClosed(EffectWindow* w)
@ -128,7 +131,7 @@ void HighlightWindowEffect::slotWindowDeleted(EffectWindow* w)
m_windowOpacity.remove(w);
}
void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a, EffectWindow *addedWindow)
{
if (a != m_atom)
return; // Not our atom
@ -138,7 +141,8 @@ void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
effects->readRootProperty(m_atom, m_atom, 32);
if (byteData.length() < 1) {
// Property was removed, clearing highlight
finishHighlighting();
if (!addedWindow || w != addedWindow)
finishHighlighting();
return;
}
long* data = reinterpret_cast<long*>(byteData.data());
@ -154,11 +158,13 @@ void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
//foreach ( EffectWindow* e, m_highlightedWindows )
// effects->setElevatedWindow( e, false );
m_highlightedWindows.clear();
m_highlightedIds.clear();
for (int i = 0; i < length; i++) {
m_highlightedIds << data[i];
EffectWindow* foundWin = effects->findWindow(data[i]);
if (!foundWin) {
kDebug(1212) << "Invalid window targetted for highlight. Requested:" << data[i];
continue;
continue; // might come in later.
}
m_highlightedWindows.append(foundWin);
// TODO: We cannot just simply elevate the window as this will elevate it over

View file

@ -42,7 +42,7 @@ public Q_SLOTS:
void slotWindowAdded(KWin::EffectWindow* w);
void slotWindowClosed(KWin::EffectWindow *w);
void slotWindowDeleted(KWin::EffectWindow *w);
void slotPropertyNotify(KWin::EffectWindow* w, long atom);
void slotPropertyNotify(KWin::EffectWindow* w, long atom, EffectWindow *addedWindow = NULL);
private:
void prepareHighlighting();
@ -56,6 +56,7 @@ private:
long m_atom;
QList<EffectWindow*> m_highlightedWindows;
EffectWindow* m_monitorWindow;
QList<WId> m_highlightedIds;
// Offscreen position cache
/*QRect m_thumbArea; // Thumbnail area

View file

@ -26,7 +26,7 @@ var scaleInEffect = {
},
isScaleWindow: function (window) {
"use strict";
if (window.popupMenu || window.specialWindow || window.utility ||
if (window.popupMenu || window.specialWindow || window.utility || window.minimized ||
effect.isGrabbed(window, Effect.WindowAddedGrabRole)) {
return false;
}

View file

@ -385,7 +385,7 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
QRect maxRect;
int guideMaximized = MaximizeRestore;
if (c->maximizeMode() != MaximizeRestore) {
maxRect = clientArea(MovementArea, pos + c->rect().center(), c->desktop());
maxRect = clientArea(MaximizeArea, pos + c->rect().center(), c->desktop());
QRect geo = c->geometry();
if (c->maximizeMode() & MaximizeHorizontal && (geo.x() == maxRect.left() || geo.right() == maxRect.right())) {
guideMaximized |= MaximizeHorizontal;

View file

@ -581,7 +581,8 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
GLXContext ctx = glXGetCurrentContext();
m_directRendering = glXIsDirect(display(), ctx);
m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") &&
m_supportsGLSL = m_directRendering &&
m_extensions.contains("GL_ARB_shader_objects") &&
m_extensions.contains("GL_ARB_fragment_shader") &&
m_extensions.contains("GL_ARB_vertex_shader");