aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-28 16:29:25 (GMT)
committerrathnor <rathnor>2003-07-28 16:29:25 (GMT)
commitf71e53fbe919125d40f9c5578ce14b75680f7037 (patch)
treeb826fcdc4a09f38b371186a4dd598515da54e121
parent35234ae644d14b929c72b4a04a8d59eb46d72448 (diff)
downloadfluxbox-f71e53fbe919125d40f9c5578ce14b75680f7037.zip
fluxbox-f71e53fbe919125d40f9c5578ce14b75680f7037.tar.bz2
some more fixing of wm_protocols
-rw-r--r--src/Screen.cc3
-rw-r--r--src/WinClient.cc4
-rw-r--r--src/Window.cc20
-rw-r--r--src/Window.hh3
4 files changed, 21 insertions, 9 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 3838528..6242b4a 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.208 2003/07/28 15:06:33 rathnor Exp $ 25// $Id: Screen.cc,v 1.209 2003/07/28 16:29:24 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -1035,6 +1035,7 @@ void BScreen::updateNetizenConfigNotify(XEvent &e) {
1035} 1035}
1036 1036
1037FluxboxWindow *BScreen::createWindow(Window client) { 1037FluxboxWindow *BScreen::createWindow(Window client) {
1038 XSync(FbTk::App::instance()->display(), false);
1038 WinClient *winclient = new WinClient(client, *this); 1039 WinClient *winclient = new WinClient(client, *this);
1039 1040
1040 if (winclient->initial_state == WithdrawnState) { 1041 if (winclient->initial_state == WithdrawnState) {
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 6fce6f5..3f817d8 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.21 2003/07/28 15:46:00 rathnor Exp $ 22// $Id: WinClient.cc,v 1.22 2003/07/28 16:29:25 rathnor Exp $
23 23
24#include "WinClient.hh" 24#include "WinClient.hh"
25 25
@@ -592,6 +592,8 @@ void WinClient::updateWMProtocols() {
592 } 592 }
593 593
594 XFree(proto); 594 XFree(proto);
595 if (m_win)
596 m_win->updateFunctions();
595 } else { 597 } else {
596 cerr<<"Warning: Failed to read WM Protocols. "<<endl; 598 cerr<<"Warning: Failed to read WM Protocols. "<<endl;
597 } 599 }
diff --git a/src/Window.cc b/src/Window.cc
index 6f82f90..d84a06d 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.214 2003/07/28 15:46:00 rathnor Exp $ 25// $Id: Window.cc,v 1.215 2003/07/28 16:29:25 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -425,8 +425,6 @@ void FluxboxWindow::init() {
425 else 425 else
426 getMWMHints(); 426 getMWMHints();
427 427
428 functions.close = m_client->isClosable();
429
430 //!! 428 //!!
431 // fetch client size and placement 429 // fetch client size and placement
432 XWindowAttributes wattrib; 430 XWindowAttributes wattrib;
@@ -1035,10 +1033,20 @@ void FluxboxWindow::getMWMHints() {
1035 functions.close = true; 1033 functions.close = true;
1036 } 1034 }
1037 } 1035 }
1038
1039
1040} 1036}
1041 1037
1038void FluxboxWindow::updateFunctions() {
1039 if (!m_client)
1040 return;
1041 bool changed = false;
1042 if (m_client->isClosable() != functions.close) {
1043 functions.close = m_client->isClosable();
1044 changed = true;
1045 }
1046
1047 if (changed)
1048 setupWindow();
1049}
1042 1050
1043void FluxboxWindow::getBlackboxHints() { 1051void FluxboxWindow::getBlackboxHints() {
1044 const FluxboxWindow::BlackboxHints *hint = m_client->getBlackboxHint(); 1052 const FluxboxWindow::BlackboxHints *hint = m_client->getBlackboxHint();
@@ -3461,7 +3469,7 @@ void FluxboxWindow::setupWindow() {
3461 newbutton->setOnClick(maximize_horiz_cmd, 3); 3469 newbutton->setOnClick(maximize_horiz_cmd, 3);
3462 newbutton->setOnClick(maximize_vert_cmd, 2); 3470 newbutton->setOnClick(maximize_vert_cmd, 2);
3463 3471
3464 } else if (isClosable() && (*dir)[i] == Fluxbox::CLOSE) { 3472 } else if (m_client->isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
3465 newbutton = new WinButton(*this, winbutton_theme, 3473 newbutton = new WinButton(*this, winbutton_theme,
3466 WinButton::CLOSE, 3474 WinButton::CLOSE,
3467 frame.titlebar(), 3475 frame.titlebar(),
diff --git a/src/Window.hh b/src/Window.hh
index 4bcef1f..135c172 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.89 2003/07/28 15:06:35 rathnor Exp $ 25// $Id: Window.hh,v 1.90 2003/07/28 16:29:25 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -214,6 +214,7 @@ public:
214 214
215 void setWorkspace(int n); 215 void setWorkspace(int n);
216 void changeBlackboxHints(const BlackboxHints &bh); 216 void changeBlackboxHints(const BlackboxHints &bh);
217 void updateFunctions();
217 void restoreAttributes(); 218 void restoreAttributes();
218 void showMenu(int mx, int my); 219 void showMenu(int mx, int my);
219 // popup menu on last button press position 220 // popup menu on last button press position