all repos — fluxbox @ 17c41e5bacb70bbe2910ec3bd967343236a437db

custom fork of the fluxbox windowmanager

added hidden state to remember, patch from akira
fluxgen fluxgen
commit

17c41e5bacb70bbe2910ec3bd967343236a437db

parent

c0cf1d918bd4a8b21ae57f79c570a534866795e7

3 files changed, 40 insertions(+), 15 deletions(-)

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

@@ -20,7 +20,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: IconbarTool.cc,v 1.32 2004/01/21 14:13:57 fluxgen Exp $ +// $Id: IconbarTool.cc,v 1.33 2004/02/16 10:26:03 fluxgen Exp $ #include "IconbarTool.hh"

@@ -682,7 +682,7 @@ }

void IconbarTool::addWindow(FluxboxWindow &win) { // we just want windows that has clients - if (win.clientList().empty()) + if (win.clientList().empty() || win.isHidden() ) return; IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win);
M src/Remember.ccsrc/Remember.cc

@@ -21,7 +21,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: Remember.cc,v 1.33 2003/12/19 00:48:41 fluxgen Exp $ +// $Id: Remember.cc,v 1.34 2004/02/16 10:25:33 fluxgen Exp $ #include "Remember.hh" #include "ClientPattern.hh"

@@ -208,15 +208,16 @@ Application::Application(bool grouped)

: is_grouped(grouped), group(0) { - workspace_remember = + decostate_remember = dimensions_remember = + hiddenstate_remember = + jumpworkspace_remember = + layer_remember = position_remember = - stuckstate_remember = - decostate_remember = shadedstate_remember = + stuckstate_remember = tabstate_remember = - jumpworkspace_remember = - layer_remember = + workspace_remember = save_on_close_remember = false; }

@@ -363,6 +364,8 @@ } else if (str_key == "Shaded") {

app.rememberShadedstate((str_label=="yes")); } else if (str_key == "Tab") { app.rememberTabstate((str_label=="yes")); + } else if (str_key == "Hidden") { + app.rememberHiddenstate((str_label=="yes")); } else if (str_key == "Deco") { if (str_label == "NONE") { app.rememberDecostate((unsigned int) 0);

@@ -545,6 +548,9 @@ }

if (a.tabstate_remember) { apps_file << " [Tab]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; } + if (a.hiddenstate_remember) { + apps_file << " [Hidden]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; + } if (a.decostate_remember) { switch (a.decostate) { case (0) :

@@ -601,6 +607,9 @@ break;

case REM_POSITION: return app->position_remember; break; + case REM_HIDDENSTATE: + return app->hiddenstate_remember; + break; case REM_STUCKSTATE: return app->stuckstate_remember; break;

@@ -646,6 +655,9 @@ break;

case REM_POSITION: app->rememberPosition(win->x(), win->y()); break; + case REM_HIDDENSTATE: + app->rememberHiddenstate(win->isHidden()); + break; case REM_SHADEDSTATE: app->rememberShadedstate(win->isShaded()); break;

@@ -690,6 +702,9 @@ app->forgetDimensions();

break; case REM_POSITION: app->forgetPosition(); + break; + case REM_HIDDENSTATE: + app->forgetHiddenstate(); break; case REM_STUCKSTATE: app->forgetStuckstate();

@@ -794,6 +809,8 @@ // if inconsistent...

if (win.isStuck() && !app->stuckstate || !win.isStuck() && app->stuckstate) win.stick(); // toggles + if (app->hiddenstate_remember) + win.setHidden(true); if (app->layer_remember) win.moveToLayer(app->layer);
M src/Remember.hhsrc/Remember.hh

@@ -21,7 +21,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: Remember.hh,v 1.14 2004/01/19 18:26:25 fluxgen Exp $ +// $Id: Remember.hh,v 1.15 2004/02/16 10:25:34 fluxgen Exp $ /* Based on the original "Remember patch" by Xavier Brouckaert */

@@ -50,6 +50,7 @@ inline void forgetPosition() { position_remember = false; }

inline void forgetShadedstate() { shadedstate_remember = false; } inline void forgetTabstate() { tabstate_remember = false; } inline void forgetDecostate() { decostate_remember = false; } + inline void forgetHiddenstate() { hiddenstate_remember= false; } inline void forgetStuckstate() { stuckstate_remember = false; } inline void forgetJumpworkspace() { jumpworkspace_remember = false; } inline void forgetLayer() { layer_remember = false; }

@@ -59,6 +60,9 @@ inline void rememberWorkspace(int ws)

{ workspace = ws; workspace_remember = true; } inline void rememberDimensions(int width, int height) { w = width; h = height; dimensions_remember = true; } + + inline void rememberHiddenstate(bool state) + { hiddenstate= state; hiddenstate_remember= true; } inline void rememberPosition(int posx, int posy, unsigned char rfc= 0 ) { x = posx; y = posy; refc = rfc; position_remember = true; } inline void rememberShadedstate(bool state)

@@ -102,6 +106,9 @@

bool stuckstate_remember; bool stuckstate; + bool hiddenstate_remember; + bool hiddenstate; + bool jumpworkspace_remember; bool jumpworkspace;

@@ -129,16 +136,17 @@ /**

* holds which attributes to remember */ enum Attribute { - REM_WORKSPACE=0, + REM_DECOSTATE= 0, REM_DIMENSIONS, + REM_HIDDENSTATE, + REM_JUMPWORKSPACE, + REM_LAYER, REM_POSITION, + REM_SAVEONCLOSE, + REM_SHADEDSTATE, REM_STUCKSTATE, - REM_DECOSTATE, - REM_SHADEDSTATE, //REM_TABSTATE, ... external tabs disabled atm - REM_LAYER, - REM_JUMPWORKSPACE, - REM_SAVEONCLOSE, + REM_WORKSPACE, REM_LASTATTRIB // not actually used };