Merge branch 'KDE/4.11'
This commit is contained in:
commit
42beb68855
8 changed files with 25 additions and 13 deletions
|
@ -450,6 +450,7 @@ void Client::createDecoration(const QRect& oldgeom)
|
||||||
connect(this, SIGNAL(shadeChanged()), decoration, SLOT(shadeChange()));
|
connect(this, SIGNAL(shadeChanged()), decoration, SLOT(shadeChange()));
|
||||||
connect(this, SIGNAL(desktopChanged()), decoration, SLOT(desktopChange()));
|
connect(this, SIGNAL(desktopChanged()), decoration, SLOT(desktopChange()));
|
||||||
connect(this, SIGNAL(captionChanged()), decoration, SLOT(captionChange()));
|
connect(this, SIGNAL(captionChanged()), decoration, SLOT(captionChange()));
|
||||||
|
connect(this, SIGNAL(iconChanged()), decoration, SLOT(iconChange()));
|
||||||
connect(this, SIGNAL(activeChanged()), decoration, SLOT(activeChange()));
|
connect(this, SIGNAL(activeChanged()), decoration, SLOT(activeChange()));
|
||||||
connect(this, SIGNAL(clientMaximizedStateChanged(KWin::Client*,KDecorationDefines::MaximizeMode)),
|
connect(this, SIGNAL(clientMaximizedStateChanged(KWin::Client*,KDecorationDefines::MaximizeMode)),
|
||||||
decoration, SLOT(maximizeChange()));
|
decoration, SLOT(maximizeChange()));
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ int EffectsHandlerImpl::displayWidth() const
|
||||||
|
|
||||||
int EffectsHandlerImpl::displayHeight() const
|
int EffectsHandlerImpl::displayHeight() const
|
||||||
{
|
{
|
||||||
return KWin::displayWidth();
|
return KWin::displayHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
||||||
|
|
|
@ -51,11 +51,14 @@ DashboardEffect::~DashboardEffect()
|
||||||
|
|
||||||
void DashboardEffect::reconfigure(ReconfigureFlags)
|
void DashboardEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
|
DashboardConfig::self()->readConfig();
|
||||||
brightness = DashboardConfig::brightness()/ 100.0;
|
brightness = DashboardConfig::brightness()/ 100.0;
|
||||||
saturation = DashboardConfig::saturation()/ 100.0;
|
saturation = DashboardConfig::saturation()/ 100.0;
|
||||||
blur = DashboardConfig::blur();
|
blur = DashboardConfig::blur();
|
||||||
|
|
||||||
timeline.setDuration(animationTime<DashboardConfig>(500));
|
timeline.setDuration(animationTime<DashboardConfig>(500));
|
||||||
|
if (transformWindow)
|
||||||
|
effects->addRepaintFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DashboardEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
void DashboardEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
||||||
|
|
|
@ -109,12 +109,15 @@ void HighlightWindowEffect::slotWindowAdded(EffectWindow* w)
|
||||||
{
|
{
|
||||||
if (!m_highlightedWindows.isEmpty()) {
|
if (!m_highlightedWindows.isEmpty()) {
|
||||||
// The effect is activated thus we need to add it to the opacity hash
|
// The effect is activated thus we need to add it to the opacity hash
|
||||||
if (w->isNormalWindow() || w->isDialog()) // Only fade out windows
|
foreach (const WId id, m_highlightedIds) {
|
||||||
m_windowOpacity[w] = isInitiallyHidden(w) ? 0.0 : 0.15;
|
if (w == effects->findWindow(id)) {
|
||||||
else
|
m_windowOpacity[w] = 1.0; // this window was demanded to be highlighted before it appeared
|
||||||
m_windowOpacity[w] = 1.0;
|
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)
|
void HighlightWindowEffect::slotWindowClosed(EffectWindow* w)
|
||||||
|
@ -128,7 +131,7 @@ void HighlightWindowEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
m_windowOpacity.remove(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)
|
if (a != m_atom)
|
||||||
return; // Not our atom
|
return; // Not our atom
|
||||||
|
@ -138,7 +141,8 @@ void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
effects->readRootProperty(m_atom, m_atom, 32);
|
effects->readRootProperty(m_atom, m_atom, 32);
|
||||||
if (byteData.length() < 1) {
|
if (byteData.length() < 1) {
|
||||||
// Property was removed, clearing highlight
|
// Property was removed, clearing highlight
|
||||||
finishHighlighting();
|
if (!addedWindow || w != addedWindow)
|
||||||
|
finishHighlighting();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long* data = reinterpret_cast<long*>(byteData.data());
|
long* data = reinterpret_cast<long*>(byteData.data());
|
||||||
|
@ -154,11 +158,13 @@ void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
//foreach ( EffectWindow* e, m_highlightedWindows )
|
//foreach ( EffectWindow* e, m_highlightedWindows )
|
||||||
// effects->setElevatedWindow( e, false );
|
// effects->setElevatedWindow( e, false );
|
||||||
m_highlightedWindows.clear();
|
m_highlightedWindows.clear();
|
||||||
|
m_highlightedIds.clear();
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
|
m_highlightedIds << data[i];
|
||||||
EffectWindow* foundWin = effects->findWindow(data[i]);
|
EffectWindow* foundWin = effects->findWindow(data[i]);
|
||||||
if (!foundWin) {
|
if (!foundWin) {
|
||||||
kDebug(1212) << "Invalid window targetted for highlight. Requested:" << data[i];
|
kDebug(1212) << "Invalid window targetted for highlight. Requested:" << data[i];
|
||||||
continue;
|
continue; // might come in later.
|
||||||
}
|
}
|
||||||
m_highlightedWindows.append(foundWin);
|
m_highlightedWindows.append(foundWin);
|
||||||
// TODO: We cannot just simply elevate the window as this will elevate it over
|
// TODO: We cannot just simply elevate the window as this will elevate it over
|
||||||
|
|
|
@ -42,7 +42,7 @@ public Q_SLOTS:
|
||||||
void slotWindowAdded(KWin::EffectWindow* w);
|
void slotWindowAdded(KWin::EffectWindow* w);
|
||||||
void slotWindowClosed(KWin::EffectWindow *w);
|
void slotWindowClosed(KWin::EffectWindow *w);
|
||||||
void slotWindowDeleted(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:
|
private:
|
||||||
void prepareHighlighting();
|
void prepareHighlighting();
|
||||||
|
@ -56,6 +56,7 @@ private:
|
||||||
long m_atom;
|
long m_atom;
|
||||||
QList<EffectWindow*> m_highlightedWindows;
|
QList<EffectWindow*> m_highlightedWindows;
|
||||||
EffectWindow* m_monitorWindow;
|
EffectWindow* m_monitorWindow;
|
||||||
|
QList<WId> m_highlightedIds;
|
||||||
|
|
||||||
// Offscreen position cache
|
// Offscreen position cache
|
||||||
/*QRect m_thumbArea; // Thumbnail area
|
/*QRect m_thumbArea; // Thumbnail area
|
||||||
|
|
|
@ -26,7 +26,7 @@ var scaleInEffect = {
|
||||||
},
|
},
|
||||||
isScaleWindow: function (window) {
|
isScaleWindow: function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
if (window.popupMenu || window.specialWindow || window.utility ||
|
if (window.popupMenu || window.specialWindow || window.utility || window.minimized ||
|
||||||
effect.isGrabbed(window, Effect.WindowAddedGrabRole)) {
|
effect.isGrabbed(window, Effect.WindowAddedGrabRole)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
|
||||||
QRect maxRect;
|
QRect maxRect;
|
||||||
int guideMaximized = MaximizeRestore;
|
int guideMaximized = MaximizeRestore;
|
||||||
if (c->maximizeMode() != 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();
|
QRect geo = c->geometry();
|
||||||
if (c->maximizeMode() & MaximizeHorizontal && (geo.x() == maxRect.left() || geo.right() == maxRect.right())) {
|
if (c->maximizeMode() & MaximizeHorizontal && (geo.x() == maxRect.left() || geo.right() == maxRect.right())) {
|
||||||
guideMaximized |= MaximizeHorizontal;
|
guideMaximized |= MaximizeHorizontal;
|
||||||
|
|
|
@ -581,7 +581,8 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
|
||||||
GLXContext ctx = glXGetCurrentContext();
|
GLXContext ctx = glXGetCurrentContext();
|
||||||
m_directRendering = glXIsDirect(display(), ctx);
|
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_fragment_shader") &&
|
||||||
m_extensions.contains("GL_ARB_vertex_shader");
|
m_extensions.contains("GL_ARB_vertex_shader");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue