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*;;
|
*Maximized*;;
|
||||||
Either *yes* or *no*, depending on whether the window is maximized or
|
Either *yes* or *no*, depending on whether the window is maximized or
|
||||||
not.
|
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*;;
|
*Minimized*;;
|
||||||
Either *yes* or *no*, depending on whether the window is minimized
|
Either *yes* or *no*, depending on whether the window is minimized
|
||||||
(iconified) or not.
|
(iconified) or not.
|
||||||
|
*Fullscreen*;;
|
||||||
|
Either *yes* or *no*, depending on whether the window is fullscreen or
|
||||||
|
not.
|
||||||
*Shaded*;;
|
*Shaded*;;
|
||||||
Either *yes* or *no*, depending on whether the window is shaded or
|
Either *yes* or *no*, depending on whether the window is shaded or
|
||||||
not.
|
not.
|
||||||
|
|
|
@ -67,13 +67,17 @@ struct Name2WinProperty {
|
||||||
ClientPattern::WinProperty prop;
|
ClientPattern::WinProperty prop;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Name2WinProperty name_2_winproperties[] = { // sorted for 'bsearch'
|
// sorted alphabetically for 'bsearch'
|
||||||
|
const Name2WinProperty name_2_winproperties[] = {
|
||||||
{ "class", ClientPattern::CLASS },
|
{ "class", ClientPattern::CLASS },
|
||||||
{ "focushidden", ClientPattern::FOCUSHIDDEN },
|
{ "focushidden", ClientPattern::FOCUSHIDDEN },
|
||||||
|
{ "fullscreen", ClientPattern::FULLSCREEN },
|
||||||
{ "head", ClientPattern::HEAD },
|
{ "head", ClientPattern::HEAD },
|
||||||
{ "iconhidden", ClientPattern::ICONHIDDEN },
|
{ "iconhidden", ClientPattern::ICONHIDDEN },
|
||||||
{ "layer", ClientPattern::LAYER },
|
{ "layer", ClientPattern::LAYER },
|
||||||
{ "maximized", ClientPattern::MAXIMIZED },
|
{ "maximized", ClientPattern::MAXIMIZED },
|
||||||
|
{ "maximizedhorizontal", ClientPattern::HORZMAX },
|
||||||
|
{ "maximizedvertical", ClientPattern::VERTMAX },
|
||||||
{ "minimized", ClientPattern::MINIMIZED },
|
{ "minimized", ClientPattern::MINIMIZED },
|
||||||
{ "name", ClientPattern::NAME },
|
{ "name", ClientPattern::NAME },
|
||||||
{ "role", ClientPattern::ROLE },
|
{ "role", ClientPattern::ROLE },
|
||||||
|
@ -132,6 +136,9 @@ Prop2String property_2_strings[] = { // sorted by 'prop'
|
||||||
{ ClientPattern::URGENT, "urgent" },
|
{ ClientPattern::URGENT, "urgent" },
|
||||||
{ ClientPattern::SCREEN, "screen" },
|
{ ClientPattern::SCREEN, "screen" },
|
||||||
{ ClientPattern::XPROP, "@" },
|
{ 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:
|
case MINIMIZED:
|
||||||
result = (fbwin && fbwin->isIconic()) ? "yes" : "no";
|
result = (fbwin && fbwin->isIconic()) ? "yes" : "no";
|
||||||
break;
|
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:
|
case SHADED:
|
||||||
result = (fbwin && fbwin->isShaded()) ? "yes" : "no";
|
result = (fbwin && fbwin->isShaded()) ? "yes" : "no";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
TITLE = 0, CLASS, NAME, ROLE, TRANSIENT,
|
TITLE = 0, CLASS, NAME, ROLE, TRANSIENT,
|
||||||
MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN,
|
MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN,
|
||||||
WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN,
|
WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN,
|
||||||
XPROP
|
XPROP, FULLSCREEN, VERTMAX, HORZMAX
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Does this client match this pattern?
|
/// Does this client match this pattern?
|
||||||
|
|
Loading…
Reference in a new issue