all repos — fluxbox @ 4d83785792954c42f080ce8e975a404a38bf1c66

custom fork of the fluxbox windowmanager

fix disappearing close button
rathnor rathnor
commit

4d83785792954c42f080ce8e975a404a38bf1c66

parent

39e9e25d5b0df95ddb72f79d95743cc619f12cf8

3 files changed, 16 insertions(+), 7 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.6: +*03/09/21: + * Fix disappearing close button (Simon) + WinClient.hh/cc *03/09/19: * fbsetbg update (Thanks Han) - fixes fbsetbg -l after a changing the wallpapersetter.
M src/WinClient.ccsrc/WinClient.cc

@@ -19,7 +19,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: WinClient.cc,v 1.24 2003/09/11 19:55:27 rathnor Exp $ +// $Id: WinClient.cc,v 1.25 2003/09/21 12:49:47 rathnor Exp $ #include "WinClient.hh"

@@ -54,7 +54,8 @@ wm_hint_flags(0),

m_win(fbwin), m_modal(0), send_focus_message(false), - closable(false), + send_close_message(false), + closable(true), m_win_gravity(0), m_title(""), m_icon_title(""), m_class_name(""), m_instance_name(""),

@@ -169,7 +170,7 @@ return true;

} void WinClient::sendClose(bool forceful) { - if (forceful || !isClosable()) + if (forceful || !send_close_message) XKillClient(FbTk::App::instance()->display(), window()); else { // send WM_DELETE message

@@ -584,9 +585,13 @@ FbAtoms *fbatoms = FbAtoms::instance();

if (XGetWMProtocols(FbTk::App::instance()->display(), window(), &proto, &num_return)) { + // defaults + send_focus_message = false; + send_close_message = false; + // could be added to netizens twice... for (int i = 0; i < num_return; ++i) { if (proto[i] == fbatoms->getWMDeleteAtom()) - closable = true; + send_close_message = true; else if (proto[i] == fbatoms->getWMTakeFocusAtom()) send_focus_message = true; else if (proto[i] == fbatoms->getFluxboxStructureMessagesAtom())
M src/WinClient.hhsrc/WinClient.hh

@@ -19,7 +19,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: WinClient.hh,v 1.13 2003/09/11 19:55:27 rathnor Exp $ +// $Id: WinClient.hh,v 1.14 2003/09/21 12:49:48 rathnor Exp $ #ifndef WINCLIENT_HH #define WINCLIENT_HH

@@ -46,7 +46,8 @@ void updateRect(int x, int y, unsigned int width, unsigned int height);

bool sendFocus(); // returns whether we sent a message or not // i.e. whether we assume the focus will get taken void sendClose(bool forceful = false); - inline bool isClosable() const { return closable; } + // not aware of anything that makes this false at present + inline bool isClosable() const { return true; } void reparent(Window win, int x, int y); bool getAttrib(XWindowAttributes &attr) const; bool getWMName(XTextProperty &textprop) const;

@@ -157,7 +158,7 @@ private:

// number of transients which we are modal for // or indicates that we are modal if don't have any transients int m_modal; - bool send_focus_message, closable; + bool send_focus_message, send_close_message; int m_win_gravity;