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";
|
return (fbwin && fbwin->isIconHidden()) ? "yes" : "no";
|
||||||
break;
|
break;
|
||||||
case WORKSPACE: {
|
case WORKSPACE: {
|
||||||
if (!fbwin)
|
unsigned int wsnum = (fbwin ? fbwin->workspaceNumber() : client.screen().currentWorkspaceID());
|
||||||
return "";
|
|
||||||
char tmpstr[128];
|
char tmpstr[128];
|
||||||
sprintf(tmpstr, "%d", fbwin->workspaceNumber());
|
sprintf(tmpstr, "%d", wsnum);
|
||||||
return std::string(tmpstr);
|
return std::string(tmpstr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WORKSPACENAME: {
|
case WORKSPACENAME: {
|
||||||
if (!fbwin)
|
const Workspace *w = (fbwin ?
|
||||||
return "";
|
client.screen().getWorkspace(fbwin->workspaceNumber()) :
|
||||||
const Workspace *w = client.screen().getWorkspace(fbwin->workspaceNumber());
|
client.screen().currentWorkspace());
|
||||||
return w ? w->name() : "";
|
return w ? w->name() : "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue