Browse files

Do not abort if we receive an event for an unknown window.

git-svn-id: svn://svn.freevo.org/kaa/trunk/display@3708 a8f5125c-1e01-0410-8897-facf34644b8e
  • Loading branch information...
1 parent 2bff5e8 commit abc3b0a53fa84a0b0b5b8deb353c5b0753549b8f @jtackaberry jtackaberry committed Dec 31, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/x11.py
View
8 src/x11.py
@@ -116,7 +116,12 @@ def handle_events(self):
wid = 0
if event in X11Display.XEVENT_WINDOW_EVENTS:
wid = data["window"]
- if wid:
+
+ # Create event dict for windows we know about. It's possible we
+ # may receive events for windows we don't know about (i.e. not
+ # in self._windows); these are children of managed windows and
+ # these events can be ignored.
+ if wid and wid in self._windows:
if wid not in window_events:
window_events[wid] = []
if event == X11Display.XEVENT_CONFIGURE_NOTIFY:
@@ -127,7 +132,6 @@ def handle_events(self):
window_events[wid].append((event, data))
for wid, events in window_events.items():
- assert(wid in self._windows)
window = self._windows[wid]()
if not window:
# Window no longer exists.

0 comments on commit abc3b0a

Please sign in to comment.