aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xwayland
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2024-07-27 13:58:30 +0200
committervaxerski <[email protected]>2024-07-27 13:58:30 +0200
commit682865632fe986d179ca07e45ae89e65b8058b33 (patch)
tree0f92988930618ff88ad80e50e4af04ff720026db /src/xwayland
parent76610d9fb0ba5a2d495a963773c38b717d76776f (diff)
downloadHyprland-682865632fe986d179ca07e45ae89e65b8058b33.tar.gz
Hyprland-682865632fe986d179ca07e45ae89e65b8058b33.zip
xwayland: fix high cpu idle usage
fixes #7051
Diffstat (limited to 'src/xwayland')
-rw-r--r--src/xwayland/XWM.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp
index 498710a4..f6b6864c 100644
--- a/src/xwayland/XWM.cpp
+++ b/src/xwayland/XWM.cpp
@@ -153,13 +153,16 @@ 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);
- for (auto& ha : HYPRATOMS) {
- if (ha.second != atom)
- continue;
+ std::string propName;
+ if (Debug::trace) {
+ propName = std::format("{}?", atom);
+ for (auto& ha : HYPRATOMS) {
+ if (ha.second != atom)
+ continue;
- propName = ha.first;
- break;
+ propName = ha.first;
+ break;
+ }
}
if (atom == XCB_ATOM_WM_CLASS) {
@@ -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) {