Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kim <pk15950@gmail.com>2022-06-10 00:33:32 +0300
committerPeter Kim <pk15950@gmail.com>2022-06-10 00:33:32 +0300
commit7948150ca3683dc326c37609ded322d54b832d0d (patch)
tree180e0cd7c6f42c3d7f60fc38d409df2b6f788618 /intern/ghost/intern/GHOST_SystemWayland.cpp
parent2e66e2c37d2179472b2d76e1d69ab9642cc60316 (diff)
parente6548c03f9f345789f0a93405047b978b109b3fc (diff)
Merge branch 'master' into xr-dev
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWayland.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index c6dea13d050..a5789a2526f 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -71,7 +71,7 @@ struct cursor_t {
struct wl_cursor_theme *theme = nullptr;
int size;
std::string theme_name;
- // outputs on which the cursor is visible
+ /** Outputs on which the cursor is visible. */
std::unordered_set<const output_t *> outputs;
int scale = 1;
};
@@ -121,11 +121,11 @@ struct input_t {
struct xkb_context *xkb_context;
struct xkb_state *xkb_state;
struct {
- /* Key repetition in character per second. */
+ /** Key repetition in character per second. */
int32_t rate;
- /* Time (milliseconds) after which to start repeating keys. */
+ /** Time (milliseconds) after which to start repeating keys. */
int32_t delay;
- /* Timer for key repeats. */
+ /** Timer for key repeats. */
GHOST_ITimerTask *timer = nullptr;
} key_repeat;
@@ -133,8 +133,10 @@ struct input_t {
struct wl_surface *focus_keyboard = nullptr;
struct wl_data_device *data_device = nullptr;
- struct data_offer_t *data_offer_dnd; /* Drag & Drop. */
- struct data_offer_t *data_offer_copy_paste; /* Copy & Paste. */
+ /** Drag & Drop. */
+ struct data_offer_t *data_offer_dnd;
+ /** Copy & Paste. */
+ struct data_offer_t *data_offer_copy_paste;
struct data_source_t *data_source;
};
@@ -828,7 +830,7 @@ static const struct wl_data_device_listener data_device_listener = {
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Listener (Pointer), #wl_pointer_listener
+/** \name Listener (Surface), #wl_surface_listener
* \{ */
static void cursor_buffer_release(void *data, struct wl_buffer *wl_buffer)
@@ -911,6 +913,12 @@ struct wl_surface_listener cursor_surface_listener = {
cursor_surface_leave,
};
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Listener (Pointer), #wl_pointer_listener
+ * \{ */
+
static void pointer_enter(void *data,
struct wl_pointer * /*wl_pointer*/,
uint32_t serial,
@@ -1607,6 +1615,7 @@ void GHOST_SystemWayland::putClipboard(const char *buffer, bool /*selection*/) c
data_source_t *data_source = d->inputs[0]->data_source;
/* Copy buffer. */
+ free(data_source->buffer_out);
const size_t buffer_size = strlen(buffer) + 1;
data_source->buffer_out = static_cast<char *>(malloc(buffer_size));
std::memcpy(data_source->buffer_out, buffer, buffer_size);
@@ -2019,7 +2028,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const GHOST_TGrabCursorMode mo
const bool was_lock = MODE_NEEDS_LOCK(mode_current);
const bool use_lock = MODE_NEEDS_LOCK(mode);
- /* Check for wrap as #supportsCursorWarp isn't supproted. */
+ /* Check for wrap as #supportsCursorWarp isn't supported. */
const bool was_hide = MODE_NEEDS_HIDE(mode_current) || (mode_current == GHOST_kGrabWrap);
const bool use_hide = MODE_NEEDS_HIDE(mode) || (mode == GHOST_kGrabWrap);