diff options
Diffstat (limited to 'src/FbTk/EventManager.cc')
-rw-r--r-- | src/FbTk/EventManager.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/FbTk/EventManager.cc b/src/FbTk/EventManager.cc index eadc701..ff01794 100644 --- a/src/FbTk/EventManager.cc +++ b/src/FbTk/EventManager.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: EventManager.cc,v 1.8 2003/08/27 00:21:54 fluxgen Exp $ | 22 | // $Id: EventManager.cc,v 1.9 2003/10/02 16:14:41 rathnor Exp $ |
23 | 23 | ||
24 | #include "EventManager.hh" | 24 | #include "EventManager.hh" |
25 | #include "FbWindow.hh" | 25 | #include "FbWindow.hh" |
@@ -114,19 +114,18 @@ void EventManager::dispatch(Window win, XEvent &ev, bool parent) { | |||
114 | Window root, parent_win, *children = 0; | 114 | Window root, parent_win, *children = 0; |
115 | unsigned int num_children; | 115 | unsigned int num_children; |
116 | if (XQueryTree(FbTk::App::instance()->display(), win, | 116 | if (XQueryTree(FbTk::App::instance()->display(), win, |
117 | &root, &parent_win, &children, &num_children) != 0 && | 117 | &root, &parent_win, &children, &num_children) != 0) { |
118 | parent_win != 0 && | 118 | if (children != 0) |
119 | parent_win != root) { | ||
120 | |||
121 | if (children != 0) | ||
122 | XFree(children); | 119 | XFree(children); |
123 | 120 | ||
124 | if (m_parent[parent_win] == 0) | 121 | if (parent_win != 0 && |
125 | return; | 122 | parent_win != root) { |
126 | 123 | if (m_parent[parent_win] == 0) | |
127 | // dispatch event to parent | 124 | return; |
128 | dispatch(parent_win, ev, true); | ||
129 | 125 | ||
126 | // dispatch event to parent | ||
127 | dispatch(parent_win, ev, true); | ||
128 | } | ||
130 | } | 129 | } |
131 | 130 | ||
132 | } | 131 | } |