aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc106
1 files changed, 0 insertions, 106 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index a87a842..e89db09 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -31,7 +31,6 @@
31#include "Keys.hh" 31#include "Keys.hh"
32#include "Window.hh" 32#include "Window.hh"
33#include "Workspace.hh" 33#include "Workspace.hh"
34#include "Netizen.hh"
35 34
36#include "Layer.hh" 35#include "Layer.hh"
37#include "FocusControl.hh" 36#include "FocusControl.hh"
@@ -520,7 +519,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
520 } 519 }
521 520
522 changeWorkspaceID(first_desktop); 521 changeWorkspaceID(first_desktop);
523 updateNetizenWorkspaceCount();
524 522
525 // we need to load win frame theme before we create any fluxbox window 523 // we need to load win frame theme before we create any fluxbox window
526 // and after we've load the resources 524 // and after we've load the resources
@@ -595,7 +593,6 @@ BScreen::~BScreen() {
595 removeWorkspaceNames(); 593 removeWorkspaceNames();
596 using namespace STLUtil; 594 using namespace STLUtil;
597 destroyAndClear(m_workspaces_list); 595 destroyAndClear(m_workspaces_list);
598 destroyAndClear(m_netizen_list);
599 destroyAndClear(m_managed_resources); 596 destroyAndClear(m_managed_resources);
600 597
601 //why not destroyAndClear(m_icon_list); ? 598 //why not destroyAndClear(m_icon_list); ?
@@ -1204,8 +1201,6 @@ int BScreen::addWorkspace() {
1204 1201
1205 saveWorkspaces(m_workspaces_list.size()); 1202 saveWorkspaces(m_workspaces_list.size());
1206 1203
1207 updateNetizenWorkspaceCount();
1208
1209 return m_workspaces_list.size(); 1204 return m_workspaces_list.size();
1210 1205
1211} 1206}
@@ -1233,7 +1228,6 @@ int BScreen::removeLastWorkspace() {
1233 //remove last workspace 1228 //remove last workspace
1234 m_workspaces_list.pop_back(); 1229 m_workspaces_list.pop_back();
1235 1230
1236 updateNetizenWorkspaceCount();
1237 saveWorkspaces(m_workspaces_list.size()); 1231 saveWorkspaces(m_workspaces_list.size());
1238 // must be deleted after we send notify!! 1232 // must be deleted after we send notify!!
1239 // so we dont get bad pointers somewhere 1233 // so we dont get bad pointers somewhere
@@ -1300,7 +1294,6 @@ void BScreen::changeWorkspaceID(unsigned int id) {
1300 } else 1294 } else
1301 FocusControl::revertFocus(*this); 1295 FocusControl::revertFocus(*this);
1302 1296
1303 updateNetizenCurrentWorkspace();
1304 FbTk::App::instance()->sync(false); 1297 FbTk::App::instance()->sync(false);
1305 1298
1306} 1299}
@@ -1348,105 +1341,6 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS
1348} 1341}
1349 1342
1350 1343
1351void BScreen::addNetizen(Window win) {
1352 Netizen *net = new Netizen(*this, win);
1353 m_netizen_list.push_back(net);
1354
1355 net->sendWorkspaceCount();
1356 net->sendCurrentWorkspace();
1357
1358 // send all windows to netizen
1359 Workspaces::iterator it = m_workspaces_list.begin();
1360 Workspaces::iterator it_end = m_workspaces_list.end();
1361 for (; it != it_end; ++it) {
1362 Workspace::Windows::iterator win_it = (*it)->windowList().begin();
1363 Workspace::Windows::iterator win_it_end = (*it)->windowList().end();
1364 for (; win_it != win_it_end; ++win_it) {
1365 net->sendWindowAdd((*win_it)->clientWindow(),
1366 (*it)->workspaceID());
1367 }
1368 }
1369
1370 Window f = ((FocusControl::focusedWindow()) ?
1371 FocusControl::focusedWindow()->window() : None);
1372 net->sendWindowFocus(f);
1373}
1374
1375void BScreen::removeNetizen(Window w) {
1376 Netizens::iterator it = m_netizen_list.begin();
1377 Netizens::iterator it_end = m_netizen_list.end();
1378 for (; it != it_end; ++it) {
1379 if ((*it)->window() == w) {
1380 Netizen *n = *it;
1381 delete n;
1382 m_netizen_list.erase(it);
1383 break;
1384 }
1385 }
1386}
1387
1388
1389void BScreen::updateNetizenCurrentWorkspace() {
1390 m_currentworkspace_sig.notify();
1391 for_each(m_netizen_list.begin(),
1392 m_netizen_list.end(),
1393 mem_fun(&Netizen::sendCurrentWorkspace));
1394}
1395
1396
1397void BScreen::updateNetizenWorkspaceCount() {
1398 for_each(m_netizen_list.begin(),
1399 m_netizen_list.end(),
1400 mem_fun(&Netizen::sendWorkspaceCount));
1401 m_workspacecount_sig.notify();
1402}
1403
1404
1405void BScreen::updateNetizenWindowFocus() {
1406 Window f = ((FocusControl::focusedWindow()) ?
1407 FocusControl::focusedWindow()->window() : None);
1408 for_each(m_netizen_list.begin(),
1409 m_netizen_list.end(),
1410 bind2nd(mem_fun(&Netizen::sendWindowFocus), f));
1411}
1412
1413
1414void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) {
1415 Netizens::iterator it = m_netizen_list.begin();
1416 Netizens::iterator it_end = m_netizen_list.end();
1417 for (; it != it_end; ++it) {
1418 (*it)->sendWindowAdd(w, p);
1419 }
1420}
1421
1422
1423void BScreen::updateNetizenWindowDel(Window w) {
1424 for_each(m_netizen_list.begin(),
1425 m_netizen_list.end(),
1426 bind2nd(mem_fun(&Netizen::sendWindowDel), w));
1427}
1428
1429
1430void BScreen::updateNetizenWindowRaise(Window w) {
1431 for_each(m_netizen_list.begin(),
1432 m_netizen_list.end(),
1433 bind2nd(mem_fun(&Netizen::sendWindowRaise), w));
1434}
1435
1436
1437void BScreen::updateNetizenWindowLower(Window w) {
1438 for_each(m_netizen_list.begin(),
1439 m_netizen_list.end(),
1440 bind2nd(mem_fun(&Netizen::sendWindowLower), w));
1441}
1442
1443void BScreen::updateNetizenConfigNotify(XEvent &e) {
1444 Netizens::iterator it = m_netizen_list.begin();
1445 Netizens::iterator it_end = m_netizen_list.end();
1446 for (; it != it_end; ++it)
1447 (*it)->sendConfigNotify(e);
1448}
1449
1450bool BScreen::isKdeDockapp(Window client) const { 1344bool BScreen::isKdeDockapp(Window client) const {
1451 //Check and see if client is KDE dock applet. 1345 //Check and see if client is KDE dock applet.
1452 bool iskdedockapp = false; 1346 bool iskdedockapp = false;