some more fixing of wm_protocols
This commit is contained in:
parent
35234ae644
commit
f71e53fbe9
4 changed files with 21 additions and 9 deletions
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Screen.cc,v 1.208 2003/07/28 15:06:33 rathnor Exp $
|
||||
// $Id: Screen.cc,v 1.209 2003/07/28 16:29:24 rathnor Exp $
|
||||
|
||||
|
||||
#include "Screen.hh"
|
||||
|
@ -1035,6 +1035,7 @@ void BScreen::updateNetizenConfigNotify(XEvent &e) {
|
|||
}
|
||||
|
||||
FluxboxWindow *BScreen::createWindow(Window client) {
|
||||
XSync(FbTk::App::instance()->display(), false);
|
||||
WinClient *winclient = new WinClient(client, *this);
|
||||
|
||||
if (winclient->initial_state == WithdrawnState) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: WinClient.cc,v 1.21 2003/07/28 15:46:00 rathnor Exp $
|
||||
// $Id: WinClient.cc,v 1.22 2003/07/28 16:29:25 rathnor Exp $
|
||||
|
||||
#include "WinClient.hh"
|
||||
|
||||
|
@ -592,6 +592,8 @@ void WinClient::updateWMProtocols() {
|
|||
}
|
||||
|
||||
XFree(proto);
|
||||
if (m_win)
|
||||
m_win->updateFunctions();
|
||||
} else {
|
||||
cerr<<"Warning: Failed to read WM Protocols. "<<endl;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Window.cc,v 1.214 2003/07/28 15:46:00 rathnor Exp $
|
||||
// $Id: Window.cc,v 1.215 2003/07/28 16:29:25 rathnor Exp $
|
||||
|
||||
#include "Window.hh"
|
||||
|
||||
|
@ -425,8 +425,6 @@ void FluxboxWindow::init() {
|
|||
else
|
||||
getMWMHints();
|
||||
|
||||
functions.close = m_client->isClosable();
|
||||
|
||||
//!!
|
||||
// fetch client size and placement
|
||||
XWindowAttributes wattrib;
|
||||
|
@ -1035,10 +1033,20 @@ void FluxboxWindow::getMWMHints() {
|
|||
functions.close = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FluxboxWindow::updateFunctions() {
|
||||
if (!m_client)
|
||||
return;
|
||||
bool changed = false;
|
||||
if (m_client->isClosable() != functions.close) {
|
||||
functions.close = m_client->isClosable();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
setupWindow();
|
||||
}
|
||||
|
||||
void FluxboxWindow::getBlackboxHints() {
|
||||
const FluxboxWindow::BlackboxHints *hint = m_client->getBlackboxHint();
|
||||
|
@ -3461,7 +3469,7 @@ void FluxboxWindow::setupWindow() {
|
|||
newbutton->setOnClick(maximize_horiz_cmd, 3);
|
||||
newbutton->setOnClick(maximize_vert_cmd, 2);
|
||||
|
||||
} else if (isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
|
||||
} else if (m_client->isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
|
||||
newbutton = new WinButton(*this, winbutton_theme,
|
||||
WinButton::CLOSE,
|
||||
frame.titlebar(),
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Window.hh,v 1.89 2003/07/28 15:06:35 rathnor Exp $
|
||||
// $Id: Window.hh,v 1.90 2003/07/28 16:29:25 rathnor Exp $
|
||||
|
||||
#ifndef WINDOW_HH
|
||||
#define WINDOW_HH
|
||||
|
@ -214,6 +214,7 @@ public:
|
|||
|
||||
void setWorkspace(int n);
|
||||
void changeBlackboxHints(const BlackboxHints &bh);
|
||||
void updateFunctions();
|
||||
void restoreAttributes();
|
||||
void showMenu(int mx, int my);
|
||||
// popup menu on last button press position
|
||||
|
|
Loading…
Reference in a new issue