def get_active_geometry(self):
active = self.mediator.interface.get_window_title()<EOL>result, output = self._run_wmctrl(["<STR_LIT>", "<STR_LIT>"])<EOL>matchingLine = None<EOL>for line in output.split('<STR_LIT:\n>'):<EOL><INDENT>if active in line[<NUM_LIT>:].split('<STR_LIT:U+0020>', <NUM_LIT:1>)[-<NUM_LIT:1>]:<EOL><INDENT>matchingLine = line<EOL><DEDENT><DEDENT>if matchingLine is not None:<EOL><INDENT>output = matchingLine.split()[<NUM_LIT:2>:<NUM_LIT:6>]<EOL>return list(map(int, output))<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Get the geometry of the currently active window

Usage: C{window.get_active_geometry()}

@return: a 4-tuple containing the x-origin, y-origin, width and height of the window (in pixels)
@rtype: C{tuple(int, int, int, int)}