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:
authorCampbell Barton <campbell@blender.org>2022-10-20 00:48:45 +0300
committerCampbell Barton <campbell@blender.org>2022-10-20 02:03:55 +0300
commitc67975c6bb70c6f877b005bbefcef71f2045b34b (patch)
treeb7dadb86a4ae244bbfd241ec029880b1ae2f6de7
parent1a11353d341aa46487ee8b4177cbb2d566bca932 (diff)
Cleanup: use 'wl_' prefix for data_source
Without this the local and wayland native types could be mixed up.
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 2d16fd4cff5..c0c55fb4cfa 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -289,7 +289,7 @@ struct GWL_DataOffer {
};
struct GWL_DataSource {
- struct wl_data_source *data_source = nullptr;
+ struct wl_data_source *wl_data_source = nullptr;
char *buffer_out = nullptr;
};
@@ -616,8 +616,8 @@ static void display_destroy(GWL_Display *display)
std::lock_guard lock{seat->data_source_mutex};
if (seat->data_source) {
free(seat->data_source->buffer_out);
- if (seat->data_source->data_source) {
- wl_data_source_destroy(seat->data_source->data_source);
+ if (seat->data_source->wl_data_source) {
+ wl_data_source_destroy(seat->data_source->wl_data_source);
}
delete seat->data_source;
}
@@ -3580,18 +3580,18 @@ void GHOST_SystemWayland::putClipboard(const char *buffer, bool /*selection*/) c
data_source->buffer_out = static_cast<char *>(malloc(buffer_size));
std::memcpy(data_source->buffer_out, buffer, buffer_size);
- data_source->data_source = wl_data_device_manager_create_data_source(
+ data_source->wl_data_source = wl_data_device_manager_create_data_source(
display_->data_device_manager);
- wl_data_source_add_listener(data_source->data_source, &data_source_listener, seat);
+ wl_data_source_add_listener(data_source->wl_data_source, &data_source_listener, seat);
for (const std::string &type : mime_send) {
- wl_data_source_offer(data_source->data_source, type.c_str());
+ wl_data_source_offer(data_source->wl_data_source, type.c_str());
}
if (seat->data_device) {
wl_data_device_set_selection(
- seat->data_device, data_source->data_source, seat->data_source_serial);
+ seat->data_device, data_source->wl_data_source, seat->data_source_serial);
}
}