mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
plasma: remove methods related to removed KWin effects
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5652dcb2b7
commit
3bf6381837
5 changed files with 2 additions and 86 deletions
|
@ -100,7 +100,6 @@ void DialogPrivate::themeChanged()
|
|||
// WA_NoSystemBackground is going to fail combined with sliding popups, but is needed
|
||||
// when we aren't compositing
|
||||
q->setAttribute(Qt::WA_NoSystemBackground, !translucency);
|
||||
WindowEffects::overrideShadow(q->winId(), !DialogShadows::self()->enabled());
|
||||
updateMask();
|
||||
q->update();
|
||||
}
|
||||
|
@ -108,8 +107,6 @@ void DialogPrivate::themeChanged()
|
|||
void DialogPrivate::updateMask()
|
||||
{
|
||||
const bool translucency = Plasma::Theme::defaultTheme()->windowTranslucencyEnabled();
|
||||
WindowEffects::enableBlurBehind(q->winId(), translucency,
|
||||
translucency ? background->mask() : QRegion());
|
||||
if (translucency) {
|
||||
q->clearMask();
|
||||
} else {
|
||||
|
@ -393,7 +390,6 @@ Dialog::Dialog(QWidget *parent, Qt::WindowFlags f)
|
|||
QPalette pal = palette();
|
||||
pal.setColor(backgroundRole(), Qt::transparent);
|
||||
setPalette(pal);
|
||||
WindowEffects::overrideShadow(winId(), !DialogShadows::self()->enabled());
|
||||
|
||||
d->adjustViewTimer = new QTimer(this);
|
||||
d->adjustViewTimer->setSingleShot(true);
|
||||
|
@ -723,7 +719,6 @@ void Dialog::showEvent(QShowEvent * event)
|
|||
}
|
||||
|
||||
emit dialogVisible(true);
|
||||
WindowEffects::overrideShadow(winId(), !DialogShadows::self()->enabled());
|
||||
DialogShadows::self()->addWindow(this, d->background->enabledBorders());
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,6 @@ void ToolTip::showEvent(QShowEvent *e)
|
|||
checkSize();
|
||||
QWidget::showEvent(e);
|
||||
d->preview->setInfo();
|
||||
WindowEffects::overrideShadow(winId(), true);
|
||||
}
|
||||
|
||||
void ToolTip::hideEvent(QHideEvent *e)
|
||||
|
@ -337,12 +336,7 @@ void ToolTip::resizeEvent(QResizeEvent *e)
|
|||
{
|
||||
QWidget::resizeEvent(e);
|
||||
d->background->resizeFrame(size());
|
||||
if (Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) {
|
||||
WindowEffects::enableBlurBehind(winId(), true, d->background->mask());
|
||||
clearMask();
|
||||
} else {
|
||||
setMask(d->background->mask());
|
||||
}
|
||||
setMask(d->background->mask());
|
||||
d->preview->setInfo();
|
||||
|
||||
if (isVisible()) {
|
||||
|
|
|
@ -266,9 +266,6 @@ QString ThemePrivate::findInTheme(const QString &image, const QString &theme, bo
|
|||
} else if (!compositingActive) {
|
||||
search = QLatin1String("desktoptheme/") + theme + QLatin1String("/opaque/") + image;
|
||||
search = KStandardDirs::locate("data", search);
|
||||
} else if (WindowEffects::isEffectAvailable(WindowEffects::BlurBehind)) {
|
||||
search = QLatin1String("desktoptheme/") + theme + QLatin1String("/translucent/") + image;
|
||||
search = KStandardDirs::locate("data", search);
|
||||
}
|
||||
|
||||
//not found or compositing enabled
|
||||
|
|
|
@ -62,12 +62,6 @@ bool isEffectAvailable(Effect effect)
|
|||
case HighlightWindows:
|
||||
effectName = "_KDE_WINDOW_HIGHLIGHT";
|
||||
break;
|
||||
case OverrideShadow:
|
||||
effectName = "_KDE_SHADOW_OVERRIDE";
|
||||
break;
|
||||
case BlurBehind:
|
||||
effectName = "_KDE_NET_WM_BLUR_BEHIND_REGION";
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -282,43 +276,6 @@ void highlightWindows(WId controller, const QList<WId> &ids)
|
|||
#endif
|
||||
}
|
||||
|
||||
void overrideShadow(WId window, bool override)
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
Display *dpy = QX11Info::display();
|
||||
Atom atom = XInternAtom( dpy, "_KDE_SHADOW_OVERRIDE", False );
|
||||
if (!override) {
|
||||
XDeleteProperty(dpy, window, atom);
|
||||
} else {
|
||||
QVarLengthArray<long, 1> data(1);
|
||||
data[0] = 1;
|
||||
XChangeProperty(dpy, window, atom, atom, 32, PropModeReplace,
|
||||
reinterpret_cast<unsigned char *>(data.data()), data.size());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void enableBlurBehind(WId window, bool enable, const QRegion ®ion)
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
Display *dpy = QX11Info::display();
|
||||
Atom atom = XInternAtom(dpy, "_KDE_NET_WM_BLUR_BEHIND_REGION", False);
|
||||
|
||||
if (enable) {
|
||||
QVector<QRect> rects = region.rects();
|
||||
QVector<unsigned long> data;
|
||||
foreach (const QRect &r, rects) {
|
||||
data << r.x() << r.y() << r.width() << r.height();
|
||||
}
|
||||
|
||||
XChangeProperty(dpy, window, atom, XA_CARDINAL, 32, PropModeReplace,
|
||||
reinterpret_cast<const unsigned char *>(data.constData()), data.size());
|
||||
} else {
|
||||
XDeleteProperty(dpy, window, atom);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ namespace WindowEffects
|
|||
WindowPreview = 2,
|
||||
PresentWindows = 3,
|
||||
PresentWindowsGroup = 4,
|
||||
HighlightWindows = 5,
|
||||
OverrideShadow = 6,
|
||||
BlurBehind = 7
|
||||
HighlightWindows = 5
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -125,31 +123,6 @@ namespace WindowEffects
|
|||
* @since 4.4
|
||||
*/
|
||||
PLASMA_EXPORT void highlightWindows(WId controller, const QList<WId> &ids);
|
||||
|
||||
/**
|
||||
* Forbid te windowmanager to automatically generate a shadow for this window
|
||||
* @param window the window that won't have shadow
|
||||
* @param override true if it won't have shadow, false enables it again
|
||||
*
|
||||
* @since 4.4
|
||||
*/
|
||||
PLASMA_EXPORT void overrideShadow(WId window, bool override);
|
||||
|
||||
/**
|
||||
* Instructs the window manager to blur the background in the specified region
|
||||
* behind the given window. Passing a null region will enable the blur effect
|
||||
* for the whole window. The region is relative to the top-left corner of the
|
||||
* client area.
|
||||
*
|
||||
* Note that you will usually want to set the region to the shape of the window,
|
||||
* excluding any shadow or halo.
|
||||
*
|
||||
* @param window The window for which to enable the blur effect
|
||||
* @param enable Enable the effect if @a true, disable it if @false
|
||||
* @param region The region within the window where the background will be blurred
|
||||
* @since 4.5
|
||||
*/
|
||||
PLASMA_EXPORT void enableBlurBehind(WId window, bool enable = true, const QRegion ®ion = QRegion());
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
|
Loading…
Add table
Reference in a new issue