Re-worked the logic for determining which windows to ignore (all but toplevel ones). Also, rewrote get_parent to use a simpler and documented approach. A side effect of these changes is that combobox windows are now correctly handled as top-level windows and thus can appear outside application windows.