xwayland: fix high cpu idle usage

fixes #7051
This commit is contained in:
Vaxry 2024-07-27 13:58:30 +02:00
parent 76610d9fb0
commit 682865632f

View file

@ -153,7 +153,9 @@ static bool lookupParentExists(SP<CXWaylandSurface> XSURF, SP<CXWaylandSurface>
}
void CXWM::readProp(SP<CXWaylandSurface> XSURF, uint32_t atom, xcb_get_property_reply_t* reply) {
std::string propName = std::format("{}?", atom);
std::string propName;
if (Debug::trace) {
propName = std::format("{}?", atom);
for (auto& ha : HYPRATOMS) {
if (ha.second != atom)
continue;
@ -161,6 +163,7 @@ void CXWM::readProp(SP<CXWaylandSurface> XSURF, uint32_t atom, xcb_get_property_
propName = ha.first;
break;
}
}
if (atom == XCB_ATOM_WM_CLASS) {
size_t len = xcb_get_property_value_length(reply);
@ -536,7 +539,7 @@ bool CXWM::handleSelectionPropertyNotify(xcb_property_notify_event_t* e) {
// Debug::log(ERR, "[xwm] FIXME: CXWM::handleSelectionPropertyNotify stub");
return false;
return true;
}
void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {