all repos — fluxbox @ 2e0fba32533f505e5121e7506de8987ac12c2cdc

custom fork of the fluxbox windowmanager

workspace area signal
fluxgen fluxgen
commit

2e0fba32533f505e5121e7506de8987ac12c2cdc

parent

df5d6f30e27eb058c71cf4f3b80e358f35260a2d

2 files changed, 24 insertions(+), 11 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.261 2004/01/16 11:47:07 fluxgen Exp $ +// $Id: Screen.cc,v 1.262 2004/01/19 18:29:43 fluxgen Exp $ #include "Screen.hh"

@@ -386,6 +386,7 @@ m_clientlist_sig(*this), // client signal

m_iconlist_sig(*this), // icon list signal m_workspacecount_sig(*this), // workspace count signal m_workspacenames_sig(*this), // workspace names signal + m_workspace_area_sig(*this), // workspace area signal m_currentworkspace_sig(*this), // current workspace signal m_reconfigure_sig(*this), // reconfigure signal m_resize_sig(*this),

@@ -1078,10 +1079,10 @@ workspacemenu->setItemSelected(currentWorkspace()->workspaceID() + 2, true);

// This is a little tricks to reduce flicker // this way we can set focus pixmap on frame before we show it // and using ExposeEvent to redraw without flicker - /* - WinClient *win = getLastFocusedWindow(currentWorkspaceID()); - if (win && win->fbwindow()) - win->fbwindow()->setFocusFlag(true); + /* + WinClient *win = getLastFocusedWindow(currentWorkspaceID()); + if (win && win->fbwindow()) + win->fbwindow()->setFocusFlag(true); */ currentWorkspace()->showAll();

@@ -1095,6 +1096,7 @@ if (focused && focused->isMoving())

focused->resumeMoving(); updateNetizenCurrentWorkspace(); + FbTk::App::instance()->sync(false); }

@@ -1210,8 +1212,6 @@ Netizens::iterator it_end = m_netizen_list.end();

for (; it != it_end; ++it) { (*it)->sendWindowAdd(w, p); } - - m_clientlist_sig.notify(); }

@@ -1355,6 +1355,8 @@ if (!win->isIconic() && (win->workspaceNumber() == currentWorkspaceID() || win->isStuck())) {

win->show(); } + m_clientlist_sig.notify(); + FbTk::App::instance()->sync(false); return win; }

@@ -1378,6 +1380,8 @@ Fluxbox::instance()->attachSignals(*win);

// winclient actions should have been setup when the WinClient was created if (win->workspaceNumber() == currentWorkspaceID() || win->isStuck()) win->show(); + + m_clientlist_sig.notify(); return win; }

@@ -1418,18 +1422,23 @@ private:

Strut &m_max_area; }; -}; // end anonymous namespace +} // end anonymous namespace void BScreen::updateAvailableWorkspaceArea() { // find max of left, right, top and bottom and set avaible workspace area // clear old area + Strut oldarea = *(m_available_workspace_area.get()); m_available_workspace_area.reset(new Strut(0, 0, 0, 0)); // calculate max area for_each(m_strutlist.begin(), m_strutlist.end(), MaxArea(*m_available_workspace_area.get())); + + // only notify if the area changed + if (oldarea == *(m_available_workspace_area.get())) + m_workspace_area_sig.notify(); } void BScreen::addWorkspaceName(const char *name) {

@@ -2390,7 +2399,8 @@ return (!win ||

(opts & CYCLESKIPSTUCK) != 0 && win->isStuck() || // skip if stuck // skip if not active client (i.e. only visit each fbwin once) (opts & CYCLEGROUPS) != 0 && win->winClient().window() != winclient.window() || - (opts & CYCLESKIPSHADED) != 0 && win->isShaded() // skip if shaded + (opts & CYCLESKIPSHADED) != 0 && win->isShaded() || // skip if shaded + win->isHidden() ); }
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.133 2004/01/16 11:58:45 fluxgen Exp $ +// $Id: Screen.hh,v 1.134 2004/01/19 18:28:58 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -136,7 +136,7 @@ unsigned int maxBottom(int head) const;

inline unsigned int width() const { return rootWindow().width(); } inline unsigned int height() const { return rootWindow().height(); } - inline unsigned int screenNumber() const { return rootWindow().screenNumber(); } + inline int screenNumber() const { return rootWindow().screenNumber(); } /// @return number of workspaces inline unsigned int getCount() const { return m_workspaces_list.size(); }

@@ -162,6 +162,8 @@ /// workspace count signal

FbTk::Subject &workspaceCountSig() { return m_workspacecount_sig; } /// workspace names signal FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; } + /// workspace area signal + FbTk::Subject &workspaceAreaSig() { return m_workspace_area_sig; } /// current workspace signal FbTk::Subject &currentWorkspaceSig() { return m_currentworkspace_sig; } /// reconfigure signal

@@ -360,6 +362,7 @@ m_clientlist_sig, ///< client signal

m_iconlist_sig, ///< notify if a window gets iconified/deiconified m_workspacecount_sig, ///< workspace count signal m_workspacenames_sig, ///< workspace names signal + m_workspace_area_sig, ///< workspace area changed signal m_currentworkspace_sig, ///< current workspace signal m_reconfigure_sig, ///< reconfigure signal m_resize_sig; ///< resize signal