From 1cd253f4684ee126340fae38094b637f1b0010ea Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 3 Feb 2003 20:18:30 +0000 Subject: handle modal windows better (bugfixes). handle client-installed colormaps. --- src/client.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/client.cc') diff --git a/src/client.cc b/src/client.cc index 95c49877..51c987d3 100644 --- a/src/client.cc +++ b/src/client.cc @@ -105,10 +105,8 @@ Client::~Client() _transients.front()->_transient_for = 0; _transients.pop_front(); } - + // clean up parents reference to this - if (_modal) - setModal(false); if (_transient_for) _transient_for->_transients.remove(this); // remove from old parent @@ -825,6 +823,8 @@ Client *Client::findModalChild(Client *skip) const void Client::setModal(bool modal) { + if (modal == _modal) return; + if (modal) { Client *c = this; while (c->_transient_for) { @@ -1616,6 +1616,19 @@ void Client::disableDecorations(DecorationFlags flags) } +void Client::installColormap(bool install) const +{ + XWindowAttributes wa; + if (XGetWindowAttributes(**otk::display, _window, &wa)) { + printf("%snstalling Window Colormap 0x%lx!\n", install ? "I" : "Uni", _window); + if (install) + XInstallColormap(**otk::display, wa.colormap); + else + XUninstallColormap(**otk::display, wa.colormap); + } +} + + bool Client::focus() { // if we have a modal child, then focus it, not us -- cgit v1.2.3