Community
Participate
Working Groups
Build Identifier: 3.6.1-6.13.el6.x86_64 The display.postEvent(event) func put into the Display's eventQueue the given event ("deferredEvents"). the base problem is that if the eventTable once already added a listener for a given widget that it never become null even if we remove all listener. so even if the table is empty or not the given event put into the Display's eventQueue. it doesn't seem to valid that the event post happened after a addListener/removeListener call but not before this. this is how the sendEvent look like on Widget.java: ------------------------------- void sendEvent (int eventType, Event event, boolean send) { if (eventTable == null && !display.filters (eventType)) { return; } if (event == null) event = new Event (); event.type = eventType; event.display = display; event.widget = this; if (event.time == 0) { event.time = display.getLastEventTime (); } if (send) { sendEvent (event); } else { display.postEvent (event); } } ------------------------------- in Display.java it's properly implemented in this way ------------------------------- public void removeFilter (int eventType, Listener listener) { checkDevice (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (filterTable == null) return; filterTable.unhook (eventType, listener); if (filterTable.size () == 0) filterTable = null; } ------------------------------- while in Widget.java the last if is missing which cause the problem: ------------------------------- public void removeListener (int eventType, Listener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (eventType, listener); } ------------------------------- Reproducible: Always
This is no longer the case.