diff options
author | fluxgen <fluxgen> | 2003-04-17 14:16:20 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-17 14:16:20 (GMT) |
commit | c4d1f735f6cccfec39750af36886dc66a3ce7ba3 (patch) | |
tree | 778dfcbd5c8c5a09695c3a5ad631b36f2b0abae7 | |
parent | ff2371e11a9508211fc8f237e8edd4ff6474866b (diff) | |
download | fluxbox_pavel-c4d1f735f6cccfec39750af36886dc66a3ce7ba3.zip fluxbox_pavel-c4d1f735f6cccfec39750af36886dc66a3ce7ba3.tar.bz2 |
doing an extra remove to make sure this window is removed from eventmanager
-rw-r--r-- | src/FbTk/FbWindow.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 7d07957..1eabd69 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -19,9 +19,10 @@ | |||
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: FbWindow.cc,v 1.9 2003/04/16 16:02:14 fluxgen Exp $ | 22 | // $Id: FbWindow.cc,v 1.10 2003/04/17 14:16:20 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWindow.hh" | 24 | #include "FbWindow.hh" |
25 | #include "EventManager.hh" | ||
25 | 26 | ||
26 | #include "Color.hh" | 27 | #include "Color.hh" |
27 | #include "App.hh" | 28 | #include "App.hh" |
@@ -59,8 +60,8 @@ FbWindow::FbWindow(const FbWindow &parent, | |||
59 | long eventmask, | 60 | long eventmask, |
60 | bool override_redirect, | 61 | bool override_redirect, |
61 | int depth, int class_type): | 62 | int depth, int class_type): |
62 | m_parent(&parent), | 63 | m_parent(&parent), |
63 | m_screen_num(parent.screenNumber()), m_destroy(true) { | 64 | m_screen_num(parent.screenNumber()), m_destroy(true) { |
64 | 65 | ||
65 | create(parent.window(), x, y, width, height, eventmask, | 66 | create(parent.window(), x, y, width, height, eventmask, |
66 | override_redirect, depth, class_type); | 67 | override_redirect, depth, class_type); |
@@ -74,8 +75,13 @@ FbWindow::FbWindow(Window client):m_parent(0), m_window(client), | |||
74 | } | 75 | } |
75 | 76 | ||
76 | FbWindow::~FbWindow() { | 77 | FbWindow::~FbWindow() { |
77 | if (m_window != 0 && m_destroy) | 78 | |
78 | XDestroyWindow(s_display, m_window); | 79 | if (m_window != 0) { |
80 | // so we don't get any dangling eventhandler for this window | ||
81 | FbTk::EventManager::instance()->remove(m_window); | ||
82 | if (m_destroy) | ||
83 | XDestroyWindow(s_display, m_window); | ||
84 | } | ||
79 | } | 85 | } |
80 | 86 | ||
81 | 87 | ||