Drop cmakedefine HAVE_WAYLAND_CURSOR
Now a required build-dep.
This commit is contained in:
parent
da1e063a37
commit
a6c6408f54
5 changed files with 0 additions and 26 deletions
|
@ -263,7 +263,6 @@ configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib
|
||||||
# for kwin internal things
|
# for kwin internal things
|
||||||
set(HAVE_WAYLAND TRUE)
|
set(HAVE_WAYLAND TRUE)
|
||||||
set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND})
|
set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND})
|
||||||
set(HAVE_WAYLAND_CURSOR TRUE)
|
|
||||||
set(HAVE_X11_XCB ${X11_XCB_FOUND})
|
set(HAVE_X11_XCB ${X11_XCB_FOUND})
|
||||||
|
|
||||||
include(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
|
|
|
@ -32,9 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <KWayland/Server/seat_interface.h>
|
#include <KWayland/Server/seat_interface.h>
|
||||||
#include <KWayland/Server/surface_interface.h>
|
#include <KWayland/Server/surface_interface.h>
|
||||||
// Wayland
|
// Wayland
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
#include <wayland-cursor.h>
|
#include <wayland-cursor.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -91,7 +89,6 @@ void AbstractBackend::installCursorImage(Qt::CursorShape shape)
|
||||||
|
|
||||||
void AbstractBackend::updateCursorImage(Qt::CursorShape shape)
|
void AbstractBackend::updateCursorImage(Qt::CursorShape shape)
|
||||||
{
|
{
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
if (!m_cursorTheme) {
|
if (!m_cursorTheme) {
|
||||||
// check whether we can create it
|
// check whether we can create it
|
||||||
if (waylandServer() && waylandServer()->internalShmPool()) {
|
if (waylandServer() && waylandServer()->internalShmPool()) {
|
||||||
|
@ -112,9 +109,6 @@ void AbstractBackend::updateCursorImage(Qt::CursorShape shape)
|
||||||
waylandServer()->internalClientConection()->flush();
|
waylandServer()->internalClientConection()->flush();
|
||||||
waylandServer()->dispatch();
|
waylandServer()->dispatch();
|
||||||
installThemeCursor(KWayland::Client::Buffer::getId(b), QPoint(cursor->hotspot_x, cursor->hotspot_y));
|
installThemeCursor(KWayland::Client::Buffer::getId(b), QPoint(cursor->hotspot_x, cursor->hotspot_y));
|
||||||
#else
|
|
||||||
Q_UNUSED(shape)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBackend::installThemeCursor(quint32 id, const QPoint &hotspot)
|
void AbstractBackend::installThemeCursor(quint32 id, const QPoint &hotspot)
|
||||||
|
|
|
@ -26,9 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "scene_qpainter_wayland_backend.h"
|
#include "scene_qpainter_wayland_backend.h"
|
||||||
#include "screens_wayland.h"
|
#include "screens_wayland.h"
|
||||||
#include "wayland_server.h"
|
#include "wayland_server.h"
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
#include "wayland_cursor_theme.h"
|
#include "wayland_cursor_theme.h"
|
||||||
#endif
|
|
||||||
#if HAVE_WAYLAND_EGL
|
#if HAVE_WAYLAND_EGL
|
||||||
#include "egl_wayland_backend.h"
|
#include "egl_wayland_backend.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,9 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <QMetaMethod>
|
#include <QMetaMethod>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
// Wayland
|
// Wayland
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
#include <wayland-cursor.h>
|
#include <wayland-cursor.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -74,9 +70,7 @@ WaylandSeat::WaylandSeat(wl_seat *seat, WaylandBackend *backend)
|
||||||
, m_keyboard(NULL)
|
, m_keyboard(NULL)
|
||||||
, m_touch(nullptr)
|
, m_touch(nullptr)
|
||||||
, m_cursor(NULL)
|
, m_cursor(NULL)
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
, m_theme(new WaylandCursorTheme(backend->shmPool(), this))
|
, m_theme(new WaylandCursorTheme(backend->shmPool(), this))
|
||||||
#endif
|
|
||||||
, m_enteredSerial(0)
|
, m_enteredSerial(0)
|
||||||
, m_backend(backend)
|
, m_backend(backend)
|
||||||
, m_installCursor(false)
|
, m_installCursor(false)
|
||||||
|
@ -256,7 +250,6 @@ void WaylandSeat::installCursorImage(wl_buffer *image, const QSize &size, const
|
||||||
|
|
||||||
void WaylandSeat::installCursorImage(Qt::CursorShape shape)
|
void WaylandSeat::installCursorImage(Qt::CursorShape shape)
|
||||||
{
|
{
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
wl_cursor_image *image = m_theme->get(shape);
|
wl_cursor_image *image = m_theme->get(shape);
|
||||||
if (!image) {
|
if (!image) {
|
||||||
return;
|
return;
|
||||||
|
@ -264,7 +257,6 @@ void WaylandSeat::installCursorImage(Qt::CursorShape shape)
|
||||||
installCursorImage(wl_cursor_image_get_buffer(image),
|
installCursorImage(wl_cursor_image_get_buffer(image),
|
||||||
QSize(image->width, image->height),
|
QSize(image->width, image->height),
|
||||||
QPoint(image->hotspot_x, image->hotspot_y));
|
QPoint(image->hotspot_x, image->hotspot_y));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaylandSeat::installCursorImage(const QImage &image, const QPoint &hotSpot)
|
void WaylandSeat::installCursorImage(const QImage &image, const QPoint &hotSpot)
|
||||||
|
@ -281,9 +273,7 @@ void WaylandSeat::setInstallCursor(bool install)
|
||||||
WaylandCursor::WaylandCursor(Surface *parentSurface, WaylandBackend *backend)
|
WaylandCursor::WaylandCursor(Surface *parentSurface, WaylandBackend *backend)
|
||||||
: QObject(backend)
|
: QObject(backend)
|
||||||
, m_backend(backend)
|
, m_backend(backend)
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
, m_theme(new WaylandCursorTheme(backend->shmPool(), this))
|
, m_theme(new WaylandCursorTheme(backend->shmPool(), this))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
auto surface = backend->compositor()->createSurface(this);
|
auto surface = backend->compositor()->createSurface(this);
|
||||||
m_subSurface = backend->subCompositor()->createSubSurface(QPointer<Surface>(surface), QPointer<Surface>(parentSurface), this);
|
m_subSurface = backend->subCompositor()->createSubSurface(QPointer<Surface>(surface), QPointer<Surface>(parentSurface), this);
|
||||||
|
@ -338,7 +328,6 @@ void WaylandCursor::setCursorImage(const QImage &image, const QPoint &hotspot)
|
||||||
|
|
||||||
void WaylandCursor::setCursorImage(Qt::CursorShape shape)
|
void WaylandCursor::setCursorImage(Qt::CursorShape shape)
|
||||||
{
|
{
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
wl_cursor_image *image = m_theme->get(shape);
|
wl_cursor_image *image = m_theme->get(shape);
|
||||||
if (!image) {
|
if (!image) {
|
||||||
return;
|
return;
|
||||||
|
@ -346,7 +335,6 @@ void WaylandCursor::setCursorImage(Qt::CursorShape shape)
|
||||||
setCursorImage(wl_cursor_image_get_buffer(image),
|
setCursorImage(wl_cursor_image_get_buffer(image),
|
||||||
QSize(image->width, image->height),
|
QSize(image->width, image->height),
|
||||||
QPoint(image->hotspot_x, image->hotspot_y));
|
QPoint(image->hotspot_x, image->hotspot_y));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WaylandBackend::WaylandBackend(QObject *parent)
|
WaylandBackend::WaylandBackend(QObject *parent)
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#define KWIN_RULES_DIALOG_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kwin_rules_dialog"
|
#define KWIN_RULES_DIALOG_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kwin_rules_dialog"
|
||||||
#cmakedefine01 HAVE_WAYLAND
|
#cmakedefine01 HAVE_WAYLAND
|
||||||
#cmakedefine01 HAVE_WAYLAND_EGL
|
#cmakedefine01 HAVE_WAYLAND_EGL
|
||||||
#cmakedefine01 HAVE_WAYLAND_CURSOR
|
|
||||||
#cmakedefine01 HAVE_INPUT
|
#cmakedefine01 HAVE_INPUT
|
||||||
#cmakedefine01 HAVE_X11_XCB
|
#cmakedefine01 HAVE_X11_XCB
|
||||||
#cmakedefine01 HAVE_DRM
|
#cmakedefine01 HAVE_DRM
|
||||||
|
|
|
@ -1368,12 +1368,6 @@ QString Workspace::supportInformation() const
|
||||||
support.append(yes);
|
support.append(yes);
|
||||||
#else
|
#else
|
||||||
support.append(no);
|
support.append(no);
|
||||||
#endif
|
|
||||||
support.append(QStringLiteral("HAVE_WAYLAND_CURSOR: "));
|
|
||||||
#if HAVE_WAYLAND_CURSOR
|
|
||||||
support.append(yes);
|
|
||||||
#else
|
|
||||||
support.append(no);
|
|
||||||
#endif
|
#endif
|
||||||
support.append(QStringLiteral("HAVE_INPUT: "));
|
support.append(QStringLiteral("HAVE_INPUT: "));
|
||||||
#if HAVE_INPUT
|
#if HAVE_INPUT
|
||||||
|
|
Loading…
Reference in a new issue