From f6a08f79b49c10cad99f853ab787010036dc637a Mon Sep 17 00:00:00 2001 From: Tin Date: Wed, 8 Nov 2023 04:15:01 +0100 Subject: [PATCH] Tweaks Signed-off-by: Tin --- src/display-wayland.cc | 5 +++-- src/display-x11.cc | 2 +- src/main.cc | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/display-wayland.cc b/src/display-wayland.cc index 233f98b3..f63b6ab4 100644 --- a/src/display-wayland.cc +++ b/src/display-wayland.cc @@ -439,7 +439,7 @@ static void on_pointer_enter(void *data, wl_pointer *pointer, uint32_t serial, size_t x = static_cast(wl_fixed_to_double(surface_x)); size_t y = static_cast(wl_fixed_to_double(surface_y)); - last_known_positions[pointer] = {x, y}; + last_known_positions[pointer] = std::array{x, y}; size_t abs_x = w->rectangle.x + x; size_t abs_y = w->rectangle.y + y; @@ -485,7 +485,7 @@ static void on_pointer_motion(void *data, size_t x = static_cast(wl_fixed_to_double(surface_x)); size_t y = static_cast(wl_fixed_to_double(surface_y)); - last_known_positions[pointer] = std::array {x, y}; + last_known_positions[pointer] = std::array{x, y}; size_t abs_x = w->rectangle.x + x; size_t abs_y = w->rectangle.y + y; @@ -630,6 +630,7 @@ bool display_output_wayland::initialize() { wl_surface_commit(global_window->surface); wl_display_roundtrip(global_display); + wayland_create_window(); return true; } diff --git a/src/display-x11.cc b/src/display-x11.cc index 16d7b41d..0bf9db1a 100644 --- a/src/display-x11.cc +++ b/src/display-x11.cc @@ -231,7 +231,7 @@ bool display_output_x11::shutdown() { } inline void propagate_unconsumed_event(XEvent &ev, bool is_consumed) { - uint32_t capture_mask = ButtonPressMask | ButtonReleaseMask | ButtonMotionMask; + const uint32_t capture_mask = ButtonPressMask | ButtonReleaseMask | ButtonMotionMask; // SAFETY: XEvent is a union and all event types this function gets called for // share same alignment and accessed fields share same offsets. diff --git a/src/main.cc b/src/main.cc index 2f14f2e9..78e4368d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -183,7 +183,7 @@ static void print_version() { #endif #endif /* BUILD_X11 */ #ifdef BUILD_WAYLAND - << _(" X11:\n") + << _(" Wayland:\n") #ifdef BUILD_MOUSE_EVENTS << _(" * Mouse events\n") #endif