aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2012-07-02 04:22:01 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2012-07-02 04:22:01 (GMT)
commit610a15ac47371c5cbd4c2dcf6eec696aec5bb4fa (patch)
tree3287c744b1a3157d8498b4b7f215b386dc50b081 /src
parent940fbca3febe78b788c78d8bb90cdabed78bdf0b (diff)
downloadfluxbox-610a15ac47371c5cbd4c2dcf6eec696aec5bb4fa.zip
fluxbox-610a15ac47371c5cbd4c2dcf6eec696aec5bb4fa.tar.bz2
add fullscreen, maximizedhorizontal, and maximizedvertical tests to ClientPattern
Diffstat (limited to 'src')
-rw-r--r--src/ClientPattern.cc18
-rw-r--r--src/ClientPattern.hh2
2 files changed, 18 insertions, 2 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index f49f7fd..f57513d 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -67,13 +67,17 @@ struct Name2WinProperty {
67 ClientPattern::WinProperty prop; 67 ClientPattern::WinProperty prop;
68}; 68};
69 69
70const Name2WinProperty name_2_winproperties[] = { // sorted for 'bsearch' 70// sorted alphabetically for 'bsearch'
71const Name2WinProperty name_2_winproperties[] = {
71 { "class", ClientPattern::CLASS }, 72 { "class", ClientPattern::CLASS },
72 { "focushidden", ClientPattern::FOCUSHIDDEN }, 73 { "focushidden", ClientPattern::FOCUSHIDDEN },
74 { "fullscreen", ClientPattern::FULLSCREEN },
73 { "head", ClientPattern::HEAD }, 75 { "head", ClientPattern::HEAD },
74 { "iconhidden", ClientPattern::ICONHIDDEN }, 76 { "iconhidden", ClientPattern::ICONHIDDEN },
75 { "layer", ClientPattern::LAYER }, 77 { "layer", ClientPattern::LAYER },
76 { "maximized", ClientPattern::MAXIMIZED }, 78 { "maximized", ClientPattern::MAXIMIZED },
79 { "maximizedhorizontal", ClientPattern::HORZMAX },
80 { "maximizedvertical", ClientPattern::VERTMAX },
77 { "minimized", ClientPattern::MINIMIZED }, 81 { "minimized", ClientPattern::MINIMIZED },
78 { "name", ClientPattern::NAME }, 82 { "name", ClientPattern::NAME },
79 { "role", ClientPattern::ROLE }, 83 { "role", ClientPattern::ROLE },
@@ -132,6 +136,9 @@ Prop2String property_2_strings[] = { // sorted by 'prop'
132 { ClientPattern::URGENT, "urgent" }, 136 { ClientPattern::URGENT, "urgent" },
133 { ClientPattern::SCREEN, "screen" }, 137 { ClientPattern::SCREEN, "screen" },
134 { ClientPattern::XPROP, "@" }, 138 { ClientPattern::XPROP, "@" },
139 { ClientPattern::FULLSCREEN, "fullscreen" },
140 { ClientPattern::VERTMAX, "maximizedvertical" },
141 { ClientPattern::HORZMAX, "maximizedhorizontal" },
135}; 142};
136 143
137 144
@@ -411,6 +418,15 @@ FbTk::FbString ClientPattern::getProperty(WinProperty prop, const Focusable &cli
411 case MINIMIZED: 418 case MINIMIZED:
412 result = (fbwin && fbwin->isIconic()) ? "yes" : "no"; 419 result = (fbwin && fbwin->isIconic()) ? "yes" : "no";
413 break; 420 break;
421 case FULLSCREEN:
422 result = (fbwin && fbwin->isFullscreen()) ? "yes" : "no";
423 break;
424 case VERTMAX:
425 result = (fbwin && fbwin->isMaximizedVert()) ? "yes" : "no";
426 break;
427 case HORZMAX:
428 result = (fbwin && fbwin->isMaximizedHorz()) ? "yes" : "no";
429 break;
414 case SHADED: 430 case SHADED:
415 result = (fbwin && fbwin->isShaded()) ? "yes" : "no"; 431 result = (fbwin && fbwin->isShaded()) ? "yes" : "no";
416 break; 432 break;
diff --git a/src/ClientPattern.hh b/src/ClientPattern.hh
index 315edb1..a5b7206 100644
--- a/src/ClientPattern.hh
+++ b/src/ClientPattern.hh
@@ -55,7 +55,7 @@ public:
55 TITLE = 0, CLASS, NAME, ROLE, TRANSIENT, 55 TITLE = 0, CLASS, NAME, ROLE, TRANSIENT,
56 MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN, 56 MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN,
57 WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN, 57 WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN,
58 XPROP 58 XPROP, FULLSCREEN, VERTMAX, HORZMAX
59 }; 59 };
60 60
61 /// Does this client match this pattern? 61 /// Does this client match this pattern?