removed reparent and added debugmsg
This commit is contained in:
parent
feeecb52d7
commit
12237ed0db
2 changed files with 25 additions and 11 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: WinClient.cc,v 1.40 2004/06/07 11:46:04 rathnor Exp $
|
// $Id: WinClient.cc,v 1.41 2004/08/10 13:36:07 fluxgen Exp $
|
||||||
|
|
||||||
#include "WinClient.hh"
|
#include "WinClient.hh"
|
||||||
|
|
||||||
|
@ -157,7 +157,10 @@ bool WinClient::acceptsFocus() const {
|
||||||
bool WinClient::sendFocus() {
|
bool WinClient::sendFocus() {
|
||||||
if (!send_focus_message)
|
if (!send_focus_message)
|
||||||
return false;
|
return false;
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<"WinClient::"<<__FUNCTION__<<": this = "<<this<<
|
||||||
|
" window = 0x"<<hex<<window()<<dec<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
// setup focus msg
|
// setup focus msg
|
||||||
XEvent ce;
|
XEvent ce;
|
||||||
|
@ -199,10 +202,6 @@ void WinClient::sendClose(bool forceful) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinClient::reparent(Window win, int x, int y) {
|
|
||||||
XReparentWindow(FbTk::App::instance()->display(), window(), win, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WinClient::getAttrib(XWindowAttributes &attr) const {
|
bool WinClient::getAttrib(XWindowAttributes &attr) const {
|
||||||
return XGetWindowAttributes(FbTk::App::instance()->display(), window(), &attr);
|
return XGetWindowAttributes(FbTk::App::instance()->display(), window(), &attr);
|
||||||
}
|
}
|
||||||
|
@ -248,8 +247,12 @@ void WinClient::updateWMClassHint() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinClient::updateTransientInfo() {
|
void WinClient::updateTransientInfo() {
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<__FUNCTION__<<": m_win = "<<m_win<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
if (m_win == 0)
|
if (m_win == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// remove us from parent
|
// remove us from parent
|
||||||
if (transientFor() != 0) {
|
if (transientFor() != 0) {
|
||||||
transientFor()->transientList().remove(this);
|
transientFor()->transientList().remove(this);
|
||||||
|
@ -258,13 +261,21 @@ void WinClient::updateTransientInfo() {
|
||||||
transient_for = 0;
|
transient_for = 0;
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
// determine if this is a transient window
|
// determine if this is a transient window
|
||||||
Window win;
|
Window win = 0;
|
||||||
if (!XGetTransientForHint(disp, window(), &win))
|
if (!XGetTransientForHint(disp, window(), &win)) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<__FUNCTION__<<": window() = 0x"<<hex<<window()<<dec<<"Failed to read transient for hint."<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// we can't be transient to ourself
|
// we can't be transient to ourself
|
||||||
if (win == window())
|
if (win == window()) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<__FUNCTION__<<": transient to ourself"<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (win != None && m_win->screen().rootWindow() == win) {
|
if (win != None && m_win->screen().rootWindow() == win) {
|
||||||
// transient for root window... = transient for group
|
// transient for root window... = transient for group
|
||||||
|
@ -275,6 +286,10 @@ void WinClient::updateTransientInfo() {
|
||||||
|
|
||||||
transient_for = Fluxbox::instance()->searchWindow(win);
|
transient_for = Fluxbox::instance()->searchWindow(win);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<__FUNCTION__<<": transient_for window = 0x"<<hex<<win<<dec<<endl;
|
||||||
|
cerr<<__FUNCTION__<<": transient_for = "<<transient_for<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
// make sure we don't have deadlock loop in transient chain
|
// make sure we don't have deadlock loop in transient chain
|
||||||
for (WinClient *w = this; w != 0; w = w->transient_for) {
|
for (WinClient *w = this; w != 0; w = w->transient_for) {
|
||||||
if (w == w->transient_for) {
|
if (w == w->transient_for) {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: WinClient.hh,v 1.17 2004/04/28 14:59:12 rathnor Exp $
|
// $Id: WinClient.hh,v 1.18 2004/08/10 13:36:07 fluxgen Exp $
|
||||||
|
|
||||||
#ifndef WINCLIENT_HH
|
#ifndef WINCLIENT_HH
|
||||||
#define WINCLIENT_HH
|
#define WINCLIENT_HH
|
||||||
|
@ -58,7 +58,6 @@ public:
|
||||||
void sendClose(bool forceful = false);
|
void sendClose(bool forceful = false);
|
||||||
// not aware of anything that makes this false at present
|
// not aware of anything that makes this false at present
|
||||||
inline bool isClosable() const { return true; }
|
inline bool isClosable() const { return true; }
|
||||||
void reparent(Window win, int x, int y);
|
|
||||||
|
|
||||||
void addModal(); // some transient of ours (or us) is modal
|
void addModal(); // some transient of ours (or us) is modal
|
||||||
void removeModal(); // some transient (or us) is no longer modal
|
void removeModal(); // some transient (or us) is no longer modal
|
||||||
|
|
Loading…
Reference in a new issue