code: def activate(self, title, switchDesktop=False, matchClass=False):
          
          if switchDesktop:
              args = ["-a", title]
          else:
              args = ["-R", title]
          if matchClass:
              args += ["-x"]
          self._run_wmctrl(args)
docs: Activate the specified window, giving it input focus
  
          Usage: C{window.activate(title, switchDesktop=False, matchClass=False)}
          
          If switchDesktop is False (default), the window will be moved to the current desktop
          and activated. Otherwise, switch to the window's current desktop and activate it there.
          
          @param title: window title to match against (as case-insensitive substring match)
          @param switchDesktop: whether or not to switch to the window's current desktop
          @param matchClass: if True, match on the window class instead of the title