diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index bd1a919..d5379da 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.223 2003/08/22 15:03:28 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.224 2003/08/24 11:13:36 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -689,7 +689,7 @@ void BScreen::rereadMenu() { | |||
689 | 689 | ||
690 | 690 | ||
691 | void BScreen::removeWorkspaceNames() { | 691 | void BScreen::removeWorkspaceNames() { |
692 | m_workspace_names.erase(m_workspace_names.begin(), m_workspace_names.end()); | 692 | m_workspace_names.clear(); |
693 | } | 693 | } |
694 | 694 | ||
695 | void BScreen::updateWorkspaceNamesAtom() { | 695 | void BScreen::updateWorkspaceNamesAtom() { |
@@ -935,7 +935,7 @@ void BScreen::addNetizen(Window win) { | |||
935 | Workspace::Windows::iterator win_it_end = (*it)->windowList().end(); | 935 | Workspace::Windows::iterator win_it_end = (*it)->windowList().end(); |
936 | for (; win_it != win_it_end; ++win_it) { | 936 | for (; win_it != win_it_end; ++win_it) { |
937 | net->sendWindowAdd((*win_it)->clientWindow(), | 937 | net->sendWindowAdd((*win_it)->clientWindow(), |
938 | (*it)->workspaceID()); | 938 | (*it)->workspaceID()); |
939 | } | 939 | } |
940 | } | 940 | } |
941 | 941 | ||
@@ -976,15 +976,11 @@ void BScreen::updateNetizenWorkspaceCount() { | |||
976 | 976 | ||
977 | 977 | ||
978 | void BScreen::updateNetizenWindowFocus() { | 978 | void BScreen::updateNetizenWindowFocus() { |
979 | |||
980 | Netizens::iterator it = m_netizen_list.begin(); | ||
981 | Netizens::iterator it_end = m_netizen_list.end(); | ||
982 | Window f = ((Fluxbox::instance()->getFocusedWindow()) ? | 979 | Window f = ((Fluxbox::instance()->getFocusedWindow()) ? |
983 | Fluxbox::instance()->getFocusedWindow()->window() : None); | 980 | Fluxbox::instance()->getFocusedWindow()->window() : None); |
984 | for (; it != it_end; ++it) { | 981 | for_each(m_netizen_list.begin(), |
985 | (*it)->sendWindowFocus(f); | 982 | m_netizen_list.end(), |
986 | } | 983 | bind2nd(mem_fun(&Netizen::sendWindowFocus), f)); |
987 | |||
988 | } | 984 | } |
989 | 985 | ||
990 | 986 | ||
@@ -1001,40 +997,32 @@ void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) { | |||
1001 | 997 | ||
1002 | 998 | ||
1003 | void BScreen::updateNetizenWindowDel(Window w) { | 999 | void BScreen::updateNetizenWindowDel(Window w) { |
1004 | Netizens::iterator it = m_netizen_list.begin(); | 1000 | for_each(m_netizen_list.begin(), |
1005 | Netizens::iterator it_end = m_netizen_list.end(); | 1001 | m_netizen_list.end(), |
1006 | for (; it != it_end; ++it) { | 1002 | bind2nd(mem_fun(&Netizen::sendWindowDel), w)); |
1007 | (*it)->sendWindowDel(w); | ||
1008 | } | ||
1009 | 1003 | ||
1010 | m_clientlist_sig.notify(); | 1004 | m_clientlist_sig.notify(); |
1011 | } | 1005 | } |
1012 | 1006 | ||
1013 | 1007 | ||
1014 | void BScreen::updateNetizenWindowRaise(Window w) { | 1008 | void BScreen::updateNetizenWindowRaise(Window w) { |
1015 | Netizens::iterator it = m_netizen_list.begin(); | 1009 | for_each(m_netizen_list.begin(), |
1016 | Netizens::iterator it_end = m_netizen_list.end(); | 1010 | m_netizen_list.end(), |
1017 | for (; it != it_end; ++it) { | 1011 | bind2nd(mem_fun(&Netizen::sendWindowRaise), w)); |
1018 | (*it)->sendWindowRaise(w); | ||
1019 | } | ||
1020 | } | 1012 | } |
1021 | 1013 | ||
1022 | 1014 | ||
1023 | void BScreen::updateNetizenWindowLower(Window w) { | 1015 | void BScreen::updateNetizenWindowLower(Window w) { |
1024 | Netizens::iterator it = m_netizen_list.begin(); | 1016 | for_each(m_netizen_list.begin(), |
1025 | Netizens::iterator it_end = m_netizen_list.end(); | 1017 | m_netizen_list.end(), |
1026 | for (; it != it_end; ++it) { | 1018 | bind2nd(mem_fun(&Netizen::sendWindowLower), w)); |
1027 | (*it)->sendWindowLower(w); | ||
1028 | } | ||
1029 | } | 1019 | } |
1030 | 1020 | ||
1031 | |||
1032 | void BScreen::updateNetizenConfigNotify(XEvent &e) { | 1021 | void BScreen::updateNetizenConfigNotify(XEvent &e) { |
1033 | Netizens::iterator it = m_netizen_list.begin(); | 1022 | Netizens::iterator it = m_netizen_list.begin(); |
1034 | Netizens::iterator it_end = m_netizen_list.end(); | 1023 | Netizens::iterator it_end = m_netizen_list.end(); |
1035 | for (; it != it_end; ++it) { | 1024 | for (; it != it_end; ++it) |
1036 | (*it)->sendConfigNotify(e); | 1025 | (*it)->sendConfigNotify(e); |
1037 | } | ||
1038 | } | 1026 | } |
1039 | 1027 | ||
1040 | FluxboxWindow *BScreen::createWindow(Window client) { | 1028 | FluxboxWindow *BScreen::createWindow(Window client) { |
@@ -1047,7 +1035,7 @@ FluxboxWindow *BScreen::createWindow(Window client) { | |||
1047 | bool iskdedockapp = false; | 1035 | bool iskdedockapp = false; |
1048 | Atom ajunk; | 1036 | Atom ajunk; |
1049 | int ijunk; | 1037 | int ijunk; |
1050 | unsigned long *data = (unsigned long *) 0, uljunk; | 1038 | unsigned long *data = 0, uljunk; |
1051 | Display *disp = FbTk::App::instance()->display(); | 1039 | Display *disp = FbTk::App::instance()->display(); |
1052 | // Check if KDE v2.x dock applet | 1040 | // Check if KDE v2.x dock applet |
1053 | if (XGetWindowProperty(disp, client, | 1041 | if (XGetWindowProperty(disp, client, |
@@ -1185,8 +1173,8 @@ void BScreen::clearStrut(Strut *str) { | |||
1185 | return; | 1173 | return; |
1186 | // find strut and erase it | 1174 | // find strut and erase it |
1187 | std::list<Strut *>::iterator pos = find(m_strutlist.begin(), | 1175 | std::list<Strut *>::iterator pos = find(m_strutlist.begin(), |
1188 | m_strutlist.end(), | 1176 | m_strutlist.end(), |
1189 | str); | 1177 | str); |
1190 | if (pos == m_strutlist.end()) | 1178 | if (pos == m_strutlist.end()) |
1191 | return; | 1179 | return; |
1192 | m_strutlist.erase(pos); | 1180 | m_strutlist.erase(pos); |