summaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index d6cd585..cb75166 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: WinClient.cc,v 1.24 2003/09/11 19:55:27 rathnor Exp $ 22// $Id: WinClient.cc,v 1.25 2003/09/21 12:49:47 rathnor Exp $
23 23
24#include "WinClient.hh" 24#include "WinClient.hh"
25 25
@@ -54,7 +54,8 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin):FbTk::Fb
54 m_win(fbwin), 54 m_win(fbwin),
55 m_modal(0), 55 m_modal(0),
56 send_focus_message(false), 56 send_focus_message(false),
57 closable(false), 57 send_close_message(false),
58 closable(true),
58 m_win_gravity(0), 59 m_win_gravity(0),
59 m_title(""), m_icon_title(""), 60 m_title(""), m_icon_title(""),
60 m_class_name(""), m_instance_name(""), 61 m_class_name(""), m_instance_name(""),
@@ -169,7 +170,7 @@ bool WinClient::sendFocus() {
169} 170}
170 171
171void WinClient::sendClose(bool forceful) { 172void WinClient::sendClose(bool forceful) {
172 if (forceful || !isClosable()) 173 if (forceful || !send_close_message)
173 XKillClient(FbTk::App::instance()->display(), window()); 174 XKillClient(FbTk::App::instance()->display(), window());
174 else { 175 else {
175 // send WM_DELETE message 176 // send WM_DELETE message
@@ -584,9 +585,13 @@ void WinClient::updateWMProtocols() {
584 585
585 if (XGetWMProtocols(FbTk::App::instance()->display(), window(), &proto, &num_return)) { 586 if (XGetWMProtocols(FbTk::App::instance()->display(), window(), &proto, &num_return)) {
586 587
588 // defaults
589 send_focus_message = false;
590 send_close_message = false;
591 // could be added to netizens twice...
587 for (int i = 0; i < num_return; ++i) { 592 for (int i = 0; i < num_return; ++i) {
588 if (proto[i] == fbatoms->getWMDeleteAtom()) 593 if (proto[i] == fbatoms->getWMDeleteAtom())
589 closable = true; 594 send_close_message = true;
590 else if (proto[i] == fbatoms->getWMTakeFocusAtom()) 595 else if (proto[i] == fbatoms->getWMTakeFocusAtom())
591 send_focus_message = true; 596 send_focus_message = true;
592 else if (proto[i] == fbatoms->getFluxboxStructureMessagesAtom()) 597 else if (proto[i] == fbatoms->getFluxboxStructureMessagesAtom())