all repos — fluxbox @ af8510a5a7da755a0677405c7d009ad01e6d67a6

custom fork of the fluxbox windowmanager

fix detachClient issue where the menu wouldn't get created before adding
remember. Also make this safer in Remember.cc
rathnor rathnor
commit

af8510a5a7da755a0677405c7d009ad01e6d67a6

parent

93fab45accee2f5d0375f6686269e8cd9a588ab9

2 files changed, 7 insertions(+), 5 deletions(-)

jump to
M src/Remember.ccsrc/Remember.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: Remember.cc,v 1.9 2003/04/27 15:53:53 rathnor Exp $ +// $Id: Remember.cc,v 1.10 2003/04/28 12:58:08 rathnor Exp $ #include "Remember.hh" #include "StringUtil.hh"

@@ -545,12 +545,14 @@ WinClient &winclient = win.winClient();

// we don't touch the window if it is a transient // of something else + int menupos = win.getWindowmenu().numberOfItems()-2; + if (menupos < -1) menupos = -1; if (winclient.transientFor()) { // still put something in the menu so people don't get confused // so, we add a disabled item... FbTk::MenuItem *item = new FbTk::MenuItem("Remember..."); item->setEnabled(false); - win.getWindowmenu().insert(item, win.getWindowmenu().numberOfItems()-2); + win.getWindowmenu().insert(item, menupos); win.getWindowmenu().update(); return; }

@@ -560,7 +562,7 @@ // All windows get the remember menu.

// TODO: nls win.getWindowmenu().insert("Remember...", createRememberMenu(*this, win), - win.getWindowmenu().numberOfItems()-2); + menupos); win.getWindowmenu().update(); Application *app = find(winclient);
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.140 2003/04/28 00:36:50 fluxgen Exp $ +// $Id: Screen.cc,v 1.141 2003/04/28 12:58:08 rathnor Exp $ #include "Screen.hh"

@@ -1291,8 +1291,8 @@ // don't add to focused_list, as it should already be in there (since the

// WinClient already exists). Fluxbox::instance()->saveWindowSearch(client.window(), win); - Fluxbox::instance()->attachSignals(*win); setupWindowActions(*win); + Fluxbox::instance()->attachSignals(*win); if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { win->show(); }