aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-19 18:29:43 (GMT)
committerfluxgen <fluxgen>2004-01-19 18:29:43 (GMT)
commit2e0fba32533f505e5121e7506de8987ac12c2cdc (patch)
tree4f465fa6a89ec43ea03c8c19f15280550e53c705 /src/Screen.cc
parentdf5d6f30e27eb058c71cf4f3b80e358f35260a2d (diff)
downloadfluxbox-2e0fba32533f505e5121e7506de8987ac12c2cdc.zip
fluxbox-2e0fba32533f505e5121e7506de8987ac12c2cdc.tar.bz2
workspace area signal
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index a81ee9e..57dead2 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.261 2004/01/16 11:47:07 fluxgen Exp $ 25// $Id: Screen.cc,v 1.262 2004/01/19 18:29:43 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -386,6 +386,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
386 m_iconlist_sig(*this), // icon list signal 386 m_iconlist_sig(*this), // icon list signal
387 m_workspacecount_sig(*this), // workspace count signal 387 m_workspacecount_sig(*this), // workspace count signal
388 m_workspacenames_sig(*this), // workspace names signal 388 m_workspacenames_sig(*this), // workspace names signal
389 m_workspace_area_sig(*this), // workspace area signal
389 m_currentworkspace_sig(*this), // current workspace signal 390 m_currentworkspace_sig(*this), // current workspace signal
390 m_reconfigure_sig(*this), // reconfigure signal 391 m_reconfigure_sig(*this), // reconfigure signal
391 m_resize_sig(*this), 392 m_resize_sig(*this),
@@ -1078,10 +1079,10 @@ void BScreen::changeWorkspaceID(unsigned int id) {
1078 // This is a little tricks to reduce flicker 1079 // This is a little tricks to reduce flicker
1079 // this way we can set focus pixmap on frame before we show it 1080 // this way we can set focus pixmap on frame before we show it
1080 // and using ExposeEvent to redraw without flicker 1081 // and using ExposeEvent to redraw without flicker
1081 /* 1082 /*
1082 WinClient *win = getLastFocusedWindow(currentWorkspaceID()); 1083 WinClient *win = getLastFocusedWindow(currentWorkspaceID());
1083 if (win && win->fbwindow()) 1084 if (win && win->fbwindow())
1084 win->fbwindow()->setFocusFlag(true); 1085 win->fbwindow()->setFocusFlag(true);
1085 */ 1086 */
1086 1087
1087 currentWorkspace()->showAll(); 1088 currentWorkspace()->showAll();
@@ -1095,6 +1096,7 @@ void BScreen::changeWorkspaceID(unsigned int id) {
1095 focused->resumeMoving(); 1096 focused->resumeMoving();
1096 1097
1097 updateNetizenCurrentWorkspace(); 1098 updateNetizenCurrentWorkspace();
1099 FbTk::App::instance()->sync(false);
1098 1100
1099} 1101}
1100 1102
@@ -1210,8 +1212,6 @@ void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) {
1210 for (; it != it_end; ++it) { 1212 for (; it != it_end; ++it) {
1211 (*it)->sendWindowAdd(w, p); 1213 (*it)->sendWindowAdd(w, p);
1212 } 1214 }
1213
1214 m_clientlist_sig.notify();
1215 1215
1216} 1216}
1217 1217
@@ -1355,6 +1355,8 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1355 win->show(); 1355 win->show();
1356 } 1356 }
1357 1357
1358 m_clientlist_sig.notify();
1359
1358 FbTk::App::instance()->sync(false); 1360 FbTk::App::instance()->sync(false);
1359 return win; 1361 return win;
1360} 1362}
@@ -1379,6 +1381,8 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1379 if (win->workspaceNumber() == currentWorkspaceID() || win->isStuck()) 1381 if (win->workspaceNumber() == currentWorkspaceID() || win->isStuck())
1380 win->show(); 1382 win->show();
1381 1383
1384 m_clientlist_sig.notify();
1385
1382 return win; 1386 return win;
1383} 1387}
1384 1388
@@ -1418,18 +1422,23 @@ private:
1418 Strut &m_max_area; 1422 Strut &m_max_area;
1419}; 1423};
1420 1424
1421}; // end anonymous namespace 1425} // end anonymous namespace
1422 1426
1423void BScreen::updateAvailableWorkspaceArea() { 1427void BScreen::updateAvailableWorkspaceArea() {
1424 // find max of left, right, top and bottom and set avaible workspace area 1428 // find max of left, right, top and bottom and set avaible workspace area
1425 1429
1426 // clear old area 1430 // clear old area
1431 Strut oldarea = *(m_available_workspace_area.get());
1427 m_available_workspace_area.reset(new Strut(0, 0, 0, 0)); 1432 m_available_workspace_area.reset(new Strut(0, 0, 0, 0));
1428 1433
1429 // calculate max area 1434 // calculate max area
1430 for_each(m_strutlist.begin(), 1435 for_each(m_strutlist.begin(),
1431 m_strutlist.end(), 1436 m_strutlist.end(),
1432 MaxArea(*m_available_workspace_area.get())); 1437 MaxArea(*m_available_workspace_area.get()));
1438
1439 // only notify if the area changed
1440 if (oldarea == *(m_available_workspace_area.get()))
1441 m_workspace_area_sig.notify();
1433} 1442}
1434 1443
1435void BScreen::addWorkspaceName(const char *name) { 1444void BScreen::addWorkspaceName(const char *name) {
@@ -2390,7 +2399,8 @@ bool BScreen::doSkipWindow(const WinClient &winclient, int opts) {
2390 (opts & CYCLESKIPSTUCK) != 0 && win->isStuck() || // skip if stuck 2399 (opts & CYCLESKIPSTUCK) != 0 && win->isStuck() || // skip if stuck
2391 // skip if not active client (i.e. only visit each fbwin once) 2400 // skip if not active client (i.e. only visit each fbwin once)
2392 (opts & CYCLEGROUPS) != 0 && win->winClient().window() != winclient.window() || 2401 (opts & CYCLEGROUPS) != 0 && win->winClient().window() != winclient.window() ||
2393 (opts & CYCLESKIPSHADED) != 0 && win->isShaded() // skip if shaded 2402 (opts & CYCLESKIPSHADED) != 0 && win->isShaded() || // skip if shaded
2403 win->isHidden()
2394 ); 2404 );
2395} 2405}
2396 2406