Created
June 17, 2014 02:43
-
-
Save jrziviani/853666a6050ce4c1f051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int nonFloatingWindows = 0; | |
using lbPair = std::pair<const long unsigned int, | |
std::unique_ptr<IWindow>>; | |
// couting only non-floating windows to calcule the areas | |
// for tiling them. | |
std::for_each( | |
_desktops[_currentDesktop].begin(), | |
_desktops[_currentDesktop].end(), | |
// lambda - use nonFloatingWindows variable as | |
// reference, it will be incresead if the window is | |
// not floating | |
[&nonFloatingWindows](lbPair& wnd) | |
{ | |
if (!wnd.second->floating()) | |
++nonFloatingWindows; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment