[Bf-blender-cvs] [e550e400cd9] master: Cleanup: internalize struct members for internal wayland types
Campbell Barton
noreply at git.blender.org
Wed Jun 15 11:33:51 CEST 2022
Commit: e550e400cd9c5fa549e9b69b191a296803dcb31b
Author: Campbell Barton
Date: Wed Jun 15 19:25:20 2022 +1000
Branches: master
https://developer.blender.org/rBe550e400cd9c5fa549e9b69b191a296803dcb31b
Cleanup: internalize struct members for internal wayland types
Missed from 9978689595f87a6b4d8244ee3d014c8fb239e38d.
===================================================================
M intern/ghost/intern/GHOST_SystemWayland.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 4ecaf2bed44..5fe1b68543a 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -120,17 +120,17 @@ struct data_source_t {
};
struct key_repeat_payload_t {
- GHOST_SystemWayland *system;
- GHOST_IWindow *window;
- GHOST_TKey key;
- GHOST_TEventKeyData key_data;
+ GHOST_SystemWayland *system = nullptr;
+ GHOST_IWindow *window = nullptr;
+ GHOST_TKey key = GHOST_kKeyUnknown;
+ GHOST_TEventKeyData key_data = {GHOST_kKeyUnknown};
};
struct input_t {
- GHOST_SystemWayland *system;
+ GHOST_SystemWayland *system = nullptr;
std::string name;
- struct wl_seat *wl_seat;
+ struct wl_seat *wl_seat = nullptr;
struct wl_pointer *wl_pointer = nullptr;
struct wl_keyboard *wl_keyboard = nullptr;
struct zwp_tablet_seat_v2 *tablet_seat = nullptr;
@@ -138,11 +138,11 @@ struct input_t {
/** All currently active tablet tools (needed for changing the cursor). */
std::unordered_set<zwp_tablet_tool_v2 *> tablet_tools;
- uint32_t pointer_serial;
- uint32_t tablet_serial;
+ uint32_t pointer_serial = 0;
+ uint32_t tablet_serial = 0;
/** Use to check if the last cursor input was tablet or pointer. */
- uint32_t cursor_serial;
+ uint32_t cursor_serial = 0;
/**
* High precision mouse coordinates (pointer or tablet).
@@ -156,7 +156,7 @@ struct input_t {
* };
* \endocde
*/
- wl_fixed_t xy[2];
+ wl_fixed_t xy[2] = {0, 0};
GHOST_Buttons buttons = GHOST_Buttons();
struct cursor_t cursor;
@@ -168,9 +168,9 @@ struct input_t {
struct xkb_state *xkb_state = nullptr;
struct {
/** Key repetition in character per second. */
- int32_t rate;
+ int32_t rate = 0;
/** Time (milliseconds) after which to start repeating keys. */
- int32_t delay;
+ int32_t delay = 0;
/** Timer for key repeats. */
GHOST_ITimerTask *timer = nullptr;
} key_repeat;
@@ -193,7 +193,7 @@ struct input_t {
std::mutex data_source_mutex;
/** Last device that was active. */
- uint32_t data_source_serial;
+ uint32_t data_source_serial = 0;
};
struct display_t {
More information about the Bf-blender-cvs
mailing list