Set the given window active (property _NET_ACTIVE_WINDOW)

        :param win: the window object
351537
def setActiveWindow(self, win):
        
        self._setProperty('_NET_ACTIVE_WINDOW', [1, X.CurrentTime, win.id],
                          win)
836241
def get_active_window(self):
        
        window_ret = window_t(0)
        _libxdo.xdo_get_active_window(self._xdo, ctypes.byref(window_ret))
        return window_ret.value
1367022
public void setActive(HostPort hostPort)
        throws IOException, ServerException {
        Command cmd = new Command((controlChannel.isIPv6()) ? "EPRT" : "PORT",
                                  hostPort.toFtpCmdArgument());
        try {
            controlChannel.execute(cmd);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(urce);
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        }

        this.session.serverMode = Session.SERVER_ACTIVE;
    }
722325
def focus_window(winhandle, path=None, name=None, sleeptime=.01):
        
        import utool as ut
        import time
        print('focus: ' + winhandle)
        args = ['wmctrl', '-xa', winhandle]
        ut.cmd(*args, verbose=False, quiet=True)
        time.sleep(sleeptime)
1183598
def window(*args, &blk)
      win = Window.new self, extract_selector(args)

      win.use(&blk) if block_given?

      win
    end
825879
function setActiveBin (bins, activebin) {
    var i, bin = null
    for (i in bins) {
      bins[i] = false
    }
    bins[activebin] = true
    return bins
  }
343462
def setCloseWindow(self, win):
        
        self._setProperty('_NET_CLOSE_WINDOW',
                          [int(time.mktime(time.localtime())), 1], win)
931548
def set_window_title(self):
        """"""
        if DEV is not None:
            title = u"Spyder %s (Python %s.%s)" % (__version__,
                                                   sys.version_info[0],
                                                   sys.version_info[1])
        else:
            title = u"Spyder (Python %s.%s)" % (sys.version_info[0],
                                                sys.version_info[1])

        if get_debug_level():
            title += u" [DEBUG MODE %d]" % get_debug_level()

        if self.window_title is not None:
            title += u' -- ' + to_text_string(self.window_title)

        if self.projects is not None:
            path = self.projects.get_active_project_path()
            if path:
                path = path.replace(get_home_dir(), u'~')
                title = u'{0} - {1}'.format(path, title)

        self.base_title = title
        self.setWindowTitle(self.base_title)
804620
def setWindowSize(self, winsz):
        """"""
        self.tracePlot.setWindowSize(winsz)
        self.stimPlot.setWindowSize(winsz)
1225544
def activateAndRaise(self):
        
        logger.debug("Activate and raising window: {}".format(self.windowNumber))
        self.activateWindow()
        self.raise_()
1195815
public void filterActiveWindow() {
    WindowFilter.Builder filterBuilder = WindowFilter.newBuilder();
    filterBuilder.setClearFilter(true);
    filterBuilder.addIncludeIDList(getActiveWindowId());

    executeMessage(WindowManagerMessage.MODIFY_FILTER, filterBuilder);
  }
815862
def move_active_window(x, y):
    
    window_id = get_window_id()
    cmd=['xdotool','windowmove', window_id, str(x), str(y)]
    subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
625267
def __get_window(self, hWnd):
        
        window = Window(hWnd)
        if window.get_pid() == self.get_pid():
            window.set_process( self.get_process() )
        if window.get_tid() == self.get_tid():
            window.set_thread( self.get_thread() )
        return window
962530
@Override
    public boolean setActive() {
        boolean activated = isActive();
        if (!activated) {
            WebLocator locator1 = new WebLocator(getPathBuilder().getContainer()).setElPath(getTitlePath(false));
            WebLocator titleElement = locator1.setInfoMessage(getPathBuilder().getText() + " Tab");
            activated = titleElement.click();
        }
        if (activated) {
            LOGGER.info("setActive : " + toString());
        }
        return activated;
    }
298924
void setActive(boolean active) {

        m_deactivationPanel.setVisible(!active);
        m_datesPanel.setVisible(active);
        if (m_seriesCheckBox.getFormValue().booleanValue()) {
            setSerialOptionsVisible(active);
        }
        m_controller.sizeChanged();
    }
168226
def get_active_window_pos():
    '''
    '''
    # http://stackoverflow.com/questions/26050788/in-bash-on-ubuntu-14-04-unity-how-can-i-get-the-total-size-of-an-open-window-i/26060527#26060527
    cmd = ['xdotool','getactivewindow', 'getwindowgeometry']
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    stdout = res[0].decode('utf-8').splitlines()
    pos = stdout[1].split(':')[1].split(',')
    geo = stdout[2].split(':')[1].split('x')
    x, y = int(pos[0].strip()), int(pos[1].split('(')[0].strip())
    w, h = int(geo[0].strip()), int(geo[1].strip())

    # get the window decorations
    window_id = get_window_id()
    cmd = ['xprop', '_NET_FRAME_EXTENTS', '-id', window_id]
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    decos = res[0].decode('utf-8').split('=')[1].split(',')
    l, r = int(decos[0].strip()), int(decos[1].strip())
    t, b = int(decos[2].strip()), int(decos[3].strip())

    return x-l, y-t
684970
def keep_only_current_window(self):
        
        self.tab_pages = [TabPage(self.active_tab.active_window)]
        self.active_tab_index = 0