build: Add -Wno-unused-parameter compiler option
Due to being a compositor, kwin has to conform to some certain interfaces. It means a lot of virtual functions and function tables to integrate with C APIs. Naturally, we not always want to use every argument in such functions. Since we get -Wunused-parameter from -Wall, we have to plumb those unused arguments in order to suppress compiler warnings at the moment. However, I don't think that extra work is worth it. We cannot change or alter prototypes in any way to fix the warning the desired way. Q_UNUSED and similar macros are not good indicators of whether an argument is used too, we tend to overlook putting or removing those macros. I've also noticed that Q_UNUSED are not used to guide us with the removal no longer needed parameters. Therefore, I think it's worth adding -Wno-unused-parameter compiler option to stop the compiler producing warnings about unused parameters. It changes nothing except that we don't need to put Q_UNUSED anymore, which can be really cumbersome sometimes. Note that it doesn't affect unused variables, you'll still get a -Wunused-variable compiler warning if a variable is unused.
This commit is contained in:
parent
c308a262be
commit
7fffe99328
210 changed files with 21 additions and 1039 deletions
|
@ -14,6 +14,7 @@ find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
include(WriteBasicConfigVersionFile)
|
include(WriteBasicConfigVersionFile)
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
|
||||||
|
@ -441,6 +442,11 @@ include_directories(BEFORE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/colors
|
${CMAKE_CURRENT_SOURCE_DIR}/src/colors
|
||||||
)
|
)
|
||||||
|
|
||||||
|
check_cxx_compiler_flag(-Wno-unused-parameter COMPILER_UNUSED_PARAMETER_SUPPORTED)
|
||||||
|
if (COMPILER_UNUSED_PARAMETER_SUPPORTED)
|
||||||
|
add_compile_options(-Wno-unused-parameter)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (KF5DocTools_FOUND)
|
if (KF5DocTools_FOUND)
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -332,15 +332,12 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)
|
||||||
int drmHandleEvent(int fd, drmEventContextPtr evctx)
|
int drmHandleEvent(int fd, drmEventContextPtr evctx)
|
||||||
{
|
{
|
||||||
GPU(fd, -EINVAL);
|
GPU(fd, -EINVAL);
|
||||||
// TODO ?
|
|
||||||
Q_UNUSED(evctx)
|
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
int drmIoctl(int fd, unsigned long request, void *arg)
|
int drmIoctl(int fd, unsigned long request, void *arg)
|
||||||
{
|
{
|
||||||
GPU(fd, -EINVAL);
|
GPU(fd, -EINVAL);
|
||||||
Q_UNUSED(arg);
|
|
||||||
if (request == DRM_IOCTL_MODE_CREATE_DUMB) {
|
if (request == DRM_IOCTL_MODE_CREATE_DUMB) {
|
||||||
auto args = static_cast<drm_mode_create_dumb*>(arg);
|
auto args = static_cast<drm_mode_create_dumb*>(arg);
|
||||||
auto dumb = std::make_shared<MockDumbBuffer>(gpu, args->width, args->height, args->bpp);
|
auto dumb = std::make_shared<MockDumbBuffer>(gpu, args->width, args->height, args->bpp);
|
||||||
|
@ -419,10 +416,6 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
|
||||||
uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
|
uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
|
||||||
uint32_t *buf_id)
|
uint32_t *buf_id)
|
||||||
{
|
{
|
||||||
Q_UNUSED(depth)
|
|
||||||
Q_UNUSED(bpp)
|
|
||||||
Q_UNUSED(pitch)
|
|
||||||
Q_UNUSED(bo_handle)
|
|
||||||
GPU(fd, EINVAL)
|
GPU(fd, EINVAL)
|
||||||
auto fb = new MockFb(gpu, width, height);
|
auto fb = new MockFb(gpu, width, height);
|
||||||
*buf_id = fb->id;
|
*buf_id = fb->id;
|
||||||
|
@ -434,11 +427,6 @@ int drmModeAddFB2(int fd, uint32_t width, uint32_t height,
|
||||||
const uint32_t pitches[4], const uint32_t offsets[4],
|
const uint32_t pitches[4], const uint32_t offsets[4],
|
||||||
uint32_t *buf_id, uint32_t flags)
|
uint32_t *buf_id, uint32_t flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pixel_format)
|
|
||||||
Q_UNUSED(bo_handles)
|
|
||||||
Q_UNUSED(pitches)
|
|
||||||
Q_UNUSED(offsets)
|
|
||||||
Q_UNUSED(flags)
|
|
||||||
GPU(fd, EINVAL)
|
GPU(fd, EINVAL)
|
||||||
auto fb = new MockFb(gpu, width, height);
|
auto fb = new MockFb(gpu, width, height);
|
||||||
*buf_id = fb->id;
|
*buf_id = fb->id;
|
||||||
|
@ -451,12 +439,6 @@ int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height,
|
||||||
const uint64_t modifier[4], uint32_t *buf_id,
|
const uint64_t modifier[4], uint32_t *buf_id,
|
||||||
uint32_t flags)
|
uint32_t flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pixel_format)
|
|
||||||
Q_UNUSED(bo_handles)
|
|
||||||
Q_UNUSED(pitches)
|
|
||||||
Q_UNUSED(offsets)
|
|
||||||
Q_UNUSED(modifier)
|
|
||||||
Q_UNUSED(flags)
|
|
||||||
GPU(fd, EINVAL)
|
GPU(fd, EINVAL)
|
||||||
if (!gpu->deviceCaps.contains(DRM_CAP_ADDFB2_MODIFIERS)) {
|
if (!gpu->deviceCaps.contains(DRM_CAP_ADDFB2_MODIFIERS)) {
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
|
@ -605,13 +587,6 @@ int drmModeSetCursor(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width
|
||||||
int drmModeSetCursor2(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height, int32_t hot_x, int32_t hot_y)
|
int drmModeSetCursor2(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height, int32_t hot_x, int32_t hot_y)
|
||||||
{
|
{
|
||||||
GPU(fd, -EINVAL);
|
GPU(fd, -EINVAL);
|
||||||
// TODO ?
|
|
||||||
Q_UNUSED(crtcId)
|
|
||||||
Q_UNUSED(bo_handle)
|
|
||||||
Q_UNUSED(width)
|
|
||||||
Q_UNUSED(height)
|
|
||||||
Q_UNUSED(hot_x)
|
|
||||||
Q_UNUSED(hot_y)
|
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,13 +670,6 @@ drmModeConnectorPtr drmModeGetConnectorCurrent(int fd, uint32_t connector_id)
|
||||||
|
|
||||||
int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
|
int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
|
||||||
{
|
{
|
||||||
// TODO
|
|
||||||
Q_UNUSED(fd)
|
|
||||||
Q_UNUSED(crtc_id)
|
|
||||||
Q_UNUSED(size)
|
|
||||||
Q_UNUSED(red)
|
|
||||||
Q_UNUSED(green)
|
|
||||||
Q_UNUSED(blue)
|
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,8 +1161,7 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *u
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DRM_MODE_PAGE_FLIP_EVENT) {
|
if (flags & DRM_MODE_PAGE_FLIP_EVENT) {
|
||||||
// TODO
|
// Unsupported
|
||||||
Q_UNUSED(user_data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1230,34 +1197,21 @@ int drmModeDestroyPropertyBlob(int fd, uint32_t id)
|
||||||
|
|
||||||
int drmModeCreateLease(int fd, const uint32_t *objects, int num_objects, int flags, uint32_t *lessee_id)
|
int drmModeCreateLease(int fd, const uint32_t *objects, int num_objects, int flags, uint32_t *lessee_id)
|
||||||
{
|
{
|
||||||
// TODO?
|
|
||||||
Q_UNUSED(fd)
|
|
||||||
Q_UNUSED(objects)
|
|
||||||
Q_UNUSED(num_objects)
|
|
||||||
Q_UNUSED(flags)
|
|
||||||
Q_UNUSED(lessee_id)
|
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModeLesseeListPtr drmModeListLessees(int fd)
|
drmModeLesseeListPtr drmModeListLessees(int fd)
|
||||||
{
|
{
|
||||||
// TODO
|
|
||||||
Q_UNUSED(fd)
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModeObjectListPtr drmModeGetLease(int fd)
|
drmModeObjectListPtr drmModeGetLease(int fd)
|
||||||
{
|
{
|
||||||
// TODO?
|
|
||||||
Q_UNUSED(fd)
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int drmModeRevokeLease(int fd, uint32_t lessee_id)
|
int drmModeRevokeLease(int fd, uint32_t lessee_id)
|
||||||
{
|
{
|
||||||
// TODO?
|
|
||||||
Q_UNUSED(fd)
|
|
||||||
Q_UNUSED(lessee_id)
|
|
||||||
return -(errno = ENOTSUP);
|
return -(errno = ENOTSUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -398,7 +398,6 @@ Q_SIGNALS:
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override
|
void paintEvent(QPaintEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.fillRect(0, 0, width(), height(), Qt::red);
|
p.fillRect(0, 0, width(), height(), Qt::red);
|
||||||
}
|
}
|
||||||
|
|
|
@ -691,7 +691,6 @@ public:
|
||||||
|
|
||||||
bool eventFilter(QObject *watched, QEvent *event) override
|
bool eventFilter(QObject *watched, QEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(watched)
|
|
||||||
if (event->type() == QEvent::HoverMove) {
|
if (event->type() == QEvent::HoverMove) {
|
||||||
Q_EMIT hoverMove();
|
Q_EMIT hoverMove();
|
||||||
} else if (event->type() == QEvent::HoverLeave) {
|
} else if (event->type() == QEvent::HoverLeave) {
|
||||||
|
|
|
@ -27,8 +27,6 @@ public:
|
||||||
|
|
||||||
void paint(QPainter *painter, const QRect &repaintRegion) override
|
void paint(QPainter *painter, const QRect &repaintRegion) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(painter)
|
|
||||||
Q_UNUSED(repaintRegion)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
|
|
@ -33,7 +33,6 @@ Window::~Window() = default;
|
||||||
|
|
||||||
void Window::paintEvent(QPaintEvent *event)
|
void Window::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.fillRect(0, 0, width(), height(), Qt::red);
|
p.fillRect(0, 0, width(), height(), Qt::red);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ Window::~Window() = default;
|
||||||
|
|
||||||
void Window::paintEvent(QPaintEvent *event)
|
void Window::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.fillRect(0, 0, width(), height(), Qt::blue);
|
p.fillRect(0, 0, width(), height(), Qt::blue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,6 @@ HelperWindow::~HelperWindow() = default;
|
||||||
|
|
||||||
void HelperWindow::paintEvent(QPaintEvent *event)
|
void HelperWindow::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.fillRect(0, 0, width(), height(), Qt::red);
|
p.fillRect(0, 0, width(), height(), Qt::red);
|
||||||
}
|
}
|
||||||
|
@ -158,19 +157,16 @@ void HelperWindow::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void HelperWindow::wheelEvent(QWheelEvent *event)
|
void HelperWindow::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_EMIT wheel();
|
Q_EMIT wheel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::keyPressEvent(QKeyEvent *event)
|
void HelperWindow::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_EMIT keyPressed();
|
Q_EMIT keyPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
|
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_EMIT keyReleased();
|
Q_EMIT keyReleased();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,6 @@ HelperWindow::~HelperWindow() = default;
|
||||||
|
|
||||||
void HelperWindow::paintEvent(QPaintEvent *event)
|
void HelperWindow::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.fillRect(0, 0, width(), height(), Qt::red);
|
p.fillRect(0, 0, width(), height(), Qt::red);
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,7 +244,6 @@ void StackingOrderTest::testDeletedTransient()
|
||||||
|
|
||||||
// Close the top-most transient.
|
// Close the top-most transient.
|
||||||
connect(transient2, &Window::windowClosed, this, [](Window *original, Deleted *deleted) {
|
connect(transient2, &Window::windowClosed, this, [](Window *original, Deleted *deleted) {
|
||||||
Q_UNUSED(original)
|
|
||||||
deleted->refWindow();
|
deleted->refWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -659,7 +658,6 @@ void StackingOrderTest::testDeletedGroupTransient()
|
||||||
|
|
||||||
// Unmap the transient.
|
// Unmap the transient.
|
||||||
connect(transient, &X11Window::windowClosed, this, [](Window *original, Deleted *deleted) {
|
connect(transient, &X11Window::windowClosed, this, [](Window *original, Deleted *deleted) {
|
||||||
Q_UNUSED(original)
|
|
||||||
deleted->refWindow();
|
deleted->refWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,6 @@ MockInputMethod::~MockInputMethod()
|
||||||
|
|
||||||
void MockInputMethod::zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *context)
|
void MockInputMethod::zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *context)
|
||||||
{
|
{
|
||||||
Q_UNUSED(context)
|
|
||||||
if (!m_inputSurface) {
|
if (!m_inputSurface) {
|
||||||
m_inputSurface = Test::createSurface();
|
m_inputSurface = Test::createSurface();
|
||||||
m_inputMethodSurface = Test::createInputPanelSurfaceV1(m_inputSurface.get(), s_waylandConnection.outputs.first());
|
m_inputMethodSurface = Test::createInputPanelSurfaceV1(m_inputSurface.get(), s_waylandConnection.outputs.first());
|
||||||
|
@ -1306,7 +1305,6 @@ bool VirtualInputDevice::isEnabled() const
|
||||||
|
|
||||||
void VirtualInputDevice::setEnabled(bool enabled)
|
void VirtualInputDevice::setEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
Q_UNUSED(enabled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LEDs VirtualInputDevice::leds() const
|
LEDs VirtualInputDevice::leds() const
|
||||||
|
@ -1316,7 +1314,6 @@ LEDs VirtualInputDevice::leds() const
|
||||||
|
|
||||||
void VirtualInputDevice::setLeds(LEDs leds)
|
void VirtualInputDevice::setLeds(LEDs leds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VirtualInputDevice::isKeyboard() const
|
bool VirtualInputDevice::isKeyboard() const
|
||||||
|
|
|
@ -363,7 +363,6 @@ void TouchInputTest::testGestureDetection()
|
||||||
{
|
{
|
||||||
bool callbackTriggered = false;
|
bool callbackTriggered = false;
|
||||||
const auto callback = [&callbackTriggered](float progress) {
|
const auto callback = [&callbackTriggered](float progress) {
|
||||||
Q_UNUSED(progress);
|
|
||||||
callbackTriggered = true;
|
callbackTriggered = true;
|
||||||
qWarning() << "progress callback!" << progress;
|
qWarning() << "progress callback!" << progress;
|
||||||
};
|
};
|
||||||
|
|
|
@ -656,21 +656,15 @@ struct libinput *libinput_udev_create_context(const struct libinput_interface *i
|
||||||
if (!udev) {
|
if (!udev) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
Q_UNUSED(interface)
|
|
||||||
Q_UNUSED(user_data)
|
|
||||||
return new libinput;
|
return new libinput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void libinput_log_set_priority(struct libinput *libinput, enum libinput_log_priority priority)
|
void libinput_log_set_priority(struct libinput *libinput, enum libinput_log_priority priority)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
Q_UNUSED(priority)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void libinput_log_set_handler(struct libinput *libinput, libinput_log_handler log_handler)
|
void libinput_log_set_handler(struct libinput *libinput, libinput_log_handler log_handler)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
Q_UNUSED(log_handler)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct libinput *libinput_unref(struct libinput *libinput)
|
struct libinput *libinput_unref(struct libinput *libinput)
|
||||||
|
@ -693,30 +687,25 @@ int libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id)
|
||||||
|
|
||||||
int libinput_get_fd(struct libinput *libinput)
|
int libinput_get_fd(struct libinput *libinput)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libinput_dispatch(struct libinput *libinput)
|
int libinput_dispatch(struct libinput *libinput)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct libinput_event *libinput_get_event(struct libinput *libinput)
|
struct libinput_event *libinput_get_event(struct libinput *libinput)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void libinput_suspend(struct libinput *libinput)
|
void libinput_suspend(struct libinput *libinput)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int libinput_resume(struct libinput *libinput)
|
int libinput_resume(struct libinput *libinput)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,22 +925,18 @@ int libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device)
|
||||||
struct libinput_device_group *
|
struct libinput_device_group *
|
||||||
libinput_device_get_device_group(struct libinput_device *device)
|
libinput_device_get_device_group(struct libinput_device *device)
|
||||||
{
|
{
|
||||||
Q_UNUSED(device);
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
libinput_device_group_get_user_data(struct libinput_device_group *group)
|
libinput_device_group_get_user_data(struct libinput_device_group *group)
|
||||||
{
|
{
|
||||||
Q_UNUSED(group);
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void libinput_device_led_update(struct libinput_device *device,
|
void libinput_device_led_update(struct libinput_device *device,
|
||||||
enum libinput_led leds)
|
enum libinput_led leds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(device)
|
|
||||||
Q_UNUSED(leds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
|
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
|
||||||
|
@ -969,9 +954,6 @@ double
|
||||||
libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event,
|
libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event,
|
||||||
uint32_t width)
|
uint32_t width)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_UNUSED(width)
|
|
||||||
|
|
||||||
// it's unused at the moment, it doesn't really matter what we return
|
// it's unused at the moment, it doesn't really matter what we return
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -980,7 +962,5 @@ double
|
||||||
libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event,
|
libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event,
|
||||||
uint32_t height)
|
uint32_t height)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_UNUSED(height)
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,6 @@ static const GLubyte *mock_glGetStringi(GLenum name, GLuint index)
|
||||||
|
|
||||||
static void mock_glGetIntegerv(GLenum pname, GLint *data)
|
static void mock_glGetIntegerv(GLenum pname, GLint *data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pname)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
if (pname == GL_NUM_EXTENSIONS) {
|
if (pname == GL_NUM_EXTENSIONS) {
|
||||||
if (data && s_gl) {
|
if (data && s_gl) {
|
||||||
*data = s_gl->getString.extensions.count();
|
*data = s_gl->getString.extensions.count();
|
||||||
|
|
|
@ -24,12 +24,10 @@ namespace KWin
|
||||||
|
|
||||||
void InputRedirection::installInputEventSpy(InputEventSpy *spy)
|
void InputRedirection::installInputEventSpy(InputEventSpy *spy)
|
||||||
{
|
{
|
||||||
Q_UNUSED(spy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRedirection::uninstallInputEventSpy(InputEventSpy *spy)
|
void InputRedirection::uninstallInputEventSpy(InputEventSpy *spy)
|
||||||
{
|
{
|
||||||
Q_UNUSED(spy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InputRedirection *InputRedirection::s_self = nullptr;
|
InputRedirection *InputRedirection::s_self = nullptr;
|
||||||
|
|
|
@ -23,7 +23,6 @@ MockTabBoxHandler::~MockTabBoxHandler()
|
||||||
|
|
||||||
void MockTabBoxHandler::grabbedKeyEvent(QKeyEvent *event) const
|
void MockTabBoxHandler::grabbedKeyEvent(QKeyEvent *event) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::activeClient() const
|
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::activeClient() const
|
||||||
|
@ -38,7 +37,6 @@ void MockTabBoxHandler::setActiveClient(const QWeakPointer<TabBox::TabBoxClient>
|
||||||
|
|
||||||
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::clientToAddToList(TabBox::TabBoxClient *client, int desktop) const
|
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::clientToAddToList(TabBox::TabBoxClient *client, int desktop) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(desktop)
|
|
||||||
QList<QSharedPointer<TabBox::TabBoxClient>>::const_iterator it = m_windows.constBegin();
|
QList<QSharedPointer<TabBox::TabBoxClient>>::const_iterator it = m_windows.constBegin();
|
||||||
for (; it != m_windows.constEnd(); ++it) {
|
for (; it != m_windows.constEnd(); ++it) {
|
||||||
if ((*it).get() == client) {
|
if ((*it).get() == client) {
|
||||||
|
|
|
@ -38,24 +38,17 @@ public:
|
||||||
}
|
}
|
||||||
QString desktopName(int desktop) const override
|
QString desktopName(int desktop) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(desktop)
|
|
||||||
return "desktop 1";
|
return "desktop 1";
|
||||||
}
|
}
|
||||||
QString desktopName(TabBox::TabBoxClient *client) const override
|
QString desktopName(TabBox::TabBoxClient *client) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(client)
|
|
||||||
return "desktop";
|
return "desktop";
|
||||||
}
|
}
|
||||||
void elevateClient(TabBox::TabBoxClient *c, QWindow *tabbox, bool elevate) const override
|
void elevateClient(TabBox::TabBoxClient *c, QWindow *tabbox, bool elevate) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(c)
|
|
||||||
Q_UNUSED(tabbox)
|
|
||||||
Q_UNUSED(elevate)
|
|
||||||
}
|
}
|
||||||
void shadeClient(TabBox::TabBoxClient *c, bool b) const override
|
void shadeClient(TabBox::TabBoxClient *c, bool b) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(c)
|
|
||||||
Q_UNUSED(b)
|
|
||||||
}
|
}
|
||||||
virtual void hideOutline()
|
virtual void hideOutline()
|
||||||
{
|
{
|
||||||
|
@ -65,7 +58,6 @@ public:
|
||||||
bool isInFocusChain(TabBox::TabBoxClient *client) const override;
|
bool isInFocusChain(TabBox::TabBoxClient *client) const override;
|
||||||
int nextDesktopFocusChain(int desktop) const override
|
int nextDesktopFocusChain(int desktop) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(desktop)
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int numberOfDesktops() const override
|
int numberOfDesktops() const override
|
||||||
|
@ -78,16 +70,12 @@ public:
|
||||||
}
|
}
|
||||||
void raiseClient(TabBox::TabBoxClient *c) const override
|
void raiseClient(TabBox::TabBoxClient *c) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(c)
|
|
||||||
}
|
}
|
||||||
void restack(TabBox::TabBoxClient *c, TabBox::TabBoxClient *under) override
|
void restack(TabBox::TabBoxClient *c, TabBox::TabBoxClient *under) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(c)
|
|
||||||
Q_UNUSED(under)
|
|
||||||
}
|
}
|
||||||
virtual void showOutline(const QRect &outline)
|
virtual void showOutline(const QRect &outline)
|
||||||
{
|
{
|
||||||
Q_UNUSED(outline)
|
|
||||||
}
|
}
|
||||||
TabBox::TabBoxClientList stackingOrder() const override
|
TabBox::TabBoxClientList stackingOrder() const override
|
||||||
{
|
{
|
||||||
|
@ -97,8 +85,6 @@ public:
|
||||||
|
|
||||||
void highlightWindows(TabBox::TabBoxClient *window = nullptr, QWindow *controller = nullptr) override
|
void highlightWindows(TabBox::TabBoxClient *window = nullptr, QWindow *controller = nullptr) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(window)
|
|
||||||
Q_UNUSED(controller)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool noModifierGrab() const override
|
bool noModifierGrab() const override
|
||||||
|
|
|
@ -21,20 +21,14 @@ InputRedirection *InputRedirection::s_self = nullptr;
|
||||||
|
|
||||||
void InputRedirection::registerAxisShortcut(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis, QAction *action)
|
void InputRedirection::registerAxisShortcut(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis, QAction *action)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modifiers)
|
|
||||||
Q_UNUSED(axis)
|
|
||||||
Q_UNUSED(action)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRedirection::registerTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *)
|
void InputRedirection::registerTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRedirection::registerRealtimeTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *, std::function<void(qreal)> progressCallback)
|
void InputRedirection::registerRealtimeTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *, std::function<void(qreal)> progressCallback)
|
||||||
{
|
{
|
||||||
Q_UNUSED(progressCallback)
|
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRedirection::registerTouchscreenSwipeShortcut(SwipeDirection, uint, QAction *, std::function<void(qreal)>)
|
void InputRedirection::registerTouchscreenSwipeShortcut(SwipeDirection, uint, QAction *, std::function<void(qreal)>)
|
||||||
|
|
|
@ -34,7 +34,6 @@ void EglGbmCursorLayer::aboutToStartPainting(const QRegion &damagedRegion)
|
||||||
|
|
||||||
bool EglGbmCursorLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool EglGbmCursorLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
return m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
|
return m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ void EglGbmLayer::aboutToStartPainting(const QRegion &damagedRegion)
|
||||||
|
|
||||||
bool EglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool EglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
const bool ret = m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
|
const bool ret = m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
m_currentDamage = damagedRegion;
|
m_currentDamage = damagedRegion;
|
||||||
|
|
|
@ -518,9 +518,6 @@ static std::chrono::nanoseconds convertTimestamp(clockid_t sourceClock, clockid_
|
||||||
|
|
||||||
void DrmGpu::pageFlipHandler(int fd, unsigned int sequence, unsigned int sec, unsigned int usec, unsigned int crtc_id, void *user_data)
|
void DrmGpu::pageFlipHandler(int fd, unsigned int sequence, unsigned int sec, unsigned int usec, unsigned int crtc_id, void *user_data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fd)
|
|
||||||
Q_UNUSED(sequence)
|
|
||||||
|
|
||||||
DrmGpu *gpu = static_cast<DrmGpu *>(user_data);
|
DrmGpu *gpu = static_cast<DrmGpu *>(user_data);
|
||||||
|
|
||||||
// The static_cast<> here are for a 32-bit environment where
|
// The static_cast<> here are for a 32-bit environment where
|
||||||
|
|
|
@ -46,7 +46,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmQPainterLayer::beginFrame()
|
||||||
|
|
||||||
bool DrmQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool DrmQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
m_currentDamage = damagedRegion;
|
m_currentDamage = damagedRegion;
|
||||||
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
|
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
|
||||||
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
|
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
|
||||||
|
@ -114,7 +113,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmCursorQPainterLayer::beginFrame()
|
||||||
|
|
||||||
bool DrmCursorQPainterLayer::endFrame(const QRegion &damagedRegion, const QRegion &renderedRegion)
|
bool DrmCursorQPainterLayer::endFrame(const QRegion &damagedRegion, const QRegion &renderedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
|
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
|
||||||
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
|
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
|
||||||
if (!m_currentFramebuffer) {
|
if (!m_currentFramebuffer) {
|
||||||
|
@ -161,7 +159,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmVirtualQPainterLayer::beginFrame()
|
||||||
|
|
||||||
bool DrmVirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool DrmVirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
m_currentDamage = damagedRegion;
|
m_currentDamage = damagedRegion;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualEglGbmLayer::beginFrame()
|
||||||
|
|
||||||
bool VirtualEglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool VirtualEglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion);
|
|
||||||
GLFramebuffer::popFramebuffer();
|
GLFramebuffer::popFramebuffer();
|
||||||
const auto buffer = m_gbmSurface->swapBuffers(damagedRegion);
|
const auto buffer = m_gbmSurface->swapBuffers(damagedRegion);
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
|
|
|
@ -16,8 +16,6 @@ FakeInputDevice::FakeInputDevice(KWaylandServer::FakeInputDevice *device, QObjec
|
||||||
, m_name(QStringLiteral("Fake Input Device %1").arg(++s_lastDeviceId))
|
, m_name(QStringLiteral("Fake Input Device %1").arg(++s_lastDeviceId))
|
||||||
{
|
{
|
||||||
connect(device, &KWaylandServer::FakeInputDevice::authenticationRequested, this, [device](const QString &application, const QString &reason) {
|
connect(device, &KWaylandServer::FakeInputDevice::authenticationRequested, this, [device](const QString &application, const QString &reason) {
|
||||||
Q_UNUSED(application)
|
|
||||||
Q_UNUSED(reason)
|
|
||||||
// TODO: make secure
|
// TODO: make secure
|
||||||
device->setAuthentication(true);
|
device->setAuthentication(true);
|
||||||
});
|
});
|
||||||
|
@ -99,7 +97,6 @@ bool FakeInputDevice::isEnabled() const
|
||||||
|
|
||||||
void FakeInputDevice::setEnabled(bool enabled)
|
void FakeInputDevice::setEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
Q_UNUSED(enabled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LEDs FakeInputDevice::leds() const
|
LEDs FakeInputDevice::leds() const
|
||||||
|
@ -109,7 +106,6 @@ LEDs FakeInputDevice::leds() const
|
||||||
|
|
||||||
void FakeInputDevice::setLeds(LEDs leds)
|
void FakeInputDevice::setLeds(LEDs leds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FakeInputDevice::isKeyboard() const
|
bool FakeInputDevice::isKeyboard() const
|
||||||
|
|
|
@ -631,8 +631,6 @@ void Connection::applyScreenToDevice(Device *device)
|
||||||
|
|
||||||
// TODO: this is currently non-functional even on DRM. Needs orientation() override there.
|
// TODO: this is currently non-functional even on DRM. Needs orientation() override there.
|
||||||
device->setOrientation(Qt::PrimaryOrientation);
|
device->setOrientation(Qt::PrimaryOrientation);
|
||||||
#else
|
|
||||||
Q_UNUSED(device)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ namespace LibInput
|
||||||
|
|
||||||
static void libinputLogHandler(libinput *libinput, libinput_log_priority priority, const char *format, va_list args)
|
static void libinputLogHandler(libinput *libinput, libinput_log_priority priority, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
Q_UNUSED(libinput)
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
if (std::vsnprintf(buf, 1023, format, args) <= 0) {
|
if (std::vsnprintf(buf, 1023, format, args) <= 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -647,8 +647,6 @@ void Device::setOutputName(const QString &name)
|
||||||
m_outputName = name;
|
m_outputName = name;
|
||||||
writeEntry(ConfigKey::OutputName, name);
|
writeEntry(ConfigKey::OutputName, name);
|
||||||
Q_EMIT outputNameChanged();
|
Q_EMIT outputNameChanged();
|
||||||
#else
|
|
||||||
Q_UNUSED(name)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualEglLayer::beginFrame()
|
||||||
|
|
||||||
bool VirtualEglLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool VirtualEglLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
Q_UNUSED(damagedRegion)
|
|
||||||
GLFramebuffer::popFramebuffer();
|
GLFramebuffer::popFramebuffer();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualQPainterLayer::beginFrame()
|
||||||
|
|
||||||
bool VirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool VirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
Q_UNUSED(damagedRegion)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,6 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
|
||||||
, m_pointer(pointer)
|
, m_pointer(pointer)
|
||||||
{
|
{
|
||||||
connect(pointer, &Pointer::entered, this, [this](quint32 serial, const QPointF &relativeToSurface) {
|
connect(pointer, &Pointer::entered, this, [this](quint32 serial, const QPointF &relativeToSurface) {
|
||||||
Q_UNUSED(relativeToSurface)
|
|
||||||
m_enteredSerial = serial;
|
m_enteredSerial = serial;
|
||||||
});
|
});
|
||||||
connect(pointer, &Pointer::motion, this, [this](const QPointF &relativeToSurface, quint32 time) {
|
connect(pointer, &Pointer::motion, this, [this](const QPointF &relativeToSurface, quint32 time) {
|
||||||
|
@ -236,7 +235,6 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
|
||||||
Q_EMIT pointerMotionAbsolute(absolutePos, time, this);
|
Q_EMIT pointerMotionAbsolute(absolutePos, time, this);
|
||||||
});
|
});
|
||||||
connect(pointer, &Pointer::buttonStateChanged, this, [this](quint32 serial, quint32 time, quint32 button, Pointer::ButtonState nativeState) {
|
connect(pointer, &Pointer::buttonStateChanged, this, [this](quint32 serial, quint32 time, quint32 button, Pointer::ButtonState nativeState) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
InputRedirection::PointerButtonState state;
|
InputRedirection::PointerButtonState state;
|
||||||
switch (nativeState) {
|
switch (nativeState) {
|
||||||
case Pointer::ButtonState::Pressed:
|
case Pointer::ButtonState::Pressed:
|
||||||
|
@ -270,35 +268,29 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
|
||||||
if (pointerGestures) {
|
if (pointerGestures) {
|
||||||
m_pinchGesture.reset(pointerGestures->createPinchGesture(m_pointer.get(), this));
|
m_pinchGesture.reset(pointerGestures->createPinchGesture(m_pointer.get(), this));
|
||||||
connect(m_pinchGesture.get(), &PointerPinchGesture::started, this, [this](quint32 serial, quint32 time) {
|
connect(m_pinchGesture.get(), &PointerPinchGesture::started, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial);
|
|
||||||
Q_EMIT pinchGestureBegin(m_pinchGesture->fingerCount(), time, this);
|
Q_EMIT pinchGestureBegin(m_pinchGesture->fingerCount(), time, this);
|
||||||
});
|
});
|
||||||
connect(m_pinchGesture.get(), &PointerPinchGesture::updated, this, [this](const QSizeF &delta, qreal scale, qreal rotation, quint32 time) {
|
connect(m_pinchGesture.get(), &PointerPinchGesture::updated, this, [this](const QSizeF &delta, qreal scale, qreal rotation, quint32 time) {
|
||||||
Q_EMIT pinchGestureUpdate(scale, rotation, QSIZE_TO_QPOINT(delta), time, this);
|
Q_EMIT pinchGestureUpdate(scale, rotation, QSIZE_TO_QPOINT(delta), time, this);
|
||||||
});
|
});
|
||||||
connect(m_pinchGesture.get(), &PointerPinchGesture::ended, this, [this](quint32 serial, quint32 time) {
|
connect(m_pinchGesture.get(), &PointerPinchGesture::ended, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_EMIT pinchGestureEnd(time, this);
|
Q_EMIT pinchGestureEnd(time, this);
|
||||||
});
|
});
|
||||||
connect(m_pinchGesture.get(), &PointerPinchGesture::cancelled, this, [this](quint32 serial, quint32 time) {
|
connect(m_pinchGesture.get(), &PointerPinchGesture::cancelled, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_EMIT pinchGestureCancelled(time, this);
|
Q_EMIT pinchGestureCancelled(time, this);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_swipeGesture.reset(pointerGestures->createSwipeGesture(m_pointer.get(), this));
|
m_swipeGesture.reset(pointerGestures->createSwipeGesture(m_pointer.get(), this));
|
||||||
connect(m_swipeGesture.get(), &PointerSwipeGesture::started, this, [this](quint32 serial, quint32 time) {
|
connect(m_swipeGesture.get(), &PointerSwipeGesture::started, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_EMIT swipeGestureBegin(m_swipeGesture->fingerCount(), time, this);
|
Q_EMIT swipeGestureBegin(m_swipeGesture->fingerCount(), time, this);
|
||||||
});
|
});
|
||||||
connect(m_swipeGesture.get(), &PointerSwipeGesture::updated, this, [this](const QSizeF &delta, quint32 time) {
|
connect(m_swipeGesture.get(), &PointerSwipeGesture::updated, this, [this](const QSizeF &delta, quint32 time) {
|
||||||
Q_EMIT swipeGestureUpdate(QSIZE_TO_QPOINT(delta), time, this);
|
Q_EMIT swipeGestureUpdate(QSIZE_TO_QPOINT(delta), time, this);
|
||||||
});
|
});
|
||||||
connect(m_swipeGesture.get(), &PointerSwipeGesture::ended, this, [this](quint32 serial, quint32 time) {
|
connect(m_swipeGesture.get(), &PointerSwipeGesture::ended, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_EMIT swipeGestureEnd(time, this);
|
Q_EMIT swipeGestureEnd(time, this);
|
||||||
});
|
});
|
||||||
connect(m_swipeGesture.get(), &PointerSwipeGesture::cancelled, this, [this](quint32 serial, quint32 time) {
|
connect(m_swipeGesture.get(), &PointerSwipeGesture::cancelled, this, [this](quint32 serial, quint32 time) {
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_EMIT swipeGestureCancelled(time, this);
|
Q_EMIT swipeGestureCancelled(time, this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -358,7 +350,6 @@ bool WaylandInputDevice::isEnabled() const
|
||||||
|
|
||||||
void WaylandInputDevice::setEnabled(bool enabled)
|
void WaylandInputDevice::setEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
Q_UNUSED(enabled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LEDs WaylandInputDevice::leds() const
|
LEDs WaylandInputDevice::leds() const
|
||||||
|
@ -368,7 +359,6 @@ LEDs WaylandInputDevice::leds() const
|
||||||
|
|
||||||
void WaylandInputDevice::setLeds(LEDs leds)
|
void WaylandInputDevice::setLeds(LEDs leds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WaylandInputDevice::isKeyboard() const
|
bool WaylandInputDevice::isKeyboard() const
|
||||||
|
@ -676,7 +666,6 @@ bool WaylandBackend::initialize()
|
||||||
m_waylandCursor->installImage();
|
m_waylandCursor->installImage();
|
||||||
});
|
});
|
||||||
connect(Cursors::self(), &Cursors::positionChanged, this, [this](Cursor *cursor, const QPoint &position) {
|
connect(Cursors::self(), &Cursors::positionChanged, this, [this](Cursor *cursor, const QPoint &position) {
|
||||||
Q_UNUSED(cursor)
|
|
||||||
if (m_waylandCursor) {
|
if (m_waylandCursor) {
|
||||||
m_waylandCursor->move(position);
|
m_waylandCursor->move(position);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,6 @@ public:
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void move(const QPointF &globalPosition)
|
virtual void move(const QPointF &globalPosition)
|
||||||
{
|
{
|
||||||
Q_UNUSED(globalPosition)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void installImage();
|
void installImage();
|
||||||
|
|
|
@ -161,7 +161,6 @@ std::optional<OutputLayerBeginFrameInfo> WaylandEglOutput::beginFrame()
|
||||||
|
|
||||||
bool WaylandEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool WaylandEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
m_damageJournal.add(damagedRegion);
|
m_damageJournal.add(damagedRegion);
|
||||||
GLFramebuffer::popFramebuffer();
|
GLFramebuffer::popFramebuffer();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -151,7 +151,6 @@ XdgShellOutput::~XdgShellOutput()
|
||||||
|
|
||||||
void XdgShellOutput::handleConfigure(const QSize &size, XdgShellSurface::States states, quint32 serial)
|
void XdgShellOutput::handleConfigure(const QSize &size, XdgShellSurface::States states, quint32 serial)
|
||||||
{
|
{
|
||||||
Q_UNUSED(states);
|
|
||||||
m_xdgShellSurface->ackConfigure(serial);
|
m_xdgShellSurface->ackConfigure(serial);
|
||||||
if (size.width() > 0 && size.height() > 0) {
|
if (size.width() > 0 && size.height() > 0) {
|
||||||
resize(size * scale());
|
resize(size * scale());
|
||||||
|
|
|
@ -48,8 +48,6 @@ public:
|
||||||
|
|
||||||
virtual void lockPointer(KWayland::Client::Pointer *pointer, bool lock)
|
virtual void lockPointer(KWayland::Client::Pointer *pointer, bool lock)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pointer)
|
|
||||||
Q_UNUSED(lock)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool pointerIsLocked()
|
virtual bool pointerIsLocked()
|
||||||
|
|
|
@ -69,7 +69,6 @@ void WaylandQPainterOutput::remapBuffer()
|
||||||
|
|
||||||
void WaylandQPainterOutput::updateSize(const QSize &size)
|
void WaylandQPainterOutput::updateSize(const QSize &size)
|
||||||
{
|
{
|
||||||
Q_UNUSED(size)
|
|
||||||
m_back = nullptr;
|
m_back = nullptr;
|
||||||
m_slots.clear();
|
m_slots.clear();
|
||||||
}
|
}
|
||||||
|
@ -136,8 +135,6 @@ std::optional<OutputLayerBeginFrameInfo> WaylandQPainterOutput::beginFrame()
|
||||||
|
|
||||||
bool WaylandQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool WaylandQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
|
|
||||||
m_damageJournal.add(damagedRegion);
|
m_damageJournal.add(damagedRegion);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,6 @@ void EglBackend::endFrame(const QRegion &renderedRegion, const QRegion &damagedR
|
||||||
|
|
||||||
void EglBackend::present(Output *output)
|
void EglBackend::present(Output *output)
|
||||||
{
|
{
|
||||||
Q_UNUSED(output)
|
|
||||||
// Start the software vsync monitor. There is no any reliable way to determine when
|
// Start the software vsync monitor. There is no any reliable way to determine when
|
||||||
// eglSwapBuffers() or eglSwapBuffersWithDamageEXT() completes.
|
// eglSwapBuffers() or eglSwapBuffersWithDamageEXT() completes.
|
||||||
m_vsyncMonitor->arm();
|
m_vsyncMonitor->arm();
|
||||||
|
@ -198,7 +197,6 @@ void EglBackend::presentSurface(EGLSurface surface, const QRegion &damage, const
|
||||||
|
|
||||||
OutputLayer *EglBackend::primaryLayer(Output *output)
|
OutputLayer *EglBackend::primaryLayer(Output *output)
|
||||||
{
|
{
|
||||||
Q_UNUSED(output)
|
|
||||||
return m_layer.get();
|
return m_layer.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +224,6 @@ bool EglSurfaceTextureX11::create()
|
||||||
|
|
||||||
void EglSurfaceTextureX11::update(const QRegion ®ion)
|
void EglSurfaceTextureX11::update(const QRegion ®ion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(region)
|
|
||||||
// mipmaps need to be updated
|
// mipmaps need to be updated
|
||||||
m_texture->setDirty();
|
m_texture->setDirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,8 +806,6 @@ void GlxBackend::endFrame(const QRegion &renderedRegion, const QRegion &damagedR
|
||||||
|
|
||||||
void GlxBackend::present(Output *output)
|
void GlxBackend::present(Output *output)
|
||||||
{
|
{
|
||||||
Q_UNUSED(output)
|
|
||||||
|
|
||||||
// If the GLX_INTEL_swap_event extension is not used for getting presentation feedback,
|
// If the GLX_INTEL_swap_event extension is not used for getting presentation feedback,
|
||||||
// assume that the frame will be presented at the next vblank event, this is racy.
|
// assume that the frame will be presented at the next vblank event, this is racy.
|
||||||
if (m_vsyncMonitor) {
|
if (m_vsyncMonitor) {
|
||||||
|
@ -861,7 +859,6 @@ OverlayWindow *GlxBackend::overlayWindow() const
|
||||||
|
|
||||||
OutputLayer *GlxBackend::primaryLayer(Output *output)
|
OutputLayer *GlxBackend::primaryLayer(Output *output)
|
||||||
{
|
{
|
||||||
Q_UNUSED(output)
|
|
||||||
return m_layer.get();
|
return m_layer.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,7 +880,6 @@ bool GlxSurfaceTextureX11::create()
|
||||||
|
|
||||||
void GlxSurfaceTextureX11::update(const QRegion ®ion)
|
void GlxSurfaceTextureX11::update(const QRegion ®ion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(region)
|
|
||||||
// mipmaps need to be updated
|
// mipmaps need to be updated
|
||||||
m_texture->setDirty();
|
m_texture->setDirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ XFixesCursorEventFilter::XFixesCursorEventFilter(X11Cursor *cursor)
|
||||||
|
|
||||||
bool XFixesCursorEventFilter::event(xcb_generic_event_t *event)
|
bool XFixesCursorEventFilter::event(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
|
||||||
m_cursor->notifyCursorChanged();
|
m_cursor->notifyCursorChanged();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,6 @@ bool X11WindowedInputDevice::isEnabled() const
|
||||||
|
|
||||||
void X11WindowedInputDevice::setEnabled(bool enabled)
|
void X11WindowedInputDevice::setEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
Q_UNUSED(enabled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LEDs X11WindowedInputDevice::leds() const
|
LEDs X11WindowedInputDevice::leds() const
|
||||||
|
@ -89,7 +88,6 @@ LEDs X11WindowedInputDevice::leds() const
|
||||||
|
|
||||||
void X11WindowedInputDevice::setLeds(LEDs leds)
|
void X11WindowedInputDevice::setLeds(LEDs leds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X11WindowedInputDevice::isKeyboard() const
|
bool X11WindowedInputDevice::isKeyboard() const
|
||||||
|
|
|
@ -55,7 +55,6 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedEglOutput::beginFrame()
|
||||||
|
|
||||||
bool X11WindowedEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool X11WindowedEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
m_lastDamage = damagedRegion;
|
m_lastDamage = damagedRegion;
|
||||||
GLFramebuffer::popFramebuffer();
|
GLFramebuffer::popFramebuffer();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -45,8 +45,6 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedQPainterOutput::beginFrame()
|
||||||
|
|
||||||
bool X11WindowedQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
bool X11WindowedQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
|
||||||
{
|
{
|
||||||
Q_UNUSED(renderedRegion)
|
|
||||||
Q_UNUSED(damagedRegion)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,6 @@ QSize Output::orientateSize(const QSize &size) const
|
||||||
|
|
||||||
void Output::setDpmsMode(DpmsMode mode)
|
void Output::setDpmsMode(DpmsMode mode)
|
||||||
{
|
{
|
||||||
Q_UNUSED(mode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Output::DpmsMode Output::dpmsMode() const
|
Output::DpmsMode Output::dpmsMode() const
|
||||||
|
@ -395,7 +394,6 @@ Output::RgbRange Output::rgbRange() const
|
||||||
|
|
||||||
void Output::setColorTransformation(const std::shared_ptr<ColorTransformation> &transformation)
|
void Output::setColorTransformation(const std::shared_ptr<ColorTransformation> &transformation)
|
||||||
{
|
{
|
||||||
Q_UNUSED(transformation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentType Output::contentType() const
|
ContentType Output::contentType() const
|
||||||
|
|
|
@ -31,12 +31,10 @@ void OutputLayer::resetRepaints()
|
||||||
|
|
||||||
void OutputLayer::aboutToStartPainting(const QRegion &damage)
|
void OutputLayer::aboutToStartPainting(const QRegion &damage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(damage)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OutputLayer::scanout(SurfaceItem *surfaceItem)
|
bool OutputLayer::scanout(SurfaceItem *surfaceItem)
|
||||||
{
|
{
|
||||||
Q_UNUSED(surfaceItem)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,17 +60,11 @@ std::unique_ptr<QPainterBackend> Platform::createQPainterBackend()
|
||||||
|
|
||||||
std::optional<DmaBufParams> Platform::testCreateDmaBuf(const QSize &size, quint32 format, const QVector<uint64_t> &modifiers)
|
std::optional<DmaBufParams> Platform::testCreateDmaBuf(const QSize &size, quint32 format, const QVector<uint64_t> &modifiers)
|
||||||
{
|
{
|
||||||
Q_UNUSED(size)
|
|
||||||
Q_UNUSED(format)
|
|
||||||
Q_UNUSED(modifiers)
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DmaBufTexture> Platform::createDmaBufTexture(const QSize &size, quint32 format, uint64_t modifier)
|
std::shared_ptr<DmaBufTexture> Platform::createDmaBufTexture(const QSize &size, quint32 format, uint64_t modifier)
|
||||||
{
|
{
|
||||||
Q_UNUSED(size)
|
|
||||||
Q_UNUSED(format)
|
|
||||||
Q_UNUSED(modifier)
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,9 +126,6 @@ void Platform::setReady(bool ready)
|
||||||
|
|
||||||
Output *Platform::createVirtualOutput(const QString &name, const QSize &size, double scale)
|
Output *Platform::createVirtualOutput(const QString &name, const QSize &size, double scale)
|
||||||
{
|
{
|
||||||
Q_UNUSED(name);
|
|
||||||
Q_UNUSED(size);
|
|
||||||
Q_UNUSED(scale);
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +136,6 @@ void Platform::removeVirtualOutput(Output *output)
|
||||||
|
|
||||||
void Platform::warpPointer(const QPointF &globalPos)
|
void Platform::warpPointer(const QPointF &globalPos)
|
||||||
{
|
{
|
||||||
Q_UNUSED(globalPos)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Platform::supportsNativeFence() const
|
bool Platform::supportsNativeFence() const
|
||||||
|
@ -188,7 +178,6 @@ bool Platform::openGLCompositingIsBroken() const
|
||||||
|
|
||||||
void Platform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
void Platform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(safePoint)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Platform::startInteractiveWindowSelection(std::function<void(KWin::Window *)> callback, const QByteArray &cursorName)
|
void Platform::startInteractiveWindowSelection(std::function<void(KWin::Window *)> callback, const QByteArray &cursorName)
|
||||||
|
|
|
@ -327,7 +327,6 @@ void ConsoleKitSession::handleResumeDevice(uint major, uint minor, QDBusUnixFile
|
||||||
{
|
{
|
||||||
// We don't care about the file descriptor as the libinput backend will re-open input devices
|
// We don't care about the file descriptor as the libinput backend will re-open input devices
|
||||||
// and the drm file descriptors remain valid after pausing gpus.
|
// and the drm file descriptors remain valid after pausing gpus.
|
||||||
Q_UNUSED(fileDescriptor)
|
|
||||||
|
|
||||||
Q_EMIT deviceResumed(makedev(major, minor));
|
Q_EMIT deviceResumed(makedev(major, minor));
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,7 +326,6 @@ void LogindSession::handleResumeDevice(uint major, uint minor, QDBusUnixFileDesc
|
||||||
{
|
{
|
||||||
// We don't care about the file descriptor as the libinput backend will re-open input devices
|
// We don't care about the file descriptor as the libinput backend will re-open input devices
|
||||||
// and the drm file descriptors remain valid after pausing gpus.
|
// and the drm file descriptors remain valid after pausing gpus.
|
||||||
Q_UNUSED(fileDescriptor)
|
|
||||||
|
|
||||||
Q_EMIT deviceResumed(makedev(major, minor));
|
Q_EMIT deviceResumed(makedev(major, minor));
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,18 +40,15 @@ uint NoopSession::terminal() const
|
||||||
|
|
||||||
int NoopSession::openRestricted(const QString &fileName)
|
int NoopSession::openRestricted(const QString &fileName)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fileName)
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoopSession::closeRestricted(int fileDescriptor)
|
void NoopSession::closeRestricted(int fileDescriptor)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fileDescriptor)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoopSession::switchTo(uint terminal)
|
void NoopSession::switchTo(uint terminal)
|
||||||
{
|
{
|
||||||
Q_UNUSED(terminal)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -160,7 +160,6 @@ void Cursor::updateTheme(const QString &name, int size)
|
||||||
void Cursor::slotKGlobalSettingsNotifyChange(int type, int arg)
|
void Cursor::slotKGlobalSettingsNotifyChange(int type, int arg)
|
||||||
{
|
{
|
||||||
// #endif
|
// #endif
|
||||||
Q_UNUSED(arg)
|
|
||||||
if (type == 5 /*CursorChanged*/) {
|
if (type == 5 /*CursorChanged*/) {
|
||||||
InputConfig::self()->inputConfig()->reparseConfiguration();
|
InputConfig::self()->inputConfig()->reparseConfiguration();
|
||||||
loadThemeFromKConfig();
|
loadThemeFromKConfig();
|
||||||
|
|
|
@ -114,7 +114,6 @@ bool DBusInterface::startActivity(const QString &in0)
|
||||||
}
|
}
|
||||||
return Workspace::self()->activities()->start(in0);
|
return Workspace::self()->activities()->start(in0);
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(in0)
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -127,7 +126,6 @@ bool DBusInterface::stopActivity(const QString &in0)
|
||||||
}
|
}
|
||||||
return Workspace::self()->activities()->stop(in0);
|
return Workspace::self()->activities()->stop(in0);
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(in0)
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -381,13 +379,10 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
|
||||||
this);
|
this);
|
||||||
|
|
||||||
connect(m_manager, &VirtualDesktopManager::currentChanged, this, [this](uint previousDesktop, uint newDesktop) {
|
connect(m_manager, &VirtualDesktopManager::currentChanged, this, [this](uint previousDesktop, uint newDesktop) {
|
||||||
Q_UNUSED(previousDesktop);
|
|
||||||
Q_UNUSED(newDesktop);
|
|
||||||
Q_EMIT currentChanged(m_manager->currentDesktop()->id());
|
Q_EMIT currentChanged(m_manager->currentDesktop()->id());
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_manager, &VirtualDesktopManager::countChanged, this, [this](uint previousCount, uint newCount) {
|
connect(m_manager, &VirtualDesktopManager::countChanged, this, [this](uint previousCount, uint newCount) {
|
||||||
Q_UNUSED(previousCount);
|
|
||||||
Q_EMIT countChanged(newCount);
|
Q_EMIT countChanged(newCount);
|
||||||
Q_EMIT desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
});
|
});
|
||||||
|
|
|
@ -977,7 +977,6 @@ DebugConsoleModel::~DebugConsoleModel() = default;
|
||||||
|
|
||||||
int DebugConsoleModel::columnCount(const QModelIndex &parent) const
|
int DebugConsoleModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1130,7 +1129,6 @@ QModelIndex DebugConsoleModel::parent(const QModelIndex &child) const
|
||||||
|
|
||||||
QVariant DebugConsoleModel::propertyData(QObject *object, const QModelIndex &index, int role) const
|
QVariant DebugConsoleModel::propertyData(QObject *object, const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(role)
|
|
||||||
const auto property = object->metaObject()->property(index.row());
|
const auto property = object->metaObject()->property(index.row());
|
||||||
if (index.column() == 0) {
|
if (index.column() == 0) {
|
||||||
return property.name();
|
return property.name();
|
||||||
|
@ -1341,7 +1339,6 @@ SurfaceTreeModel::~SurfaceTreeModel() = default;
|
||||||
|
|
||||||
int SurfaceTreeModel::columnCount(const QModelIndex &parent) const
|
int SurfaceTreeModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1502,7 +1499,6 @@ InputDeviceModel::~InputDeviceModel() = default;
|
||||||
|
|
||||||
int InputDeviceModel::columnCount(const QModelIndex &parent) const
|
int InputDeviceModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1609,7 +1605,6 @@ QModelIndex DataSourceModel::index(int row, int column, const QModelIndex &paren
|
||||||
|
|
||||||
QModelIndex DataSourceModel::parent(const QModelIndex &child) const
|
QModelIndex DataSourceModel::parent(const QModelIndex &child) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(child)
|
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,6 @@ void DecorationItem::handleFrameGeometryChanged()
|
||||||
|
|
||||||
void DecorationItem::handleWindowClosed(Window *original, Deleted *deleted)
|
void DecorationItem::handleWindowClosed(Window *original, Deleted *deleted)
|
||||||
{
|
{
|
||||||
Q_UNUSED(original)
|
|
||||||
m_window = deleted;
|
m_window = deleted;
|
||||||
|
|
||||||
// If the decoration is about to be destroyed, render the decoration for the last time.
|
// If the decoration is about to be destroyed, render the decoration for the last time.
|
||||||
|
|
|
@ -170,8 +170,6 @@ bool Deleted::isDeleted() const
|
||||||
|
|
||||||
NET::WindowType Deleted::windowType(bool direct, int supportedTypes) const
|
NET::WindowType Deleted::windowType(bool direct, int supportedTypes) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(direct)
|
|
||||||
Q_UNUSED(supportedTypes)
|
|
||||||
return m_type;
|
return m_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,12 @@ DpmsInputEventFilter::~DpmsInputEventFilter() = default;
|
||||||
|
|
||||||
bool DpmsInputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
|
bool DpmsInputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
notify();
|
notify();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DpmsInputEventFilter::wheelEvent(QWheelEvent *event)
|
bool DpmsInputEventFilter::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
notify();
|
notify();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -53,8 +50,6 @@ bool DpmsInputEventFilter::keyEvent(QKeyEvent *event)
|
||||||
|
|
||||||
bool DpmsInputEventFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
bool DpmsInputEventFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_enableDoubleTap) {
|
if (m_enableDoubleTap) {
|
||||||
if (m_touchPoints.isEmpty()) {
|
if (m_touchPoints.isEmpty()) {
|
||||||
if (!m_doubleTapTimer.isValid()) {
|
if (!m_doubleTapTimer.isValid()) {
|
||||||
|
@ -96,9 +91,6 @@ bool DpmsInputEventFilter::touchUp(qint32 id, quint32 time)
|
||||||
|
|
||||||
bool DpmsInputEventFilter::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
bool DpmsInputEventFilter::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// ignore the event
|
// ignore the event
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,11 +341,9 @@ void EffectsHandlerImpl::setupWindowConnections(Window *window)
|
||||||
Q_EMIT windowHidden(window->effectWindow());
|
Q_EMIT windowHidden(window->effectWindow());
|
||||||
});
|
});
|
||||||
connect(window, &Window::keepAboveChanged, this, [this, window](bool above) {
|
connect(window, &Window::keepAboveChanged, this, [this, window](bool above) {
|
||||||
Q_UNUSED(above)
|
|
||||||
Q_EMIT windowKeepAboveChanged(window->effectWindow());
|
Q_EMIT windowKeepAboveChanged(window->effectWindow());
|
||||||
});
|
});
|
||||||
connect(window, &Window::keepBelowChanged, this, [this, window](bool below) {
|
connect(window, &Window::keepBelowChanged, this, [this, window](bool below) {
|
||||||
Q_UNUSED(below)
|
|
||||||
Q_EMIT windowKeepBelowChanged(window->effectWindow());
|
Q_EMIT windowKeepBelowChanged(window->effectWindow());
|
||||||
});
|
});
|
||||||
connect(window, &Window::fullScreenChanged, this, [this, window]() {
|
connect(window, &Window::fullScreenChanged, this, [this, window]() {
|
||||||
|
@ -755,7 +753,6 @@ bool EffectsHandlerImpl::tabletToolEvent(TabletEvent *event)
|
||||||
|
|
||||||
bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
|
bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// TODO: reverse call order?
|
// TODO: reverse call order?
|
||||||
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
||||||
if (it->second->tabletToolButtonEvent(button, pressed, tabletToolId.m_uniqueId)) {
|
if (it->second->tabletToolButtonEvent(button, pressed, tabletToolId.m_uniqueId)) {
|
||||||
|
@ -767,7 +764,6 @@ bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const
|
||||||
|
|
||||||
bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// TODO: reverse call order?
|
// TODO: reverse call order?
|
||||||
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
||||||
if (it->second->tabletPadButtonEvent(button, pressed, tabletPadId.data)) {
|
if (it->second->tabletPadButtonEvent(button, pressed, tabletPadId.data)) {
|
||||||
|
@ -779,7 +775,6 @@ bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const T
|
||||||
|
|
||||||
bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// TODO: reverse call order?
|
// TODO: reverse call order?
|
||||||
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
||||||
if (it->second->tabletPadStripEvent(number, position, isFinger, tabletPadId.data)) {
|
if (it->second->tabletPadStripEvent(number, position, isFinger, tabletPadId.data)) {
|
||||||
|
@ -791,7 +786,6 @@ bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFi
|
||||||
|
|
||||||
bool EffectsHandlerImpl::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
bool EffectsHandlerImpl::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// TODO: reverse call order?
|
// TODO: reverse call order?
|
||||||
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
||||||
if (it->second->tabletPadRingEvent(number, position, isFinger, tabletPadId.data)) {
|
if (it->second->tabletPadRingEvent(number, position, isFinger, tabletPadId.data)) {
|
||||||
|
@ -1180,8 +1174,6 @@ void EffectsHandlerImpl::setTabBoxWindow(EffectWindow *w)
|
||||||
if (window->isClient()) {
|
if (window->isClient()) {
|
||||||
workspace()->tabbox()->setCurrentClient(window);
|
workspace()->tabbox()->setCurrentClient(window);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
Q_UNUSED(w)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1189,8 +1181,6 @@ void EffectsHandlerImpl::setTabBoxDesktop(int desktop)
|
||||||
{
|
{
|
||||||
#if KWIN_BUILD_TABBOX
|
#if KWIN_BUILD_TABBOX
|
||||||
workspace()->tabbox()->setCurrentDesktop(desktop);
|
workspace()->tabbox()->setCurrentDesktop(desktop);
|
||||||
#else
|
|
||||||
Q_UNUSED(desktop)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2588,7 +2578,6 @@ const QRect &EffectFrameImpl::geometry() const
|
||||||
|
|
||||||
void EffectFrameImpl::setGeometry(const QRect &geometry, bool force)
|
void EffectFrameImpl::setGeometry(const QRect &geometry, bool force)
|
||||||
{
|
{
|
||||||
Q_UNUSED(force)
|
|
||||||
m_view->setGeometry(geometry);
|
m_view->setGeometry(geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2623,8 +2612,6 @@ void EffectFrameImpl::setPosition(const QPoint &point)
|
||||||
|
|
||||||
void EffectFrameImpl::render(const QRegion ®ion, double opacity, double frameOpacity)
|
void EffectFrameImpl::render(const QRegion ®ion, double opacity, double frameOpacity)
|
||||||
{
|
{
|
||||||
Q_UNUSED(region);
|
|
||||||
|
|
||||||
if (!m_view->rootItem()) {
|
if (!m_view->rootItem()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,9 +79,6 @@ void BlendChanges::postPaintScreen()
|
||||||
|
|
||||||
void BlendChanges::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
void BlendChanges::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(w)
|
|
||||||
Q_UNUSED(mask)
|
|
||||||
Q_UNUSED(region)
|
|
||||||
data.setCrossFadeProgress(m_timeline.value());
|
data.setCrossFadeProgress(m_timeline.value());
|
||||||
effects->paintWindow(w, mask, region, data);
|
effects->paintWindow(w, mask, region, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,8 +264,6 @@ void BlurEffect::initBlurStrengthValues()
|
||||||
|
|
||||||
void BlurEffect::reconfigure(ReconfigureFlags flags)
|
void BlurEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
BlurConfig::self()->read();
|
BlurConfig::self()->read();
|
||||||
|
|
||||||
int blurStrength = BlurConfig::blurStrength() - 1;
|
int blurStrength = BlurConfig::blurStrength() - 1;
|
||||||
|
@ -794,8 +792,6 @@ void BlurEffect::doBlur(const QRegion &shape, const QRect &screen, const float o
|
||||||
|
|
||||||
void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int blurRectCount, const QMatrix4x4 &screenProjection, QPoint windowPosition)
|
void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int blurRectCount, const QMatrix4x4 &screenProjection, QPoint windowPosition)
|
||||||
{
|
{
|
||||||
Q_UNUSED(windowPosition)
|
|
||||||
|
|
||||||
m_renderTextures[1]->bind();
|
m_renderTextures[1]->bind();
|
||||||
|
|
||||||
m_shader->bind(BlurShader::UpSampleType);
|
m_shader->bind(BlurShader::UpSampleType);
|
||||||
|
|
|
@ -120,8 +120,6 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags)
|
||||||
for (const int &border : touchActivateBorders) {
|
for (const int &border : touchActivateBorders) {
|
||||||
m_touchBorderActivate.append(ElectricBorder(border));
|
m_touchBorderActivate.append(ElectricBorder(border));
|
||||||
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
||||||
Q_UNUSED(screen)
|
|
||||||
|
|
||||||
if (m_status == Status::Active) {
|
if (m_status == Status::Active) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,6 @@ DimInactiveEffect::~DimInactiveEffect()
|
||||||
|
|
||||||
void DimInactiveEffect::reconfigure(ReconfigureFlags flags)
|
void DimInactiveEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
DimInactiveConfig::self()->read();
|
DimInactiveConfig::self()->read();
|
||||||
|
|
||||||
// TODO: Use normalized strength param.
|
// TODO: Use normalized strength param.
|
||||||
|
|
|
@ -64,8 +64,6 @@ void FallApartEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data,
|
||||||
|
|
||||||
void FallApartEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
|
void FallApartEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
|
||||||
{
|
{
|
||||||
Q_UNUSED(w)
|
|
||||||
Q_UNUSED(mask)
|
|
||||||
auto animationIt = windows.constFind(w);
|
auto animationIt = windows.constFind(w);
|
||||||
if (animationIt != windows.constEnd() && isRealWindow(w)) {
|
if (animationIt != windows.constEnd() && isRealWindow(w)) {
|
||||||
const qreal t = animationIt->progress;
|
const qreal t = animationIt->progress;
|
||||||
|
|
|
@ -75,8 +75,6 @@ GlideEffect::~GlideEffect() = default;
|
||||||
|
|
||||||
void GlideEffect::reconfigure(ReconfigureFlags flags)
|
void GlideEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
GlideConfig::self()->read();
|
GlideConfig::self()->read();
|
||||||
m_duration = std::chrono::milliseconds(animationTime<GlideConfig>(160));
|
m_duration = std::chrono::milliseconds(animationTime<GlideConfig>(160));
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,6 @@ void KscreenEffect::addScreen(EffectScreen *screen)
|
||||||
|
|
||||||
void KscreenEffect::reconfigure(ReconfigureFlags flags)
|
void KscreenEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
KscreenConfig::self()->read();
|
KscreenConfig::self()->read();
|
||||||
m_xcbState.m_timeLine.setDuration(
|
m_xcbState.m_timeLine.setDuration(
|
||||||
std::chrono::milliseconds(animationTime<KscreenConfig>(250)));
|
std::chrono::milliseconds(animationTime<KscreenConfig>(250)));
|
||||||
|
|
|
@ -71,8 +71,6 @@ void MagicLampEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data,
|
||||||
|
|
||||||
void MagicLampEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
|
void MagicLampEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
|
||||||
{
|
{
|
||||||
Q_UNUSED(mask)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
auto animationIt = m_animations.constFind(w);
|
auto animationIt = m_animations.constFind(w);
|
||||||
if (animationIt != m_animations.constEnd()) {
|
if (animationIt != m_animations.constEnd()) {
|
||||||
// 0 = not minimized, 1 = fully minimized
|
// 0 = not minimized, 1 = fully minimized
|
||||||
|
|
|
@ -116,7 +116,6 @@ void OverviewEffect::reconfigure(ReconfigureFlags)
|
||||||
for (const int &border : touchActivateBorders) {
|
for (const int &border : touchActivateBorders) {
|
||||||
m_touchBorderActivate.append(ElectricBorder(border));
|
m_touchBorderActivate.append(ElectricBorder(border));
|
||||||
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
||||||
Q_UNUSED(screen)
|
|
||||||
if (m_status == Status::Active) {
|
if (m_status == Status::Active) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,13 +298,11 @@ ScreenShotSink1::ScreenShotSink1(ScreenShotDBusInterface1 *interface, QDBusMessa
|
||||||
|
|
||||||
void ScreenShotSink1::flush(const QImage &image)
|
void ScreenShotSink1::flush(const QImage &image)
|
||||||
{
|
{
|
||||||
Q_UNUSED(image)
|
|
||||||
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
|
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenShotSink1::flushMulti(const QList<QImage> &images)
|
void ScreenShotSink1::flushMulti(const QList<QImage> &images)
|
||||||
{
|
{
|
||||||
Q_UNUSED(images)
|
|
||||||
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
|
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,6 @@ SheetEffect::SheetEffect()
|
||||||
|
|
||||||
void SheetEffect::reconfigure(ReconfigureFlags flags)
|
void SheetEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
SheetConfig::self()->read();
|
SheetConfig::self()->read();
|
||||||
|
|
||||||
// TODO: Rename AnimationTime config key to Duration.
|
// TODO: Rename AnimationTime config key to Duration.
|
||||||
|
|
|
@ -289,8 +289,6 @@ bool SlideEffect::shouldElevate(const EffectWindow *w) const
|
||||||
*/
|
*/
|
||||||
void SlideEffect::startAnimation(int old, int current, EffectWindow *movingWindow)
|
void SlideEffect::startAnimation(int old, int current, EffectWindow *movingWindow)
|
||||||
{
|
{
|
||||||
Q_UNUSED(old)
|
|
||||||
|
|
||||||
if (m_state == State::Inactive) {
|
if (m_state == State::Inactive) {
|
||||||
prepareSwitching();
|
prepareSwitching();
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,6 @@ bool SlidingPopupsEffect::supported()
|
||||||
|
|
||||||
void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags)
|
void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
SlidingPopupsConfig::self()->read();
|
SlidingPopupsConfig::self()->read();
|
||||||
m_slideInDuration = std::chrono::milliseconds(
|
m_slideInDuration = std::chrono::milliseconds(
|
||||||
static_cast<int>(animationTime(SlidingPopupsConfig::slideInTime() != 0 ? SlidingPopupsConfig::slideInTime() : 150)));
|
static_cast<int>(animationTime(SlidingPopupsConfig::slideInTime() != 0 ? SlidingPopupsConfig::slideInTime() : 150)));
|
||||||
|
|
|
@ -75,8 +75,6 @@ SnapHelperEffect::~SnapHelperEffect()
|
||||||
|
|
||||||
void SnapHelperEffect::reconfigure(ReconfigureFlags flags)
|
void SnapHelperEffect::reconfigure(ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
m_animation.timeLine.setDuration(
|
m_animation.timeLine.setDuration(
|
||||||
std::chrono::milliseconds(static_cast<int>(animationTime(250))));
|
std::chrono::milliseconds(static_cast<int>(animationTime(250))));
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,6 @@ StartupFeedbackEffect::StartupFeedbackEffect()
|
||||||
Q_EMIT effects->startupAdded(id.id(), icon);
|
Q_EMIT effects->startupAdded(id.id(), icon);
|
||||||
});
|
});
|
||||||
connect(m_startupInfo, &KStartupInfo::gotRemoveStartup, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
|
connect(m_startupInfo, &KStartupInfo::gotRemoveStartup, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
|
||||||
Q_UNUSED(data);
|
|
||||||
Q_EMIT effects->startupRemoved(id.id());
|
Q_EMIT effects->startupRemoved(id.id());
|
||||||
});
|
});
|
||||||
connect(m_startupInfo, &KStartupInfo::gotStartupChange, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
|
connect(m_startupInfo, &KStartupInfo::gotStartupChange, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
|
||||||
|
@ -132,7 +131,6 @@ bool StartupFeedbackEffect::supported()
|
||||||
|
|
||||||
void StartupFeedbackEffect::reconfigure(Effect::ReconfigureFlags flags)
|
void StartupFeedbackEffect::reconfigure(Effect::ReconfigureFlags flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags)
|
|
||||||
KConfigGroup c = m_configWatcher->config()->group("FeedbackStyle");
|
KConfigGroup c = m_configWatcher->config()->group("FeedbackStyle");
|
||||||
const bool busyCursor = c.readEntry("BusyCursor", true);
|
const bool busyCursor = c.readEntry("BusyCursor", true);
|
||||||
|
|
||||||
|
@ -247,12 +245,6 @@ void StartupFeedbackEffect::postPaintScreen()
|
||||||
void StartupFeedbackEffect::slotMouseChanged(const QPoint &pos, const QPoint &oldpos, Qt::MouseButtons buttons,
|
void StartupFeedbackEffect::slotMouseChanged(const QPoint &pos, const QPoint &oldpos, Qt::MouseButtons buttons,
|
||||||
Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers)
|
Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(oldpos)
|
|
||||||
Q_UNUSED(buttons)
|
|
||||||
Q_UNUSED(oldbuttons)
|
|
||||||
Q_UNUSED(modifiers)
|
|
||||||
Q_UNUSED(oldmodifiers)
|
|
||||||
if (m_active) {
|
if (m_active) {
|
||||||
m_dirtyRect |= m_currentGeometry;
|
m_dirtyRect |= m_currentGeometry;
|
||||||
m_currentGeometry = feedbackRect();
|
m_currentGeometry = feedbackRect();
|
||||||
|
|
|
@ -56,7 +56,6 @@ Qt::GlobalColor TouchPointsEffect::colorForId(quint32 id)
|
||||||
|
|
||||||
bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
TouchPoint point;
|
TouchPoint point;
|
||||||
point.pos = pos;
|
point.pos = pos;
|
||||||
point.press = true;
|
point.press = true;
|
||||||
|
@ -69,7 +68,6 @@ bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||||
|
|
||||||
bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
TouchPoint point;
|
TouchPoint point;
|
||||||
point.pos = pos;
|
point.pos = pos;
|
||||||
point.press = true;
|
point.press = true;
|
||||||
|
@ -82,7 +80,6 @@ bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
||||||
|
|
||||||
bool TouchPointsEffect::touchUp(qint32 id, quint32 time)
|
bool TouchPointsEffect::touchUp(qint32 id, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
auto it = m_latestPositions.constFind(id);
|
auto it = m_latestPositions.constFind(id);
|
||||||
if (it != m_latestPositions.constEnd()) {
|
if (it != m_latestPositions.constEnd()) {
|
||||||
TouchPoint point;
|
TouchPoint point;
|
||||||
|
|
|
@ -221,7 +221,6 @@ void WindowViewEffect::reconfigure(ReconfigureFlags)
|
||||||
}
|
}
|
||||||
|
|
||||||
auto touchCallback = [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
auto touchCallback = [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
|
||||||
Q_UNUSED(screen)
|
|
||||||
if (m_status == Status::Active) {
|
if (m_status == Status::Active) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,7 +322,6 @@ void WobblyWindowsEffect::slotWindowStartUserMovedResized(EffectWindow *w)
|
||||||
|
|
||||||
void WobblyWindowsEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRectF &geometry)
|
void WobblyWindowsEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRectF &geometry)
|
||||||
{
|
{
|
||||||
Q_UNUSED(geometry)
|
|
||||||
if (windows.contains(w)) {
|
if (windows.contains(w)) {
|
||||||
WindowWobblyInfos &wwi = windows[w];
|
WindowWobblyInfos &wwi = windows[w];
|
||||||
const QRectF rect = w->frameGeometry();
|
const QRectF rect = w->frameGeometry();
|
||||||
|
@ -364,8 +363,6 @@ void WobblyWindowsEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
|
||||||
|
|
||||||
void WobblyWindowsEffect::slotWindowMaximizeStateChanged(EffectWindow *w, bool horizontal, bool vertical)
|
void WobblyWindowsEffect::slotWindowMaximizeStateChanged(EffectWindow *w, bool horizontal, bool vertical)
|
||||||
{
|
{
|
||||||
Q_UNUSED(horizontal)
|
|
||||||
Q_UNUSED(vertical)
|
|
||||||
if (w->isUserMove() || w->isSpecialWindow()) {
|
if (w->isUserMove() || w->isSpecialWindow()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,8 +329,6 @@ int GestureRecognizer::startPinchGesture(uint fingerCount)
|
||||||
|
|
||||||
void GestureRecognizer::updatePinchGesture(qreal scale, qreal angleDelta, const QPointF &posDelta)
|
void GestureRecognizer::updatePinchGesture(qreal scale, qreal angleDelta, const QPointF &posDelta)
|
||||||
{
|
{
|
||||||
Q_UNUSED(angleDelta);
|
|
||||||
Q_UNUSED(posDelta);
|
|
||||||
m_currentScale = scale;
|
m_currentScale = scale;
|
||||||
|
|
||||||
// Determine the direction of the swipe
|
// Determine the direction of the swipe
|
||||||
|
|
|
@ -119,7 +119,6 @@ void KWinWrapper::run()
|
||||||
m_kwinProcess->setArguments(args);
|
m_kwinProcess->setArguments(args);
|
||||||
|
|
||||||
connect(m_kwinProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
|
connect(m_kwinProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||||
Q_UNUSED(exitStatus)
|
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -16,21 +16,16 @@ namespace KWin
|
||||||
|
|
||||||
void HideCursorSpy::pointerEvent(MouseEvent *event)
|
void HideCursorSpy::pointerEvent(MouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
showCursor();
|
showCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HideCursorSpy::wheelEvent(KWin::WheelEvent *event)
|
void HideCursorSpy::wheelEvent(KWin::WheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
showCursor();
|
showCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HideCursorSpy::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
void HideCursorSpy::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
155
src/input.cpp
155
src/input.cpp
|
@ -105,43 +105,31 @@ InputEventFilter::~InputEventFilter()
|
||||||
|
|
||||||
bool InputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
|
bool InputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::wheelEvent(QWheelEvent *event)
|
bool InputEventFilter::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::keyEvent(QKeyEvent *event)
|
bool InputEventFilter::keyEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::touchDown(qint32 id, const QPointF &point, quint32 time)
|
bool InputEventFilter::touchDown(qint32 id, const QPointF &point, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(point)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::touchMotion(qint32 id, const QPointF &point, quint32 time)
|
bool InputEventFilter::touchMotion(qint32 id, const QPointF &point, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(point)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::touchUp(qint32 id, quint32 time)
|
bool InputEventFilter::touchUp(qint32 id, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,124 +145,86 @@ bool InputEventFilter::touchFrame()
|
||||||
|
|
||||||
bool InputEventFilter::pinchGestureBegin(int fingerCount, quint32 time)
|
bool InputEventFilter::pinchGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
|
bool InputEventFilter::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(scale)
|
|
||||||
Q_UNUSED(angleDelta)
|
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::pinchGestureEnd(quint32 time)
|
bool InputEventFilter::pinchGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::pinchGestureCancelled(quint32 time)
|
bool InputEventFilter::pinchGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::swipeGestureBegin(int fingerCount, quint32 time)
|
bool InputEventFilter::swipeGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::swipeGestureUpdate(const QPointF &delta, quint32 time)
|
bool InputEventFilter::swipeGestureUpdate(const QPointF &delta, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::swipeGestureEnd(quint32 time)
|
bool InputEventFilter::swipeGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::swipeGestureCancelled(quint32 time)
|
bool InputEventFilter::swipeGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::holdGestureBegin(int fingerCount, quint32 time)
|
bool InputEventFilter::holdGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::holdGestureEnd(quint32 time)
|
bool InputEventFilter::holdGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::holdGestureCancelled(quint32 time)
|
bool InputEventFilter::holdGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::switchEvent(SwitchEvent *event)
|
bool InputEventFilter::switchEvent(SwitchEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::tabletToolEvent(TabletEvent *event)
|
bool InputEventFilter::tabletToolEvent(TabletEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletId, uint time)
|
bool InputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
bool InputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
bool InputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
bool InputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,69 +427,52 @@ public:
|
||||||
}
|
}
|
||||||
bool pinchGestureBegin(int fingerCount, quint32 time) override
|
bool pinchGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(scale)
|
|
||||||
Q_UNUSED(angleDelta)
|
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool pinchGestureEnd(quint32 time) override
|
bool pinchGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool pinchGestureCancelled(quint32 time) override
|
bool pinchGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool swipeGestureBegin(int fingerCount, quint32 time) override
|
bool swipeGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool swipeGestureEnd(quint32 time) override
|
bool swipeGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool swipeGestureCancelled(quint32 time) override
|
bool swipeGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool holdGestureBegin(int fingerCount, quint32 time) override
|
bool holdGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
bool holdGestureEnd(quint32 time) override
|
bool holdGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// no touchpad multi-finger gestures on lock screen
|
// no touchpad multi-finger gestures on lock screen
|
||||||
return waylandServer()->isScreenLocked();
|
return waylandServer()->isScreenLocked();
|
||||||
}
|
}
|
||||||
|
@ -574,7 +507,6 @@ class EffectsFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
if (!effects) {
|
if (!effects) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -660,7 +592,6 @@ class MoveResizeFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
Window *window = workspace()->moveResizeWindow();
|
Window *window = workspace()->moveResizeWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -681,7 +612,6 @@ public:
|
||||||
}
|
}
|
||||||
bool wheelEvent(QWheelEvent *event) override
|
bool wheelEvent(QWheelEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
// filter out while moving a window
|
// filter out while moving a window
|
||||||
return workspace()->moveResizeWindow() != nullptr;
|
return workspace()->moveResizeWindow() != nullptr;
|
||||||
}
|
}
|
||||||
|
@ -703,9 +633,6 @@ public:
|
||||||
|
|
||||||
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
Window *window = workspace()->moveResizeWindow();
|
Window *window = workspace()->moveResizeWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -715,7 +642,6 @@ public:
|
||||||
|
|
||||||
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
Window *window = workspace()->moveResizeWindow();
|
Window *window = workspace()->moveResizeWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -732,7 +658,6 @@ public:
|
||||||
|
|
||||||
bool touchUp(qint32 id, quint32 time) override
|
bool touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
Window *window = workspace()->moveResizeWindow();
|
Window *window = workspace()->moveResizeWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -777,7 +702,6 @@ class WindowSelectorFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
if (!m_active) {
|
if (!m_active) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -798,13 +722,11 @@ public:
|
||||||
}
|
}
|
||||||
bool wheelEvent(QWheelEvent *event) override
|
bool wheelEvent(QWheelEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
// filter out while selecting a window
|
// filter out while selecting a window
|
||||||
return m_active;
|
return m_active;
|
||||||
}
|
}
|
||||||
bool keyEvent(QKeyEvent *event) override
|
bool keyEvent(QKeyEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
if (!m_active) {
|
if (!m_active) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -846,7 +768,6 @@ public:
|
||||||
|
|
||||||
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (!isActive()) {
|
if (!isActive()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -856,7 +777,6 @@ public:
|
||||||
|
|
||||||
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (!isActive()) {
|
if (!isActive()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -869,7 +789,6 @@ public:
|
||||||
|
|
||||||
bool touchUp(qint32 id, quint32 time) override
|
bool touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (!isActive()) {
|
if (!isActive()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -954,7 +873,6 @@ public:
|
||||||
|
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton);
|
|
||||||
if (event->type() == QEvent::MouseButtonPress) {
|
if (event->type() == QEvent::MouseButtonPress) {
|
||||||
if (input()->shortcuts()->processPointerPressed(event->modifiers(), event->buttons())) {
|
if (input()->shortcuts()->processPointerPressed(event->modifiers(), event->buttons())) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1009,7 +927,6 @@ public:
|
||||||
}
|
}
|
||||||
bool swipeGestureBegin(int fingerCount, quint32 time) override
|
bool swipeGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
m_touchpadGestureFingerCount = fingerCount;
|
m_touchpadGestureFingerCount = fingerCount;
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processSwipeStart(DeviceType::Touchpad, fingerCount);
|
input()->shortcuts()->processSwipeStart(DeviceType::Touchpad, fingerCount);
|
||||||
|
@ -1020,7 +937,6 @@ public:
|
||||||
}
|
}
|
||||||
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processSwipeUpdate(DeviceType::Touchpad, delta);
|
input()->shortcuts()->processSwipeUpdate(DeviceType::Touchpad, delta);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1030,7 +946,6 @@ public:
|
||||||
}
|
}
|
||||||
bool swipeGestureCancelled(quint32 time) override
|
bool swipeGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processSwipeCancel(DeviceType::Touchpad);
|
input()->shortcuts()->processSwipeCancel(DeviceType::Touchpad);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1040,7 +955,6 @@ public:
|
||||||
}
|
}
|
||||||
bool swipeGestureEnd(quint32 time) override
|
bool swipeGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processSwipeEnd(DeviceType::Touchpad);
|
input()->shortcuts()->processSwipeEnd(DeviceType::Touchpad);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1050,7 +964,6 @@ public:
|
||||||
}
|
}
|
||||||
bool pinchGestureBegin(int fingerCount, quint32 time) override
|
bool pinchGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
m_touchpadGestureFingerCount = fingerCount;
|
m_touchpadGestureFingerCount = fingerCount;
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processPinchStart(fingerCount);
|
input()->shortcuts()->processPinchStart(fingerCount);
|
||||||
|
@ -1061,7 +974,6 @@ public:
|
||||||
}
|
}
|
||||||
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processPinchUpdate(scale, angleDelta, delta);
|
input()->shortcuts()->processPinchUpdate(scale, angleDelta, delta);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1071,7 +983,6 @@ public:
|
||||||
}
|
}
|
||||||
bool pinchGestureEnd(quint32 time) override
|
bool pinchGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processPinchEnd();
|
input()->shortcuts()->processPinchEnd();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1081,7 +992,6 @@ public:
|
||||||
}
|
}
|
||||||
bool pinchGestureCancelled(quint32 time) override
|
bool pinchGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
if (m_touchpadGestureFingerCount >= 3) {
|
if (m_touchpadGestureFingerCount >= 3) {
|
||||||
input()->shortcuts()->processPinchCancel();
|
input()->shortcuts()->processPinchCancel();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1135,7 +1045,6 @@ public:
|
||||||
|
|
||||||
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
if (m_gestureTaken) {
|
if (m_gestureTaken) {
|
||||||
if (m_gestureCancelled) {
|
if (m_gestureCancelled) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1156,7 +1065,6 @@ public:
|
||||||
|
|
||||||
bool touchUp(qint32 id, quint32 time) override
|
bool touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
m_touchPoints.remove(id);
|
m_touchPoints.remove(id);
|
||||||
if (m_gestureTaken) {
|
if (m_gestureTaken) {
|
||||||
if (!m_gestureCancelled) {
|
if (!m_gestureCancelled) {
|
||||||
|
@ -1267,7 +1175,6 @@ class InternalWindowEventFilter : public InputEventFilter
|
||||||
{
|
{
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
if (!input()->pointer()->focus() || !input()->pointer()->focus()->isInternal()) {
|
if (!input()->pointer()->focus() || !input()->pointer()->focus()->isInternal()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1438,7 +1345,6 @@ class DecorationEventFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
auto decoration = input()->pointer()->decoration();
|
auto decoration = input()->pointer()->decoration();
|
||||||
if (!decoration) {
|
if (!decoration) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1540,7 +1446,6 @@ public:
|
||||||
}
|
}
|
||||||
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
auto decoration = input()->touch()->decoration();
|
auto decoration = input()->touch()->decoration();
|
||||||
if (!decoration) {
|
if (!decoration) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1562,7 +1467,6 @@ public:
|
||||||
}
|
}
|
||||||
bool touchUp(qint32 id, quint32 time) override
|
bool touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time);
|
|
||||||
auto decoration = input()->touch()->decoration();
|
auto decoration = input()->touch()->decoration();
|
||||||
if (!decoration) {
|
if (!decoration) {
|
||||||
// can happen when quick tiling
|
// can happen when quick tiling
|
||||||
|
@ -1653,7 +1557,6 @@ class TabBoxInputFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 button) override
|
bool pointerEvent(QMouseEvent *event, quint32 button) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
if (!workspace()->tabbox() || !workspace()->tabbox()->isGrabbed()) {
|
if (!workspace()->tabbox() || !workspace()->tabbox()->isGrabbed()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1693,14 +1596,12 @@ class ScreenEdgeInputFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
workspace()->screenEdges()->isEntered(event);
|
workspace()->screenEdges()->isEntered(event);
|
||||||
// always forward
|
// always forward
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
// TODO: better check whether a touch sequence is in progress
|
// TODO: better check whether a touch sequence is in progress
|
||||||
if (m_touchInProgress || waylandServer()->seat()->isTouchSequence()) {
|
if (m_touchInProgress || waylandServer()->seat()->isTouchSequence()) {
|
||||||
// cancel existing touch
|
// cancel existing touch
|
||||||
|
@ -1719,7 +1620,6 @@ public:
|
||||||
}
|
}
|
||||||
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_touchInProgress && m_id == id) {
|
if (m_touchInProgress && m_id == id) {
|
||||||
workspace()->screenEdges()->gestureRecognizer()->updateSwipeGesture(pos - m_lastPos);
|
workspace()->screenEdges()->gestureRecognizer()->updateSwipeGesture(pos - m_lastPos);
|
||||||
m_lastPos = pos;
|
m_lastPos = pos;
|
||||||
|
@ -1729,7 +1629,6 @@ public:
|
||||||
}
|
}
|
||||||
bool touchUp(qint32 id, quint32 time) override
|
bool touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (m_touchInProgress && m_id == id) {
|
if (m_touchInProgress && m_id == id) {
|
||||||
workspace()->screenEdges()->gestureRecognizer()->endSwipeGesture();
|
workspace()->screenEdges()->gestureRecognizer()->endSwipeGesture();
|
||||||
m_touchInProgress = false;
|
m_touchInProgress = false;
|
||||||
|
@ -1753,7 +1652,6 @@ class WindowActionInputFilter : public InputEventFilter
|
||||||
public:
|
public:
|
||||||
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(nativeButton)
|
|
||||||
if (event->type() != QEvent::MouseButtonPress) {
|
if (event->type() != QEvent::MouseButtonPress) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1785,8 +1683,6 @@ public:
|
||||||
}
|
}
|
||||||
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
auto seat = waylandServer()->seat();
|
auto seat = waylandServer()->seat();
|
||||||
if (seat->isTouchSequence()) {
|
if (seat->isTouchSequence()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -2344,7 +2240,6 @@ public:
|
||||||
|
|
||||||
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
|
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
KWaylandServer::TabletSeatV2Interface *tabletSeat = findTabletSeat();
|
KWaylandServer::TabletSeatV2Interface *tabletSeat = findTabletSeat();
|
||||||
auto tool = tabletSeat->toolByHardwareSerial(tabletToolId.m_serialId, getType(tabletToolId));
|
auto tool = tabletSeat->toolByHardwareSerial(tabletToolId.m_serialId, getType(tabletToolId));
|
||||||
if (!tool) {
|
if (!tool) {
|
||||||
|
@ -2737,7 +2632,6 @@ public:
|
||||||
|
|
||||||
void tabletPadButtonEvent(uint, bool pressed, const KWin::TabletPadId &, uint time) override
|
void tabletPadButtonEvent(uint, bool pressed, const KWin::TabletPadId &, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (!pressed) {
|
if (!pressed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2746,7 +2640,6 @@ public:
|
||||||
|
|
||||||
void tabletToolButtonEvent(uint, bool pressed, const KWin::TabletToolId &, uint time) override
|
void tabletToolButtonEvent(uint, bool pressed, const KWin::TabletToolId &, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
if (!pressed) {
|
if (!pressed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2781,144 +2674,96 @@ class UserActivitySpy : public InputEventSpy
|
||||||
public:
|
public:
|
||||||
void pointerEvent(MouseEvent *event) override
|
void pointerEvent(MouseEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void wheelEvent(WheelEvent *event) override
|
void wheelEvent(WheelEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyEvent(KeyEvent *event) override
|
void keyEvent(KeyEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
void touchDown(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
void touchMotion(qint32 id, const QPointF &pos, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void touchUp(qint32 id, quint32 time) override
|
void touchUp(qint32 id, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pinchGestureBegin(int fingerCount, quint32 time) override
|
void pinchGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
void pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(scale)
|
|
||||||
Q_UNUSED(angleDelta)
|
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void pinchGestureEnd(quint32 time) override
|
void pinchGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void pinchGestureCancelled(quint32 time) override
|
void pinchGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void swipeGestureBegin(int fingerCount, quint32 time) override
|
void swipeGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
void swipeGestureUpdate(const QPointF &delta, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void swipeGestureEnd(quint32 time) override
|
void swipeGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void swipeGestureCancelled(quint32 time) override
|
void swipeGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void holdGestureBegin(int fingerCount, quint32 time) override
|
void holdGestureBegin(int fingerCount, quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void holdGestureEnd(quint32 time) override
|
void holdGestureEnd(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void holdGestureCancelled(quint32 time) override
|
void holdGestureCancelled(quint32 time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tabletToolEvent(TabletEvent *event) override
|
void tabletToolEvent(TabletEvent *event) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
|
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletToolId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
|
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
|
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
|
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
notifyActivity();
|
notifyActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,142 +25,93 @@ InputEventSpy::~InputEventSpy()
|
||||||
|
|
||||||
void InputEventSpy::pointerEvent(MouseEvent *event)
|
void InputEventSpy::pointerEvent(MouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::wheelEvent(WheelEvent *event)
|
void InputEventSpy::wheelEvent(WheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::keyEvent(KeyEvent *event)
|
void InputEventSpy::keyEvent(KeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::touchDown(qint32 id, const QPointF &point, quint32 time)
|
void InputEventSpy::touchDown(qint32 id, const QPointF &point, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(point)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::touchMotion(qint32 id, const QPointF &point, quint32 time)
|
void InputEventSpy::touchMotion(qint32 id, const QPointF &point, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(point)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::touchUp(qint32 id, quint32 time)
|
void InputEventSpy::touchUp(qint32 id, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::pinchGestureBegin(int fingerCount, quint32 time)
|
void InputEventSpy::pinchGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
|
void InputEventSpy::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(scale)
|
|
||||||
Q_UNUSED(angleDelta)
|
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::pinchGestureEnd(quint32 time)
|
void InputEventSpy::pinchGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::pinchGestureCancelled(quint32 time)
|
void InputEventSpy::pinchGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::swipeGestureBegin(int fingerCount, quint32 time)
|
void InputEventSpy::swipeGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::swipeGestureUpdate(const QPointF &delta, quint32 time)
|
void InputEventSpy::swipeGestureUpdate(const QPointF &delta, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(delta)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::swipeGestureEnd(quint32 time)
|
void InputEventSpy::swipeGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::swipeGestureCancelled(quint32 time)
|
void InputEventSpy::swipeGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::holdGestureBegin(int fingerCount, quint32 time)
|
void InputEventSpy::holdGestureBegin(int fingerCount, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fingerCount)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::holdGestureEnd(quint32 time)
|
void InputEventSpy::holdGestureEnd(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::holdGestureCancelled(quint32 time)
|
void InputEventSpy::holdGestureCancelled(quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::switchEvent(SwitchEvent *event)
|
void InputEventSpy::switchEvent(SwitchEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::tabletToolEvent(TabletEvent *event)
|
void InputEventSpy::tabletToolEvent(TabletEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
|
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletToolId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,6 @@ void InputMethod::textInputInterfaceV2StateUpdated(quint32 serial, KWaylandServe
|
||||||
if (!m_enabled) {
|
if (!m_enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Q_UNUSED(serial);
|
|
||||||
|
|
||||||
auto t2 = waylandServer()->seat()->textInputV2();
|
auto t2 = waylandServer()->seat()->textInputV2();
|
||||||
auto inputContext = waylandServer()->inputMethod()->context();
|
auto inputContext = waylandServer()->inputMethod()->context();
|
||||||
|
@ -434,8 +433,6 @@ static quint32 keysymToKeycode(quint32 sym)
|
||||||
|
|
||||||
void InputMethod::keysymReceived(quint32 serial, quint32 time, quint32 sym, bool pressed, quint32 modifiers)
|
void InputMethod::keysymReceived(quint32 serial, quint32 time, quint32 sym, bool pressed, quint32 modifiers)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
auto t2 = waylandServer()->seat()->textInputV2();
|
auto t2 = waylandServer()->seat()->textInputV2();
|
||||||
if (t2 && t2->isEnabled()) {
|
if (t2 && t2->isEnabled()) {
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
|
@ -457,7 +454,6 @@ void InputMethod::keysymReceived(quint32 serial, quint32 time, quint32 sym, bool
|
||||||
|
|
||||||
void InputMethod::commitString(qint32 serial, const QString &text)
|
void InputMethod::commitString(qint32 serial, const QString &text)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
if (auto t2 = waylandServer()->seat()->textInputV2(); t2 && t2->isEnabled()) {
|
if (auto t2 = waylandServer()->seat()->textInputV2(); t2 && t2->isEnabled()) {
|
||||||
t2->commitString(text.toUtf8());
|
t2->commitString(text.toUtf8());
|
||||||
t2->preEdit({}, {});
|
t2->preEdit({}, {});
|
||||||
|
@ -533,7 +529,6 @@ void InputMethod::setCursorPosition(qint32 index, qint32 anchor)
|
||||||
|
|
||||||
void InputMethod::setLanguage(uint32_t serial, const QString &language)
|
void InputMethod::setLanguage(uint32_t serial, const QString &language)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
auto t2 = waylandServer()->seat()->textInputV2();
|
auto t2 = waylandServer()->seat()->textInputV2();
|
||||||
if (t2 && t2->isEnabled()) {
|
if (t2 && t2->isEnabled()) {
|
||||||
t2->setLanguage(language.toUtf8());
|
t2->setLanguage(language.toUtf8());
|
||||||
|
@ -542,7 +537,6 @@ void InputMethod::setLanguage(uint32_t serial, const QString &language)
|
||||||
|
|
||||||
void InputMethod::setTextDirection(uint32_t serial, Qt::LayoutDirection direction)
|
void InputMethod::setTextDirection(uint32_t serial, Qt::LayoutDirection direction)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
auto t2 = waylandServer()->seat()->textInputV2();
|
auto t2 = waylandServer()->seat()->textInputV2();
|
||||||
if (t2 && t2->isEnabled()) {
|
if (t2 && t2->isEnabled()) {
|
||||||
t2->setTextDirection(direction);
|
t2->setTextDirection(direction);
|
||||||
|
@ -578,7 +572,6 @@ void InputMethod::setPreeditStyling(quint32 index, quint32 length, quint32 style
|
||||||
|
|
||||||
void InputMethod::setPreeditString(uint32_t serial, const QString &text, const QString &commit)
|
void InputMethod::setPreeditString(uint32_t serial, const QString &text, const QString &commit)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
auto t2 = waylandServer()->seat()->textInputV2();
|
auto t2 = waylandServer()->seat()->textInputV2();
|
||||||
if (t2 && t2->isEnabled()) {
|
if (t2 && t2->isEnabled()) {
|
||||||
t2->preEdit(text.toUtf8(), commit.toUtf8());
|
t2->preEdit(text.toUtf8(), commit.toUtf8());
|
||||||
|
@ -626,7 +619,6 @@ void InputMethod::key(quint32 /*serial*/, quint32 /*time*/, quint32 keyCode, boo
|
||||||
|
|
||||||
void InputMethod::modifiers(quint32 serial, quint32 mods_depressed, quint32 mods_latched, quint32 mods_locked, quint32 group)
|
void InputMethod::modifiers(quint32 serial, quint32 mods_depressed, quint32 mods_latched, quint32 mods_locked, quint32 group)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial)
|
|
||||||
auto xkb = input()->keyboard()->xkb();
|
auto xkb = input()->keyboard()->xkb();
|
||||||
xkb->updateModifiers(mods_depressed, mods_latched, mods_locked, group);
|
xkb->updateModifiers(mods_depressed, mods_latched, mods_locked, group);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ void InputPanelV1Window::showOverlayPanel()
|
||||||
|
|
||||||
void InputPanelV1Window::showTopLevel(OutputInterface *output, InputPanelSurfaceV1Interface::Position position)
|
void InputPanelV1Window::showTopLevel(OutputInterface *output, InputPanelSurfaceV1Interface::Position position)
|
||||||
{
|
{
|
||||||
Q_UNUSED(position);
|
|
||||||
m_mode = Mode::VirtualKeyboard;
|
m_mode = Mode::VirtualKeyboard;
|
||||||
setOutput(output);
|
setOutput(output);
|
||||||
maybeShow();
|
maybeShow();
|
||||||
|
@ -191,7 +190,6 @@ void InputPanelV1Window::setOutput(OutputInterface *outputIface)
|
||||||
|
|
||||||
void InputPanelV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
|
void InputPanelV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
|
||||||
{
|
{
|
||||||
Q_UNUSED(mode)
|
|
||||||
updateGeometry(rect);
|
updateGeometry(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,8 +160,6 @@ QSizeF InternalWindow::maxSize() const
|
||||||
|
|
||||||
NET::WindowType InternalWindow::windowType(bool direct, int supported_types) const
|
NET::WindowType InternalWindow::windowType(bool direct, int supported_types) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(direct)
|
|
||||||
Q_UNUSED(supported_types)
|
|
||||||
return m_windowType;
|
return m_windowType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +293,6 @@ void InternalWindow::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
|
||||||
|
|
||||||
Window *InternalWindow::findModal(bool allow_itself)
|
Window *InternalWindow::findModal(bool allow_itself)
|
||||||
{
|
{
|
||||||
Q_UNUSED(allow_itself)
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,7 +432,6 @@ bool InternalWindow::acceptsFocus() const
|
||||||
|
|
||||||
bool InternalWindow::belongsToSameApplication(const Window *other, SameApplicationChecks checks) const
|
bool InternalWindow::belongsToSameApplication(const Window *other, SameApplicationChecks checks) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(checks)
|
|
||||||
const InternalWindow *otherInternal = qobject_cast<const InternalWindow *>(other);
|
const InternalWindow *otherInternal = qobject_cast<const InternalWindow *>(other);
|
||||||
if (!otherInternal) {
|
if (!otherInternal) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -113,13 +113,11 @@ QModelIndex EffectsModel::index(int row, int column, const QModelIndex &parent)
|
||||||
|
|
||||||
QModelIndex EffectsModel::parent(const QModelIndex &child) const
|
QModelIndex EffectsModel::parent(const QModelIndex &child) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(child)
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
int EffectsModel::columnCount(const QModelIndex &parent) const
|
int EffectsModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +649,6 @@ void EffectsModel::requestConfigure(const QModelIndex &index, QWindow *transient
|
||||||
|
|
||||||
bool EffectsModel::shouldStore(const EffectData &data) const
|
bool EffectsModel::shouldStore(const EffectData &data) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(data)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,6 @@ void PreviewClient::setBordersTopEdge(bool enabled)
|
||||||
|
|
||||||
void PreviewClient::requestShowToolTip(const QString &text)
|
void PreviewClient::requestShowToolTip(const QString &text)
|
||||||
{
|
{
|
||||||
Q_UNUSED(text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestHideToolTip()
|
void PreviewClient::requestHideToolTip()
|
||||||
|
@ -385,19 +384,15 @@ void PreviewClient::requestToggleKeepBelow()
|
||||||
|
|
||||||
void PreviewClient::requestShowWindowMenu(const QRect &rect)
|
void PreviewClient::requestShowWindowMenu(const QRect &rect)
|
||||||
{
|
{
|
||||||
Q_UNUSED(rect)
|
|
||||||
Q_EMIT showWindowMenuRequested();
|
Q_EMIT showWindowMenuRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
|
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(rect);
|
|
||||||
Q_UNUSED(actionId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::showApplicationMenu(int actionId)
|
void PreviewClient::showApplicationMenu(int actionId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(actionId)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestToggleOnAllDesktops()
|
void PreviewClient::requestToggleOnAllDesktops()
|
||||||
|
|
|
@ -28,7 +28,6 @@ QHash<int, QByteArray> RuleBookModel::roleNames() const
|
||||||
|
|
||||||
int RuleBookModel::rowCount(const QModelIndex &parent) const
|
int RuleBookModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return m_ruleBook->ruleCount();
|
return m_ruleBook->ruleCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,9 +255,6 @@ void Monitor::Corner::mousePressEvent(QGraphicsSceneMouseEvent *e)
|
||||||
|
|
||||||
void Monitor::Corner::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void Monitor::Corner::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
if (m_hover) {
|
if (m_hover) {
|
||||||
button->setElementPrefix("normal");
|
button->setElementPrefix("normal");
|
||||||
|
|
||||||
|
@ -290,14 +287,12 @@ void Monitor::Corner::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
|
||||||
|
|
||||||
void Monitor::Corner::hoverEnterEvent(QGraphicsSceneHoverEvent *e)
|
void Monitor::Corner::hoverEnterEvent(QGraphicsSceneHoverEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(e);
|
|
||||||
m_hover = true;
|
m_hover = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Monitor::Corner::hoverLeaveEvent(QGraphicsSceneHoverEvent *e)
|
void Monitor::Corner::hoverLeaveEvent(QGraphicsSceneHoverEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(e);
|
|
||||||
m_hover = false;
|
m_hover = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,13 +107,11 @@ QRect ScreenPreviewWidget::previewRect() const
|
||||||
|
|
||||||
void ScreenPreviewWidget::resizeEvent(QResizeEvent *e)
|
void ScreenPreviewWidget::resizeEvent(QResizeEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(e)
|
|
||||||
d->updateScreenGraphics();
|
d->updateScreenGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenPreviewWidget::paintEvent(QPaintEvent *event)
|
void ScreenPreviewWidget::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
if (d->monitorRect.size().isEmpty()) {
|
if (d->monitorRect.size().isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,6 @@ QString ExampleClientModel::longestCaption() const
|
||||||
|
|
||||||
int ExampleClientModel::rowCount(const QModelIndex &parent) const
|
int ExampleClientModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return m_thumbnails.size();
|
return m_thumbnails.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ void WindowThumbnailItem::setWId(qulonglong wId)
|
||||||
|
|
||||||
void WindowThumbnailItem::setClipTo(QQuickItem *clip)
|
void WindowThumbnailItem::setClipTo(QQuickItem *clip)
|
||||||
{
|
{
|
||||||
Q_UNUSED(clip)
|
|
||||||
qWarning() << "ThumbnailItem.clipTo is removed and it has no replacements";
|
qWarning() << "ThumbnailItem.clipTo is removed and it has no replacements";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +82,6 @@ void WindowThumbnailItem::findImage()
|
||||||
|
|
||||||
QSGNode *WindowThumbnailItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
|
QSGNode *WindowThumbnailItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
|
||||||
{
|
{
|
||||||
Q_UNUSED(updatePaintNodeData)
|
|
||||||
auto *node = static_cast<QSGImageNode *>(oldNode);
|
auto *node = static_cast<QSGImageNode *>(oldNode);
|
||||||
if (!node) {
|
if (!node) {
|
||||||
node = window()->createImageNode();
|
node = window()->createImageNode();
|
||||||
|
@ -120,13 +118,11 @@ QSize WindowThumbnailItem::sourceSize() const
|
||||||
|
|
||||||
void WindowThumbnailItem::setBrightness(qreal brightness)
|
void WindowThumbnailItem::setBrightness(qreal brightness)
|
||||||
{
|
{
|
||||||
Q_UNUSED(brightness)
|
|
||||||
qWarning() << "ThumbnailItem.brightness is removed. Use a shader effect to change brightness";
|
qWarning() << "ThumbnailItem.brightness is removed. Use a shader effect to change brightness";
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowThumbnailItem::setSaturation(qreal saturation)
|
void WindowThumbnailItem::setSaturation(qreal saturation)
|
||||||
{
|
{
|
||||||
Q_UNUSED(saturation)
|
|
||||||
qWarning() << "ThumbnailItem.saturation is removed. Use a shader effect to change saturation";
|
qWarning() << "ThumbnailItem.saturation is removed. Use a shader effect to change saturation";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ KcmVirtualKeyboard::KcmVirtualKeyboard(QObject *parent, const QVariantList &args
|
||||||
, m_data(new VirtualKeyboardData(this))
|
, m_data(new VirtualKeyboardData(this))
|
||||||
, m_model(new VirtualKeyboardsModel(this))
|
, m_model(new VirtualKeyboardsModel(this))
|
||||||
{
|
{
|
||||||
Q_UNUSED(args)
|
|
||||||
|
|
||||||
qmlRegisterAnonymousType<VirtualKeyboardSettings>("org.kde.kwin.virtualkeyboardsettings", 1);
|
qmlRegisterAnonymousType<VirtualKeyboardSettings>("org.kde.kwin.virtualkeyboardsettings", 1);
|
||||||
|
|
||||||
setAboutData(new KAboutData(QStringLiteral("kcm_virtualkeyboard"),
|
setAboutData(new KAboutData(QStringLiteral("kcm_virtualkeyboard"),
|
||||||
|
|
|
@ -79,7 +79,6 @@ GlobalPolicy::GlobalPolicy(Xkb *xkb, KeyboardLayout *_layout, const KConfigGroup
|
||||||
: Policy(xkb, _layout, config)
|
: Policy(xkb, _layout, config)
|
||||||
{
|
{
|
||||||
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this, xkb](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this, xkb](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
clearLayouts();
|
clearLayouts();
|
||||||
if (const uint layout = xkb->currentLayout()) {
|
if (const uint layout = xkb->currentLayout()) {
|
||||||
m_config.writeEntry(defaultLayoutEntryKey(), layout);
|
m_config.writeEntry(defaultLayoutEntryKey(), layout);
|
||||||
|
@ -87,7 +86,6 @@ GlobalPolicy::GlobalPolicy(Xkb *xkb, KeyboardLayout *_layout, const KConfigGroup
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
if (xkb->numberOfLayouts() > 1) {
|
if (xkb->numberOfLayouts() > 1) {
|
||||||
setLayout(m_config.readEntry(defaultLayoutEntryKey(), 0));
|
setLayout(m_config.readEntry(defaultLayoutEntryKey(), 0));
|
||||||
}
|
}
|
||||||
|
@ -103,7 +101,6 @@ VirtualDesktopPolicy::VirtualDesktopPolicy(Xkb *xkb, KeyboardLayout *layout, con
|
||||||
this, &VirtualDesktopPolicy::desktopChanged);
|
this, &VirtualDesktopPolicy::desktopChanged);
|
||||||
|
|
||||||
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
clearLayouts();
|
clearLayouts();
|
||||||
|
|
||||||
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
|
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
|
||||||
|
@ -114,7 +111,6 @@ VirtualDesktopPolicy::VirtualDesktopPolicy(Xkb *xkb, KeyboardLayout *layout, con
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
if (xkb->numberOfLayouts() > 1) {
|
if (xkb->numberOfLayouts() > 1) {
|
||||||
const auto &desktops = VirtualDesktopManager::self()->desktops();
|
const auto &desktops = VirtualDesktopManager::self()->desktops();
|
||||||
for (KWin::VirtualDesktop *const desktop : desktops) {
|
for (KWin::VirtualDesktop *const desktop : desktops) {
|
||||||
|
@ -236,7 +232,6 @@ ApplicationPolicy::ApplicationPolicy(KWin::Xkb *xkb, KWin::KeyboardLayout *layou
|
||||||
connect(workspace(), &Workspace::windowActivated, this, &ApplicationPolicy::windowActivated);
|
connect(workspace(), &Workspace::windowActivated, this, &ApplicationPolicy::windowActivated);
|
||||||
|
|
||||||
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
clearLayouts();
|
clearLayouts();
|
||||||
|
|
||||||
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
|
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
|
||||||
|
@ -250,7 +245,6 @@ ApplicationPolicy::ApplicationPolicy(KWin::Xkb *xkb, KWin::KeyboardLayout *layou
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
|
||||||
Q_UNUSED(name)
|
|
||||||
if (xkb->numberOfLayouts() > 1) {
|
if (xkb->numberOfLayouts() > 1) {
|
||||||
const QString keyPrefix = defaultLayoutEntryKey();
|
const QString keyPrefix = defaultLayoutEntryKey();
|
||||||
const QStringList keyList = m_config.keyList().filter(keyPrefix);
|
const QStringList keyList = m_config.keyList().filter(keyPrefix);
|
||||||
|
|
|
@ -71,7 +71,6 @@ protected:
|
||||||
}
|
}
|
||||||
void layoutChanged(uint index) override
|
void layoutChanged(uint index) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -431,6 +431,14 @@ bool AnimationEffect::cancel(quint64 animationId)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AnimationEffect::animationEnded(EffectWindow *w, Attribute a, uint meta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimationEffect::genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void AnimationEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
|
void AnimationEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
|
||||||
{
|
{
|
||||||
Q_D(AnimationEffect);
|
Q_D(AnimationEffect);
|
||||||
|
|
|
@ -466,12 +466,7 @@ protected:
|
||||||
* @param meta Originally supplied metadata to animate() or set().
|
* @param meta Originally supplied metadata to animate() or set().
|
||||||
* @since 4.8
|
* @since 4.8
|
||||||
*/
|
*/
|
||||||
virtual void animationEnded(EffectWindow *w, Attribute a, uint meta)
|
virtual void animationEnded(EffectWindow *w, Attribute a, uint meta);
|
||||||
{
|
|
||||||
Q_UNUSED(w);
|
|
||||||
Q_UNUSED(a);
|
|
||||||
Q_UNUSED(meta);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels a running animation.
|
* Cancels a running animation.
|
||||||
|
@ -499,13 +494,7 @@ protected:
|
||||||
* @param meta The metadata.
|
* @param meta The metadata.
|
||||||
* @since 4.8
|
* @since 4.8
|
||||||
*/
|
*/
|
||||||
virtual void genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta)
|
virtual void genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta);
|
||||||
{
|
|
||||||
Q_UNUSED(w);
|
|
||||||
Q_UNUSED(data);
|
|
||||||
Q_UNUSED(progress);
|
|
||||||
Q_UNUSED(meta);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
|
|
@ -602,71 +602,46 @@ xcb_window_t Effect::x11RootWindow() const
|
||||||
|
|
||||||
bool Effect::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
bool Effect::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
bool Effect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(pos)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::touchUp(qint32 id, quint32 time)
|
bool Effect::touchUp(qint32 id, quint32 time)
|
||||||
{
|
{
|
||||||
Q_UNUSED(id)
|
|
||||||
Q_UNUSED(time)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::perform(Feature feature, const QVariantList &arguments)
|
bool Effect::perform(Feature feature, const QVariantList &arguments)
|
||||||
{
|
{
|
||||||
Q_UNUSED(feature)
|
|
||||||
Q_UNUSED(arguments)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::tabletToolEvent(QTabletEvent *event)
|
bool Effect::tabletToolEvent(QTabletEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::tabletToolButtonEvent(uint button, bool pressed, quint64 tabletToolId)
|
bool Effect::tabletToolButtonEvent(uint button, bool pressed, quint64 tabletToolId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletToolId)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::tabletPadButtonEvent(uint button, bool pressed, void *tabletPadId)
|
bool Effect::tabletPadButtonEvent(uint button, bool pressed, void *tabletPadId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
Q_UNUSED(pressed)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::tabletPadStripEvent(int number, int position, bool isFinger, void *tabletPadId)
|
bool Effect::tabletPadStripEvent(int number, int position, bool isFinger, void *tabletPadId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Effect::tabletPadRingEvent(int number, int position, bool isFinger, void *tabletPadId)
|
bool Effect::tabletPadRingEvent(int number, int position, bool isFinger, void *tabletPadId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(number)
|
|
||||||
Q_UNUSED(position)
|
|
||||||
Q_UNUSED(isFinger)
|
|
||||||
Q_UNUSED(tabletPadId)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1474,7 +1449,6 @@ QRectF WindowMotionManager::targetGeometry(EffectWindow *w) const
|
||||||
|
|
||||||
EffectWindow *WindowMotionManager::windowAtPoint(QPoint point, bool useStackingOrder) const
|
EffectWindow *WindowMotionManager::windowAtPoint(QPoint point, bool useStackingOrder) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(useStackingOrder);
|
|
||||||
// TODO: Stacking order uses EffectsHandler::stackingOrder() then filters by m_managedWindows
|
// TODO: Stacking order uses EffectsHandler::stackingOrder() then filters by m_managedWindows
|
||||||
QHash<EffectWindow *, WindowMotion>::ConstIterator it = m_managedWindows.constBegin();
|
QHash<EffectWindow *, WindowMotion>::ConstIterator it = m_managedWindows.constBegin();
|
||||||
while (it != m_managedWindows.constEnd()) {
|
while (it != m_managedWindows.constEnd()) {
|
||||||
|
|
|
@ -86,9 +86,6 @@ static void initDebugOutput()
|
||||||
GLenum severity, GLsizei length,
|
GLenum severity, GLsizei length,
|
||||||
const GLchar *message,
|
const GLchar *message,
|
||||||
const GLvoid *userParam) {
|
const GLvoid *userParam) {
|
||||||
Q_UNUSED(source)
|
|
||||||
Q_UNUSED(severity)
|
|
||||||
Q_UNUSED(userParam)
|
|
||||||
while (length && std::isspace(message[length - 1])) {
|
while (length && std::isspace(message[length - 1])) {
|
||||||
--length;
|
--length;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +300,6 @@ bool GLShader::link()
|
||||||
|
|
||||||
const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &source) const
|
const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &source) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(shaderType)
|
|
||||||
// Prepare the source code
|
// Prepare the source code
|
||||||
QByteArray ba;
|
QByteArray ba;
|
||||||
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) {
|
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) {
|
||||||
|
|
|
@ -77,13 +77,11 @@ static GLenum GetGraphicsResetStatus()
|
||||||
static void ReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
|
static void ReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
|
||||||
GLenum type, GLsizei bufSize, GLvoid *data)
|
GLenum type, GLsizei bufSize, GLvoid *data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(bufSize)
|
|
||||||
glReadPixels(x, y, width, height, format, type, data);
|
glReadPixels(x, y, width, height, format, type, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
|
static void GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
|
||||||
{
|
{
|
||||||
Q_UNUSED(bufSize)
|
|
||||||
glGetUniformfv(program, location, params);
|
glGetUniformfv(program, location, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,10 +77,6 @@ void OffscreenEffect::unredirect(EffectWindow *window)
|
||||||
|
|
||||||
void OffscreenEffect::apply(EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads)
|
void OffscreenEffect::apply(EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads)
|
||||||
{
|
{
|
||||||
Q_UNUSED(window)
|
|
||||||
Q_UNUSED(mask)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
Q_UNUSED(quads)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenData::maybeRender(EffectWindow *window)
|
void OffscreenData::maybeRender(EffectWindow *window)
|
||||||
|
@ -279,8 +275,6 @@ CrossFadeEffect::~CrossFadeEffect()
|
||||||
|
|
||||||
void CrossFadeEffect::drawWindow(EffectWindow *window, int mask, const QRegion ®ion, WindowPaintData &data)
|
void CrossFadeEffect::drawWindow(EffectWindow *window, int mask, const QRegion ®ion, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(mask)
|
|
||||||
|
|
||||||
CrossFadeWindowData *offscreenData = d->windows.value(window);
|
CrossFadeWindowData *offscreenData = d->windows.value(window);
|
||||||
|
|
||||||
// paint the new window (if applicable) underneath
|
// paint the new window (if applicable) underneath
|
||||||
|
|
|
@ -299,8 +299,6 @@ void QuickSceneEffect::activateView(QuickSceneView *view)
|
||||||
// Screen views are repainted just before kwin performs its compositing cycle to avoid stalling for vblank
|
// Screen views are repainted just before kwin performs its compositing cycle to avoid stalling for vblank
|
||||||
void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
|
void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
|
||||||
{
|
{
|
||||||
Q_UNUSED(presentTime)
|
|
||||||
|
|
||||||
if (effects->waylandDisplay()) {
|
if (effects->waylandDisplay()) {
|
||||||
QuickSceneView *screenView = d->views.value(data.screen);
|
QuickSceneView *screenView = d->views.value(data.screen);
|
||||||
if (screenView && screenView->isDirty()) {
|
if (screenView && screenView->isDirty()) {
|
||||||
|
@ -319,9 +317,6 @@ void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::mil
|
||||||
|
|
||||||
void QuickSceneEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintData &data)
|
void QuickSceneEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintData &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(mask)
|
|
||||||
Q_UNUSED(region)
|
|
||||||
|
|
||||||
if (effects->waylandDisplay()) {
|
if (effects->waylandDisplay()) {
|
||||||
QuickSceneView *screenView = d->views.value(data.screen());
|
QuickSceneView *screenView = d->views.value(data.screen());
|
||||||
if (screenView) {
|
if (screenView) {
|
||||||
|
@ -341,7 +336,6 @@ bool QuickSceneEffect::isActive() const
|
||||||
|
|
||||||
QVariantMap QuickSceneEffect::initialProperties(EffectScreen *screen)
|
QVariantMap QuickSceneEffect::initialProperties(EffectScreen *screen)
|
||||||
{
|
{
|
||||||
Q_UNUSED(screen)
|
|
||||||
return QVariantMap();
|
return QVariantMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,6 @@ LinuxDmaBufV1RendererInterface::~LinuxDmaBufV1RendererInterface()
|
||||||
|
|
||||||
KWaylandServer::LinuxDmaBufV1ClientBuffer *LinuxDmaBufV1RendererInterface::importBuffer(DmaBufAttributes &&attrs, quint32 flags)
|
KWaylandServer::LinuxDmaBufV1ClientBuffer *LinuxDmaBufV1RendererInterface::importBuffer(DmaBufAttributes &&attrs, quint32 flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(attrs)
|
|
||||||
Q_UNUSED(flags)
|
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -574,7 +574,6 @@ bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
|
||||||
bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
|
bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Q_UNUSED(result)
|
|
||||||
if (eventType == "xcb_generic_event_t") {
|
if (eventType == "xcb_generic_event_t") {
|
||||||
return kwinApp()->dispatchEvent(static_cast<xcb_generic_event_t *>(message));
|
return kwinApp()->dispatchEvent(static_cast<xcb_generic_event_t *>(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,6 @@ void ModifierOnlyShortcuts::pointerEvent(MouseEvent *event)
|
||||||
|
|
||||||
void ModifierOnlyShortcuts::wheelEvent(WheelEvent *event)
|
void ModifierOnlyShortcuts::wheelEvent(WheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue