Plasma compile fixes for non-X11 platforms. Not sure if the X11 stuff even needs an implementation on other platforms or whether this is sufficient.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=763632
This commit is contained in:
parent
baf6fb0b13
commit
2d697cbfa9
@ -26,13 +26,17 @@
|
||||
#include <QPixmap>
|
||||
#include <QTimer>
|
||||
#include <QGraphicsView>
|
||||
#ifdef Q_WS_X11
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
|
||||
#include <kglobal.h>
|
||||
#include <kwindowsystem.h>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <fixx11h.h>
|
||||
#endif
|
||||
|
||||
#include "plasma/plasma.h"
|
||||
|
||||
@ -206,6 +210,7 @@ bool WindowPreview::previewsAvailable() const
|
||||
if (!KWindowSystem::compositingActive()) {
|
||||
return false;
|
||||
}
|
||||
#ifdef Q_WS_X11
|
||||
// hackish way to find out if KWin has the effect enabled,
|
||||
// TODO provide proper support
|
||||
Display* dpy = QX11Info::display();
|
||||
@ -217,6 +222,7 @@ bool WindowPreview::previewsAvailable() const
|
||||
XFree(list);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -235,6 +241,7 @@ QSize WindowPreview::sizeHint() const
|
||||
|
||||
void WindowPreview::readWindowSize() const
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
Window r;
|
||||
int x, y;
|
||||
unsigned int w, h, b, d;
|
||||
@ -243,10 +250,14 @@ void WindowPreview::readWindowSize() const
|
||||
} else {
|
||||
windowSize = QSize();
|
||||
}
|
||||
#else
|
||||
windowSize = QSize();
|
||||
#endif
|
||||
}
|
||||
|
||||
void WindowPreview::setInfo()
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
Display *dpy = QX11Info::display();
|
||||
Atom atom = XInternAtom(dpy, "_KDE_WINDOW_PREVIEW", False);
|
||||
if (id == 0) {
|
||||
@ -264,6 +275,7 @@ void WindowPreview::setInfo()
|
||||
long data[] = { 1, 5, id, x(), y(), width(), height() };
|
||||
XChangeProperty(dpy, parentWidget()->winId(), atom, atom, 32, PropModeReplace,
|
||||
reinterpret_cast< unsigned char* >( data ), sizeof( data ) / sizeof( data[ 0 ] ));
|
||||
#endif
|
||||
}
|
||||
|
||||
void ToolTip::resizeEvent(QResizeEvent *)
|
||||
|
Loading…
Reference in New Issue
Block a user