add fullscreen, maximizedhorizontal, and maximizedvertical tests to ClientPattern
This commit is contained in:
parent
940fbca3fe
commit
610a15ac47
3 changed files with 27 additions and 2 deletions
|
@ -32,9 +32,18 @@ The following values are accepted for 'propertyname':::
|
|||
*Maximized*;;
|
||||
Either *yes* or *no*, depending on whether the window is maximized or
|
||||
not.
|
||||
*MaximizedHorizontal*;;
|
||||
Either *yes* or *no*, depending on whether the window is maximized
|
||||
horizontally or not.
|
||||
*MaximizedVertical*;;
|
||||
Either *yes* or *no*, depending on whether the window is maximized
|
||||
vertically or not.
|
||||
*Minimized*;;
|
||||
Either *yes* or *no*, depending on whether the window is minimized
|
||||
(iconified) or not.
|
||||
*Fullscreen*;;
|
||||
Either *yes* or *no*, depending on whether the window is fullscreen or
|
||||
not.
|
||||
*Shaded*;;
|
||||
Either *yes* or *no*, depending on whether the window is shaded or
|
||||
not.
|
||||
|
|
|
@ -67,13 +67,17 @@ struct Name2WinProperty {
|
|||
ClientPattern::WinProperty prop;
|
||||
};
|
||||
|
||||
const Name2WinProperty name_2_winproperties[] = { // sorted for 'bsearch'
|
||||
// sorted alphabetically for 'bsearch'
|
||||
const Name2WinProperty name_2_winproperties[] = {
|
||||
{ "class", ClientPattern::CLASS },
|
||||
{ "focushidden", ClientPattern::FOCUSHIDDEN },
|
||||
{ "fullscreen", ClientPattern::FULLSCREEN },
|
||||
{ "head", ClientPattern::HEAD },
|
||||
{ "iconhidden", ClientPattern::ICONHIDDEN },
|
||||
{ "layer", ClientPattern::LAYER },
|
||||
{ "maximized", ClientPattern::MAXIMIZED },
|
||||
{ "maximizedhorizontal", ClientPattern::HORZMAX },
|
||||
{ "maximizedvertical", ClientPattern::VERTMAX },
|
||||
{ "minimized", ClientPattern::MINIMIZED },
|
||||
{ "name", ClientPattern::NAME },
|
||||
{ "role", ClientPattern::ROLE },
|
||||
|
@ -132,6 +136,9 @@ Prop2String property_2_strings[] = { // sorted by 'prop'
|
|||
{ ClientPattern::URGENT, "urgent" },
|
||||
{ ClientPattern::SCREEN, "screen" },
|
||||
{ ClientPattern::XPROP, "@" },
|
||||
{ ClientPattern::FULLSCREEN, "fullscreen" },
|
||||
{ ClientPattern::VERTMAX, "maximizedvertical" },
|
||||
{ ClientPattern::HORZMAX, "maximizedhorizontal" },
|
||||
};
|
||||
|
||||
|
||||
|
@ -411,6 +418,15 @@ FbTk::FbString ClientPattern::getProperty(WinProperty prop, const Focusable &cli
|
|||
case MINIMIZED:
|
||||
result = (fbwin && fbwin->isIconic()) ? "yes" : "no";
|
||||
break;
|
||||
case FULLSCREEN:
|
||||
result = (fbwin && fbwin->isFullscreen()) ? "yes" : "no";
|
||||
break;
|
||||
case VERTMAX:
|
||||
result = (fbwin && fbwin->isMaximizedVert()) ? "yes" : "no";
|
||||
break;
|
||||
case HORZMAX:
|
||||
result = (fbwin && fbwin->isMaximizedHorz()) ? "yes" : "no";
|
||||
break;
|
||||
case SHADED:
|
||||
result = (fbwin && fbwin->isShaded()) ? "yes" : "no";
|
||||
break;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
TITLE = 0, CLASS, NAME, ROLE, TRANSIENT,
|
||||
MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN,
|
||||
WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN,
|
||||
XPROP
|
||||
XPROP, FULLSCREEN, VERTMAX, HORZMAX
|
||||
};
|
||||
|
||||
/// Does this client match this pattern?
|
||||
|
|
Loading…
Reference in a new issue