Beispiel #1
0
 def finish_input_wrapper(string):
     if not self.has_been_shown:
         # Get our window identifier
         self.pid = os.getpid()
         self.windows = window.windows()
         for w in self.windows:
             if w['pid'] == self.pid:
                 assert self.hex_code is None
                 self.hex_code = w['hex_code']
         assert self.hex_code is not None
         self.has_been_shown = True
     self._hide_frm()
     return callback(string)
Beispiel #2
0
 def finish_input_wrapper(string):
     if not self.has_been_shown:
         # Get our window identifier
         self.pid = os.getpid()
         self.windows = window.windows()
         for w in self.windows:
             if w['pid'] == self.pid:
                 assert self.hex_code is None
                 self.hex_code = w['hex_code']
         assert self.hex_code is not None
         self.has_been_shown = True
     self._hide_frm()
     return callback(string)
Beispiel #3
0
 def _raise(self, event):
     # logger.info("raise?")
     if self.app.IsActive():
         # logger.info("Looks like we already have focus")
         self.timer.Stop()
         return
     if self.hex_code is not None:
         ws = window.windows()
         c = None
         for w in ws:
             if w['pid'] == self.pid:
                 c = w['hex_code']
         if c == self.hex_code:
             # logger.info("RAISE WINDOW: %s", self.hex_code)
             window.raise_window(self.hex_code)
             # self._reshow_popup()
             self.timer.Stop()
     else:
         # self._reshow_popup()
         self.timer.Stop()
Beispiel #4
0
 def _raise(self, event):
     # logger.info("raise?")
     if self.app.IsActive():
         # logger.info("Looks like we already have focus")
         self.timer.Stop()
         return
     if self.hex_code is not None:
         ws = window.windows()
         c = None
         for w in ws:
             if w['pid'] == self.pid:
                 c = w['hex_code']
         if c == self.hex_code:
             # logger.info("RAISE WINDOW: %s", self.hex_code)
             window.raise_window(self.hex_code)
             # self._reshow_popup()
             self.timer.Stop()
     else:
         # self._reshow_popup()
         self.timer.Stop()