aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index b83296e..36ab193 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -69,6 +69,8 @@
69#include "FbTk/ImageControl.hh" 69#include "FbTk/ImageControl.hh"
70#include "FbTk/EventManager.hh" 70#include "FbTk/EventManager.hh"
71#include "FbTk/Transparent.hh" 71#include "FbTk/Transparent.hh"
72#include "FbTk/Select2nd.hh"
73#include "FbTk/Compose.hh"
72 74
73//use GNU extensions 75//use GNU extensions
74#ifndef _GNU_SOURCE 76#ifndef _GNU_SOURCE
@@ -830,16 +832,17 @@ void BScreen::removeClient(WinClient &client) {
830 for_each(getWorkspacesList().begin(), getWorkspacesList().end(), 832 for_each(getWorkspacesList().begin(), getWorkspacesList().end(),
831 mem_fun(&Workspace::updateClientmenu)); 833 mem_fun(&Workspace::updateClientmenu));
832 834
835 using namespace FbTk;
836
833 // remove any grouping this is expecting 837 // remove any grouping this is expecting
834 Groupables::iterator it = m_expecting_groups.begin(); 838 Groupables::iterator erase_it = find_if(m_expecting_groups.begin(),
835 Groupables::iterator it_end = m_expecting_groups.end(); 839 m_expecting_groups.end(),
836 for (; it != it_end; ++it) { 840 Compose(bind2nd(equal_to<WinClient *>(), &client),
837 if (it->second == &client) { 841 Select2nd<Groupables::value_type>()));
838 m_expecting_groups.erase(it); 842
839 // it should only be in there a maximum of once 843 if (erase_it != m_expecting_groups.end())
840 break; 844 m_expecting_groups.erase(erase_it);
841 } 845
842 }
843 // the client could be on icon menu so we update it 846 // the client could be on icon menu so we update it
844 //!! TODO: check this with the new icon menu 847 //!! TODO: check this with the new icon menu
845 // updateIconMenu(); 848 // updateIconMenu();
@@ -1711,14 +1714,12 @@ void BScreen::addConfigMenu(const char *label, FbTk::Menu &menu) {
1711} 1714}
1712 1715
1713void BScreen::removeConfigMenu(FbTk::Menu &menu) { 1716void BScreen::removeConfigMenu(FbTk::Menu &menu) {
1714 Configmenus::iterator it = m_configmenu_list.begin(); 1717 Configmenus::iterator erase_it = find_if(m_configmenu_list.begin(),
1715 Configmenus::iterator it_end = m_configmenu_list.end(); 1718 m_configmenu_list.end(),
1716 for (; it != it_end; ++it) { 1719 FbTk::Compose(bind2nd(equal_to<FbTk::Menu *>(), &menu),
1717 if (it->second == &menu) { 1720 FbTk::Select2nd<Configmenus::value_type>()));
1718 m_configmenu_list.erase(it); 1721 if (erase_it != m_configmenu_list.end())
1719 break; 1722 m_configmenu_list.erase(erase_it);
1720 }
1721 }
1722 setupConfigmenu(*m_configmenu.get()); 1723 setupConfigmenu(*m_configmenu.get());
1723 1724
1724} 1725}