[Eric] Hack for metacity / autocomplete focus bug
Detlev Offenbach
detlev at die-offenbachs.de
Tue May 5 17:36:05 BST 2009
Hi,
I am wondering what is the difference between the Gnome window manager and the
other ones around. It seems, that this issue is Gnome specific. I didn't see
this on KDE3, KDE4 or Windows. That said, I don't think it is a good idea to
include a hack in eric4.
Regards,
Detlev
On Dienstag, 5. Mai 2009, Johan Schulz wrote:
> Hello,
>
> i tried this hack but nothing changed for me.
> I still loose the focus on the context menu but can still alt+tab to
> activate it.
> 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.
>
> i think you have to trigger the hotkey for autocompletion and then notify
> the main window of eric to re-request focus.
>
>
> regards
>
> johan
>
> 2009/5/5 cadevel <cadevel at free.fr>
>
> > Hello ,
> > i've written a small hack to correct the focus problem with autocomplete
> > and metacity (Gnome window manager)
> >
> > just add this method in class QsciScintillaCompat ()
> >
> > def keyPressEvent(self, evt) :
> > wa = self.isListActive()
> > QsciScintilla.keyPressEvent(self, evt)
> > if not wa and self.isListActive() :
> > for i in self.children() :
> > if isinstance(i, QListWidget) :
> > i.setWindowFlags(Qt.ToolTip |Qt.WindowStaysOnTopHint)
> > i.show()
> >
> >
> >
> > and change
> >
> > from PyQt4.QtGui import QApplication, QPalette
> >
> > to
> >
> > from PyQt4.QtGui import QApplication, QPalette,QListWidget
> >
> >
> >
> >
> > Warning:
> > this works for me
> > but I didn't try it elsewhere
> >
> > A better solution can be to change the window flags of this QListWidget
> > in QScintilla
> >
> >
> >
> > ------
> > Christophe Antoine
> >
> >
> > _______________________________________________
> > Eric mailing list
> > Eric at riverbankcomputing.com
> > http://www.riverbankcomputing.com/mailman/listinfo/eric
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list