fixup! 5052035: [X11] Change AtomCache from a singleton to owned by Connection

This commit is contained in:
Jeremy Rose
2023-11-30 14:54:13 -08:00
parent 1469e3e93c
commit 40d87be14c

View File

@@ -28,7 +28,8 @@ void SetWMSpecState(x11::Window window, bool enabled, x11::Atom state) {
void SetWindowType(x11::Window window, const std::string& type) {
std::string type_prefix = "_NET_WM_WINDOW_TYPE_";
x11::Atom window_type = x11::GetAtom(type_prefix + base::ToUpperASCII(type));
std::string window_type_str = type_prefix + base::ToUpperASCII(type);
x11::Atom window_type = x11::GetAtom(window_type_str.c_str());
auto* connection = x11::Connection::Get();
connection->SetProperty(window, x11::GetAtom("_NET_WM_WINDOW_TYPE"),
x11::Atom::ATOM, window_type);