Skip to content

Commit

Permalink
style: rename CMake define
Browse files Browse the repository at this point in the history
The define is not only about the axis source, but also some other enums having
been renamed in [1] on wlroots master.

[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
  • Loading branch information
romangg committed Mar 7, 2024
1 parent b7a040a commit 8c1ac26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +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)
set(WLR_HAVE_WL_POINTER_ENUMS 1)
endif()

find_package(X11)
Expand Down
2 changes: 1 addition & 1 deletion como/base/config-como.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +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
#cmakedefine01 WLR_HAVE_WL_POINTER_ENUMS

#if HAVE_BREEZE_DECO
#define BREEZE_KDECORATION_PLUGIN_ID "${BREEZE_KDECORATION_PLUGIN_ID}"
Expand Down
4 changes: 2 additions & 2 deletions como/input/backend/wlroots/pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void handle_button(struct wl_listener* listener, void* data)
auto event = button_event
{
wlr_event->button,
#if WLR_HAVE_WL_POINTER_AXIS_SOURCE
#if WLR_HAVE_WL_POINTER_ENUMS
wlr_event->state == WL_POINTER_BUTTON_STATE_RELEASED ? button_state::released
: button_state::pressed,
#else
Expand All @@ -111,7 +111,7 @@ 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
#if WLR_HAVE_WL_POINTER_ENUMS
case WL_POINTER_AXIS_SOURCE_WHEEL:
return axis_source::wheel;
case WL_POINTER_AXIS_SOURCE_FINGER:
Expand Down

0 comments on commit 8c1ac26

Please sign in to comment.