summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ClientPattern.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index 6a19f2f..72bf161 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -378,17 +378,16 @@ string ClientPattern::getProperty(WinProperty prop, const Focusable &client) {
378 return (fbwin && fbwin->isIconHidden()) ? "yes" : "no"; 378 return (fbwin && fbwin->isIconHidden()) ? "yes" : "no";
379 break; 379 break;
380 case WORKSPACE: { 380 case WORKSPACE: {
381 if (!fbwin) 381 unsigned int wsnum = (fbwin ? fbwin->workspaceNumber() : client.screen().currentWorkspaceID());
382 return "";
383 char tmpstr[128]; 382 char tmpstr[128];
384 sprintf(tmpstr, "%d", fbwin->workspaceNumber()); 383 sprintf(tmpstr, "%d", wsnum);
385 return std::string(tmpstr); 384 return std::string(tmpstr);
386 break; 385 break;
387 } 386 }
388 case WORKSPACENAME: { 387 case WORKSPACENAME: {
389 if (!fbwin) 388 const Workspace *w = (fbwin ?
390 return ""; 389 client.screen().getWorkspace(fbwin->workspaceNumber()) :
391 const Workspace *w = client.screen().getWorkspace(fbwin->workspaceNumber()); 390 client.screen().currentWorkspace());
392 return w ? w->name() : ""; 391 return w ? w->name() : "";
393 break; 392 break;
394 } 393 }