add fullscreen, maximizedhorizontal, and maximizedvertical tests to ClientPattern
Mark Tiefenbruck mark@fluxbox.org
3 files changed,
27 insertions(+),
2 deletions(-)
M
doc/asciidoc/client-patterns.txt
→
doc/asciidoc/client-patterns.txt
@@ -32,9 +32,18 @@ (typically, a popup dialog) or not.
*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.
M
src/ClientPattern.cc
→
src/ClientPattern.cc
@@ -67,13 +67,17 @@ const char* name;
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 @@ { ClientPattern::LAYER, "layer" },
{ ClientPattern::URGENT, "urgent" }, { ClientPattern::SCREEN, "screen" }, { ClientPattern::XPROP, "@" }, + { ClientPattern::FULLSCREEN, "fullscreen" }, + { ClientPattern::VERTMAX, "maximizedvertical" }, + { ClientPattern::HORZMAX, "maximizedhorizontal" }, };@@ -410,6 +417,15 @@ result = (fbwin && fbwin->isMaximized()) ? "yes" : "no";
break; 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";
M
src/ClientPattern.hh
→
src/ClientPattern.hh
@@ -55,7 +55,7 @@ enum WinProperty {
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?