all repos — fluxbox @ a53017cc3bad26906b99ac473513a10847c40bc0

custom fork of the fluxbox windowmanager

bugfix: do not use anything from the current ClientMenuItem after m_client.focus(), closes #3210493

m_client.focus() might call ~ClientMenuItem(), thus m_client is not available anymore. the crash was triggered by trying to deiconify a client via the clientmenu. this triggers a signal to remove and destroy the current ClientMenuItem.
Mathias Gumz akira at fluxbox dot org
commit

a53017cc3bad26906b99ac473513a10847c40bc0

parent

bb2ce5df8a814f9b858b6919356f7d37f10e6b9f

1 files changed, 4 insertions(+), 2 deletions(-)

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

@@ -52,15 +52,17 @@ if (fbwin == 0)

return; // this MenuItem object can get destroyed as a result of focus(), so we - // must get a local copy of the parent menu + // must get a local copy of anything we want to use here + // AFTER ~ClientMenuItem() is called. FbTk::Menu *parent = menu(); + FocusControl& focus_control = m_client.screen().focusControl(); m_client.focus(); fbwin->raise(); if ((mods & ControlMask) == 0) { // Ignore any focus changes due to this menu closing // (even in StrictMouseFocus mode) - m_client.screen().focusControl().ignoreAtPointer(true); + focus_control.ignoreAtPointer(true); parent->hide(); } }