Fix selecting completion item with mouse
Review Request #127444 - Created March 21, 2016 and submitted
Currently the completion dialog disappears immediately when you try to click on an item. With this patch you are again able to click on the popup and double click to select completion as it seems to be designed to do as there is doubleClicked() handling code already in there. This patch prevents closing of the popup when the view looses focus to the popup, adds closing the popup when it looses focus and returns the focus to the view when the popup is closed in case it had focus.
Works as described above. Clicking an item is now possible and seems to work as previously otherwise. The popup is closed if clicking another window, toolview, or in the document view, but can be clicked to do completion.