Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some missing includes #16

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ if (${wlroots_VERSION} VERSION_GREATER_EQUAL 0.18)
set(WLR_HAVE_UTIL_TRANSFORM_HEADER 1)
set(WLR_HAVE_NEW_PIXEL_COPY_API 1)
set(WLR_HAVE_BACKEND_CREATE_WITH_LOOP 1)
set(WLR_HAVE_WL_POINTER_AXIS_SOURCE 1)
endif()

find_package(X11)
Expand Down
1 change: 1 addition & 0 deletions como/base/config-como.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#cmakedefine01 WLR_HAVE_UTIL_TRANSFORM_HEADER
#cmakedefine01 WLR_HAVE_NEW_PIXEL_COPY_API
#cmakedefine01 WLR_HAVE_BACKEND_CREATE_WITH_LOOP
#cmakedefine01 WLR_HAVE_WL_POINTER_AXIS_SOURCE

#if HAVE_BREEZE_DECO
#define BREEZE_KDECORATION_PLUGIN_ID "${BREEZE_KDECORATION_PLUGIN_ID}"
Expand Down
30 changes: 24 additions & 6 deletions como/input/backend/wlroots/pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,20 @@ void handle_button(struct wl_listener* listener, void* data)
auto pointer = event_receiver_struct->receiver;
auto wlr_event = reinterpret_cast<wlr_pointer_button_event*>(data);

auto event = button_event{
auto event = button_event
{
wlr_event->button,
wlr_event->state == WLR_BUTTON_RELEASED ? button_state::released : button_state::pressed,
{
pointer,
wlr_event->time_msec,
},
#if WLR_HAVE_WL_POINTER_AXIS_SOURCE
wlr_event->state == WL_POINTER_BUTTON_STATE_RELEASED ? button_state::released
: button_state::pressed,
#else
wlr_event->state == WLR_BUTTON_RELEASED ? button_state::released
: button_state::pressed,
#endif
{
pointer,
wlr_event->time_msec,
},
};

Q_EMIT pointer->button_changed(event);
Expand All @@ -104,6 +111,16 @@ void handle_axis(struct wl_listener* listener, void* data)

auto get_source = [](auto wlr_source) {
switch (wlr_source) {
#if WLR_HAVE_WL_POINTER_AXIS_SOURCE
case WL_POINTER_AXIS_SOURCE_WHEEL:
return axis_source::wheel;
case WL_POINTER_AXIS_SOURCE_FINGER:
return axis_source::finger;
case WL_POINTER_AXIS_SOURCE_CONTINUOUS:
return axis_source::continuous;
case WL_POINTER_AXIS_SOURCE_WHEEL_TILT:
return axis_source::wheel_tilt;
#else
case WLR_AXIS_SOURCE_WHEEL:
return axis_source::wheel;
case WLR_AXIS_SOURCE_FINGER:
Expand All @@ -112,6 +129,7 @@ void handle_axis(struct wl_listener* listener, void* data)
return axis_source::continuous;
case WLR_AXIS_SOURCE_WHEEL_TILT:
return axis_source::wheel_tilt;
#endif
default:
return axis_source::unknown;
}
Expand Down
1 change: 1 addition & 0 deletions como/input/xkb/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <KConfigGroup>
#include <KSharedConfig>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <xkbcommon/xkbcommon-compose.h>
Expand Down
4 changes: 2 additions & 2 deletions como/win/tabbox/tabbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,11 @@ class tabbox
mods &= keyQt;
if (((keyQt & ~mods) == Qt::Key_Tab) || ((keyQt & ~mods) == Qt::Key_Backtab)) {
if (contains(forward, QKeyCombination(mods, Qt::Key_Backtab).toCombined())
|| contains(forward, QKeyCombination(mods, Qt::Key_Tab))) {
|| contains(forward, QKeyCombination(mods, Qt::Key_Tab).toCombined())) {
return Forward;
}
if (contains(backward, QKeyCombination(mods, Qt::Key_Backtab).toCombined())
|| contains(backward, QKeyCombination(mods, Qt::Key_Tab))) {
|| contains(backward, QKeyCombination(mods, Qt::Key_Tab).toCombined())) {
return Backward;
}
}
Expand Down
1 change: 1 addition & 0 deletions plugins/effects/blur/blur.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <QVector2D>
#include <QVector>
#include <span>
#include <stack>
#include <vector>

Expand Down