MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / get_root

Method get_root

pydevd_attach_to_process/winappdbg/window.py:457–478  ·  view source on GitHub ↗

@see: L{get_tree} @rtype: L{Window} @return: If this is a child window, return the top-level window it belongs to. If this window is already a top-level window, returns itself. @raise WindowsError: An error occured while processing this re

(self)

Source from the content-addressed store, hash-verified

455 return subtree
456
457 def get_root(self):
458 """
459 @see: L{get_tree}
460 @rtype: L{Window}
461 @return: If this is a child window, return the top-level window it
462 belongs to.
463 If this window is already a top-level window, returns itself.
464 @raise WindowsError: An error occured while processing this request.
465 """
466 hWnd = self.get_handle()
467 history = set()
468 hPrevWnd = hWnd
469 while hWnd and hWnd not in history:
470 history.add(hWnd)
471 hPrevWnd = hWnd
472 hWnd = win32.GetParent(hWnd)
473 if hWnd in history:
474 # See: https://docs.google.com/View?id=dfqd62nk_228h28szgz
475 return self
476 if hPrevWnd != self.get_handle():
477 return self.__get_window(hPrevWnd)
478 return self
479
480 def get_child_at(self, x, y, bAllowTransparency=True):
481 """

Callers

nothing calls this directly

Calls 3

get_handleMethod · 0.95
__get_windowMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected