mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
plasma: Plasma::WindowEffects::isEffectAvailable() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
470defbf10
commit
02bf57d377
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ bool isEffectAvailable(Effect effect)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
QString effectName;
|
QByteArray effectName;
|
||||||
|
|
||||||
switch (effect) {
|
switch (effect) {
|
||||||
case Slide: {
|
case Slide: {
|
||||||
|
@ -75,7 +75,7 @@ bool isEffectAvailable(Effect effect)
|
||||||
// hackish way to find out if KWin has the effect enabled,
|
// hackish way to find out if KWin has the effect enabled,
|
||||||
// TODO provide proper support
|
// TODO provide proper support
|
||||||
Display *dpy = QX11Info::display();
|
Display *dpy = QX11Info::display();
|
||||||
Atom atom = XInternAtom(dpy, effectName.toLatin1(), False);
|
Atom atom = XInternAtom(dpy, effectName.constData(), False);
|
||||||
int cnt;
|
int cnt;
|
||||||
Atom *list = XListProperties(dpy, DefaultRootWindow(dpy), &cnt);
|
Atom *list = XListProperties(dpy, DefaultRootWindow(dpy), &cnt);
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue