use current workspace in ClientPattern when client has no FbWindow
This commit is contained in:
parent
ed28c69b8d
commit
02e0f9321c
1 changed files with 5 additions and 6 deletions
|
@ -378,17 +378,16 @@ string ClientPattern::getProperty(WinProperty prop, const Focusable &client) {
|
|||
return (fbwin && fbwin->isIconHidden()) ? "yes" : "no";
|
||||
break;
|
||||
case WORKSPACE: {
|
||||
if (!fbwin)
|
||||
return "";
|
||||
unsigned int wsnum = (fbwin ? fbwin->workspaceNumber() : client.screen().currentWorkspaceID());
|
||||
char tmpstr[128];
|
||||
sprintf(tmpstr, "%d", fbwin->workspaceNumber());
|
||||
sprintf(tmpstr, "%d", wsnum);
|
||||
return std::string(tmpstr);
|
||||
break;
|
||||
}
|
||||
case WORKSPACENAME: {
|
||||
if (!fbwin)
|
||||
return "";
|
||||
const Workspace *w = client.screen().getWorkspace(fbwin->workspaceNumber());
|
||||
const Workspace *w = (fbwin ?
|
||||
client.screen().getWorkspace(fbwin->workspaceNumber()) :
|
||||
client.screen().currentWorkspace());
|
||||
return w ? w->name() : "";
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue