Files
test2/source/blender/blenkernel/intern/wm_runtime.cc
Sebastian Parborg e4aa758d70 Fix #137346: IME input getting lost when using Wayland
Our IME input system relied on passing around pointers to global variables.
However this will not work as the Wayland input handling is multithreaded so the content of the global variable would change while the event loop were reading the data.

Pull Request: https://projects.blender.org/blender/blender/pulls/138871
2025-05-16 14:21:06 +02:00

42 lines
839 B
C++

/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bke
*/
#include "BKE_report.hh"
#include "BKE_wm_runtime.hh"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
namespace blender::bke {
WindowManagerRuntime::WindowManagerRuntime()
{
BKE_reports_init(&this->reports, RPT_STORE);
}
WindowManagerRuntime::~WindowManagerRuntime()
{
BKE_reports_free(&this->reports);
BLI_freelistN(&this->notifier_queue);
if (this->notifier_queue_set) {
BLI_gset_free(this->notifier_queue_set, nullptr);
}
}
WindowRuntime::~WindowRuntime()
{
#ifdef WITH_INPUT_IME
BLI_assert(this->ime_data == nullptr);
#endif
/** The event_queue should be freed when the window is freed. */
BLI_assert(BLI_listbase_is_empty(&this->event_queue));
}
} // namespace blender::bke