Hello,<br><br>i tried this hack but nothing changed for me.<br>I still loose the focus on the context menu but can still alt+tab to activate it.<br>i dont think the problem is the context menu itself, on my computer the program (eric) itself loose focus. but i dont know how to force eric to request focus out of gnome. <br>
<br>i think you have to trigger the hotkey for autocompletion and then notify the main window of eric to re-request focus. <br><br><br>regards<br><br>johan<br><br><div class="gmail_quote">2009/5/5 cadevel <span dir="ltr">&lt;<a href="mailto:cadevel@free.fr">cadevel@free.fr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello ,<br>
i&#39;ve written a small hack to correct the focus problem with autocomplete and metacity (Gnome window manager)<br>
<br>
just add this method in class QsciScintillaCompat ()<br>
<br>
   def keyPressEvent(self, evt) :<br>
       wa = self.isListActive()<br>
       QsciScintilla.keyPressEvent(self, evt)<br>
       if not wa and self.isListActive() :<br>
           for i in self.children() :<br>
               if isinstance(i, QListWidget) :<br>
                   i.setWindowFlags(Qt.ToolTip |Qt.WindowStaysOnTopHint)<br>
                   i.show()<br>
<br>
<br>
<br>
and change<br>
<br>
from PyQt4.QtGui import QApplication, QPalette<br>
<br>
to<br>
<br>
from PyQt4.QtGui import QApplication, QPalette,QListWidget<br>
<br>
<br>
<br>
<br>
Warning:<br>
this works for me<br>
but I didn&#39;t try it elsewhere<br>
<br>
A better solution can be to change the window flags of this QListWidget in QScintilla<br>
<br>
<br>
<br>
------<br>
Christophe Antoine<br>
<br>
<br>
_______________________________________________<br>
Eric mailing list<br>
<a href="mailto:Eric@riverbankcomputing.com" target="_blank">Eric@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>
</blockquote></div><br>