@@ -199,7 +199,7 @@ static std::string getTagsData(PHLWINDOW w, eHyprCtlOutputFormat format) {
199199
200200static std::string getGroupedData (PHLWINDOW w, eHyprCtlOutputFormat format) {
201201 const bool isJson = format == eHyprCtlOutputFormat::FORMAT_JSON;
202- if (w->m_sGroupData .pNextWindow .expired ())
202+ if (w->m_groupData .pNextWindow .expired ())
203203 return isJson ? " " : " 0" ;
204204
205205 std::ostringstream result;
@@ -211,7 +211,7 @@ static std::string getGroupedData(PHLWINDOW w, eHyprCtlOutputFormat format) {
211211 result << std::format (" \" 0x{:x}\" " , (uintptr_t )curr.get ());
212212 else
213213 result << std::format (" {:x}" , (uintptr_t )curr.get ());
214- curr = curr->m_sGroupData .pNextWindow .lock ();
214+ curr = curr->m_groupData .pNextWindow .lock ();
215215 // We've wrapped around to the start, break out without trailing comma
216216 if (curr == head)
217217 break ;
@@ -262,26 +262,25 @@ std::string CHyprCtl::getWindowData(PHLWINDOW w, eHyprCtlOutputFormat format) {
262262 "xdgTag": "{}",
263263 "xdgDescription": "{}"
264264}},)#" ,
265- (uintptr_t )w.get (), (w->m_bIsMapped ? " true" : " false" ), (w->isHidden () ? " true" : " false" ), (int )w->m_vRealPosition ->goal ().x , (int )w->m_vRealPosition ->goal ().y ,
266- (int )w->m_vRealSize ->goal ().x , (int )w->m_vRealSize ->goal ().y , w->m_pWorkspace ? w->workspaceID () : WORKSPACE_INVALID,
267- escapeJSONStrings (!w->m_pWorkspace ? " " : w->m_pWorkspace ->m_name ), ((int )w->m_bIsFloating == 1 ? " true" : " false" ), (w->m_bIsPseudotiled ? " true" : " false" ),
268- (int64_t )w->monitorID (), escapeJSONStrings (w->m_szClass ), escapeJSONStrings (w->m_szTitle ), escapeJSONStrings (w->m_szInitialClass ),
269- escapeJSONStrings (w->m_szInitialTitle ), w->getPID (), ((int )w->m_bIsX11 == 1 ? " true" : " false" ), (w->m_bPinned ? " true" : " false" ),
270- (uint8_t )w->m_sFullscreenState .internal , (uint8_t )w->m_sFullscreenState .client , getGroupedData (w, format), getTagsData (w, format), (uintptr_t )w->m_pSwallowed .get (),
271- getFocusHistoryID (w), (g_pInputManager->isWindowInhibiting (w, false ) ? " true" : " false" ), escapeJSONStrings (w->xdgTag ().value_or (" " )),
272- escapeJSONStrings (w->xdgDescription ().value_or (" " )));
265+ (uintptr_t )w.get (), (w->m_isMapped ? " true" : " false" ), (w->isHidden () ? " true" : " false" ), (int )w->m_realPosition ->goal ().x , (int )w->m_realPosition ->goal ().y ,
266+ (int )w->m_realSize ->goal ().x , (int )w->m_realSize ->goal ().y , w->m_workspace ? w->workspaceID () : WORKSPACE_INVALID,
267+ escapeJSONStrings (!w->m_workspace ? " " : w->m_workspace ->m_name ), ((int )w->m_isFloating == 1 ? " true" : " false" ), (w->m_isPseudotiled ? " true" : " false" ),
268+ (int64_t )w->monitorID (), escapeJSONStrings (w->m_class ), escapeJSONStrings (w->m_title ), escapeJSONStrings (w->m_initialClass ), escapeJSONStrings (w->m_initialTitle ),
269+ w->getPID (), ((int )w->m_isX11 == 1 ? " true" : " false" ), (w->m_pinned ? " true" : " false" ), (uint8_t )w->m_fullscreenState .internal , (uint8_t )w->m_fullscreenState .client ,
270+ getGroupedData (w, format), getTagsData (w, format), (uintptr_t )w->m_swallowed .get (), getFocusHistoryID (w),
271+ (g_pInputManager->isWindowInhibiting (w, false ) ? " true" : " false" ), escapeJSONStrings (w->xdgTag ().value_or (" " )), escapeJSONStrings (w->xdgDescription ().value_or (" " )));
273272 } else {
274273 return std::format (
275274 " Window {:x} -> {}:\n\t mapped: {}\n\t hidden: {}\n\t at: {},{}\n\t size: {},{}\n\t workspace: {} ({})\n\t floating: {}\n\t pseudo: {}\n\t monitor: {}\n\t class: {}\n\t title: "
276275 " {}\n\t initialClass: {}\n\t initialTitle: {}\n\t pid: "
277276 " {}\n\t xwayland: {}\n\t pinned: "
278277 " {}\n\t fullscreen: {}\n\t fullscreenClient: {}\n\t grouped: {}\n\t tags: {}\n\t swallowing: {:x}\n\t focusHistoryID: {}\n\t inhibitingIdle: {}\n\t xdgTag: "
279278 " {}\n\t xdgDescription: {}\n\n " ,
280- (uintptr_t )w.get (), w->m_szTitle , (int )w->m_bIsMapped , (int )w->isHidden (), (int )w->m_vRealPosition ->goal ().x , (int )w->m_vRealPosition ->goal ().y ,
281- (int )w->m_vRealSize ->goal ().x , (int )w->m_vRealSize ->goal ().y , w->m_pWorkspace ? w->workspaceID () : WORKSPACE_INVALID, (!w->m_pWorkspace ? " " : w->m_pWorkspace ->m_name ),
282- (int )w->m_bIsFloating , (int )w->m_bIsPseudotiled , (int64_t )w->monitorID (), w->m_szClass , w->m_szTitle , w->m_szInitialClass , w->m_szInitialTitle , w->getPID (),
283- (int )w->m_bIsX11 , (int )w-> m_bPinned , ( uint8_t )w->m_sFullscreenState .internal , (uint8_t )w->m_sFullscreenState .client , getGroupedData (w, format), getTagsData (w, format),
284- (uintptr_t )w->m_pSwallowed .get (), getFocusHistoryID (w), (int )g_pInputManager->isWindowInhibiting (w, false ), w->xdgTag ().value_or (" " ), w->xdgDescription ().value_or (" " ));
279+ (uintptr_t )w.get (), w->m_title , (int )w->m_isMapped , (int )w->isHidden (), (int )w->m_realPosition ->goal ().x , (int )w->m_realPosition ->goal ().y ,
280+ (int )w->m_realSize ->goal ().x , (int )w->m_realSize ->goal ().y , w->m_workspace ? w->workspaceID () : WORKSPACE_INVALID, (!w->m_workspace ? " " : w->m_workspace ->m_name ),
281+ (int )w->m_isFloating , (int )w->m_isPseudotiled , (int64_t )w->monitorID (), w->m_class , w->m_title , w->m_initialClass , w->m_initialTitle , w->getPID (), ( int )w-> m_isX11 ,
282+ (int )w->m_pinned , (uint8_t )w->m_fullscreenState .internal , (uint8_t )w->m_fullscreenState .client , getGroupedData (w, format), getTagsData (w, format),
283+ (uintptr_t )w->m_swallowed .get (), getFocusHistoryID (w), (int )g_pInputManager->isWindowInhibiting (w, false ), w->xdgTag ().value_or (" " ), w->xdgDescription ().value_or (" " ));
285284 }
286285}
287286
@@ -291,7 +290,7 @@ static std::string clientsRequest(eHyprCtlOutputFormat format, std::string reque
291290 result += " [" ;
292291
293292 for (auto const & w : g_pCompositor->m_windows ) {
294- if (!w->m_bIsMapped && !g_pHyprCtl->m_currentRequestParams .all )
293+ if (!w->m_isMapped && !g_pHyprCtl->m_currentRequestParams .all )
295294 continue ;
296295
297296 result += CHyprCtl::getWindowData (w, format);
@@ -302,7 +301,7 @@ static std::string clientsRequest(eHyprCtlOutputFormat format, std::string reque
302301 result += " ]" ;
303302 } else {
304303 for (auto const & w : g_pCompositor->m_windows ) {
305- if (!w->m_bIsMapped && !g_pHyprCtl->m_currentRequestParams .all )
304+ if (!w->m_isMapped && !g_pHyprCtl->m_currentRequestParams .all )
306305 continue ;
307306
308307 result += CHyprCtl::getWindowData (w, format);
@@ -328,12 +327,12 @@ std::string CHyprCtl::getWorkspaceData(PHLWORKSPACE w, eHyprCtlOutputFormat form
328327}})#" ,
329328 w->m_id , escapeJSONStrings (w->m_name ), escapeJSONStrings (PMONITOR ? PMONITOR->szName : " ?" ),
330329 escapeJSONStrings (PMONITOR ? std::to_string (PMONITOR->ID ) : " null" ), w->getWindows (), w->m_hasFullscreenWindow ? " true" : " false" ,
331- (uintptr_t )PLASTW.get (), PLASTW ? escapeJSONStrings (PLASTW->m_szTitle ) : " " , w->m_persistent ? " true" : " false" );
330+ (uintptr_t )PLASTW.get (), PLASTW ? escapeJSONStrings (PLASTW->m_title ) : " " , w->m_persistent ? " true" : " false" );
332331 } else {
333332 return std::format (
334333 " workspace ID {} ({}) on monitor {}:\n\t monitorID: {}\n\t windows: {}\n\t hasfullscreen: {}\n\t lastwindow: 0x{:x}\n\t lastwindowtitle: {}\n\t ispersistent: {}\n\n " ,
335334 w->m_id , w->m_name , PMONITOR ? PMONITOR->szName : " ?" , PMONITOR ? std::to_string (PMONITOR->ID ) : " null" , w->getWindows (), (int )w->m_hasFullscreenWindow ,
336- (uintptr_t )PLASTW.get (), PLASTW ? PLASTW->m_szTitle : " " , (int )w->m_persistent );
335+ (uintptr_t )PLASTW.get (), PLASTW ? PLASTW->m_title : " " , (int )w->m_persistent );
337336 }
338337}
339338
@@ -1397,15 +1396,15 @@ static std::string decorationRequest(eHyprCtlOutputFormat format, std::string re
13971396 std::string result = " " ;
13981397 if (format == eHyprCtlOutputFormat::FORMAT_JSON) {
13991398 result += " [" ;
1400- for (auto const & wd : PWINDOW->m_dWindowDecorations ) {
1399+ for (auto const & wd : PWINDOW->m_windowDecorations ) {
14011400 result += " {\n\" decorationName\" : \" " + wd->getDisplayName () + " \" ,\n\" priority\" : " + std::to_string (wd->getPositioningInfo ().priority ) + " \n }," ;
14021401 }
14031402
14041403 trimTrailingComma (result);
14051404 result += " ]" ;
14061405 } else {
14071406 result = +" Decoration\t Priority\n " ;
1408- for (auto const & wd : PWINDOW->m_dWindowDecorations ) {
1407+ for (auto const & wd : PWINDOW->m_windowDecorations ) {
14091408 result += wd->getDisplayName () + " \t " + std::to_string (wd->getPositioningInfo ().priority ) + " \n " ;
14101409 }
14111410 }
@@ -1794,7 +1793,7 @@ std::string CHyprCtl::getReply(std::string request) {
17941793 }
17951794
17961795 for (auto const & w : g_pCompositor->m_windows ) {
1797- if (!w->m_bIsMapped || !w->m_pWorkspace || !w->m_pWorkspace ->isVisible ())
1796+ if (!w->m_isMapped || !w->m_workspace || !w->m_workspace ->isVisible ())
17981797 continue ;
17991798
18001799 w->updateDynamicRules ();
0 commit comments