Esempio n. 1
0
    def focus_view(buffer_id, x, y, w, h):
        if buffer_id in buffer_dict:
            buffer = buffer_dict[buffer_id]
            view_id = "%s_%s" % (x, y)

            if view_id in buffer.view_dict:
                view = buffer.view_dict[view_id]
                view_xwindow_id = view.winId().__int__()
                grab_focus(view_xwindow_id)
Esempio n. 2
0
    def eventFilter(self, obj, event):
        if event.type() in [
                QEvent.MouseButtonPress, QEvent.MouseButtonRelease,
                QEvent.InputMethodQuery, QEvent.KeyPress, QEvent.KeyRelease,
                QEvent.Enter, QEvent.WindowActivate, QEvent.ActivationChange,
                QEvent.ToolTip, QEvent.Leave
        ]:
            grab_focus(self.emacs_xid)

            return True
Esempio n. 3
0
 def eventFilter(self, obj, event):
     if event.type() in [QEvent.MouseButtonPress, QEvent.MouseButtonRelease, QEvent.InputMethodQuery, QEvent.KeyPress, QEvent.KeyRelease, QEvent.Enter, QEvent.WindowActivate, QEvent.ActivationChange, QEvent.ToolTip, QEvent.Leave]:
         grab_focus(self.emacs_xid)
         
         return True