Repository: spyder-ide/spyder

Issue:
Hover Tooltips make change focus off the spyder main window on Linux
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [x] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [x] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [x] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [x] Tried basic troubleshooting (if a bug/error)
    * [x] Restarted Spyder
    * [x] Reset preferences with ``spyder --reset``
    * [x] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [x] Tried the other applicable steps from the Troubleshooting Guide
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description

The current call tips in Linux changes focus off the main Spyder window in Ubuntu 16.04. This cases the hover calltips to disapear instantly and Unity can have graphical glitches(on Nvidia) due to window creation in compiz. The fix seem to use the `qt.tooltip` window type over the `qt.tool` window type. PR coming.

### What steps reproduce the problem?

![tooltip](https://user-images.githubusercontent.com/10513354/58223648-d0899080-7cd7-11e9-9219-e58a4caa486d.gif)


## Versions

* Spyder version: master
* Python version: 3.6.8 64-bit
* Qt version: 5.9.6
* PyQt version: 5.9.2
* Operating System name/version: Ubuntu 16.04 Unity

### Dependencies
<!--- Please go to the menu entry Help > Dependencies,
press the Copy to clipboard button and paste below --->

```
pygments >=2.0     :  2.4.0 (OK)
qdarkstyle >=2.6.4 :  2.6.8 (OK)
sphinx >=0.6.6     :  2.0.1 (OK)
psutil >=0.3       :  5.6.2 (OK)
pyls >=0.19.0;<0.25:  0.24.0 (OK)
nbconvert >=4.0    :  5.5.0 (OK)
pandas >=0.13.1    :  0.24.2 (OK)
numpy >=1.7        :  1.16.3 (OK)
sympy >=0.7.3      :  1.4 (OK)
cython >=0.21      :  0.29.7 (OK)
qtconsole >=4.2.0  :  4.4.4 (OK)
IPython >=4.0      :  7.5.0 (OK)
matplotlib >=2.0.0 :  3.0.3 (OK)
pylint >=0.25      :  2.3.1 (OK)
```



Discussion:

Resolving patch:
diff --git a/spyder/widgets/calltip.py b/spyder/widgets/calltip.py
--- a/spyder/widgets/calltip.py
+++ b/spyder/widgets/calltip.py
@@ -58,10 +58,8 @@ def __init__(self, parent=None, as_tooltip=False):
         # This keeps the hints below other applications
         if sys.platform == 'darwin':
             self.setWindowFlags(Qt.SplashScreen)
-        elif os.name == 'nt':
-            self.setWindowFlags(Qt.ToolTip | Qt.FramelessWindowHint)
         else:
-            self.setWindowFlags(Qt.Tool | Qt.FramelessWindowHint)
+            self.setWindowFlags(Qt.ToolTip | Qt.FramelessWindowHint)
 
         self._timer_hide.setInterval(500)
         self.setTextInteractionFlags(Qt.TextSelectableByMouse)


Test patch: