aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2009-06-25 10:18:27 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2009-06-25 10:18:27 (GMT)
commit02e0f9321cce4f331ce2523621830e3102c04493 (patch)
treeeef4378a03e8568d961a1c16d29479c25362ea3c /src/ClientPattern.cc
parented28c69b8d7eb68cb12ec4b4456770ce55def69d (diff)
downloadfluxbox-02e0f9321cce4f331ce2523621830e3102c04493.zip
fluxbox-02e0f9321cce4f331ce2523621830e3102c04493.tar.bz2
use current workspace in ClientPattern when client has no FbWindow
Diffstat (limited to 'src/ClientPattern.cc')
-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 }