gcollazo / BrowserRefresh-Sublime

This plugin will switch from ST2 and ST3 to Google Chrome, Google Chrome Canary, Safari, Firefox or Opera and reload the active tab
http://gcollazo.github.com/BrowserRefresh-Sublime
565 stars 61 forks source link

"activate" argument can work in Linux! #91

Open TomaszGasior opened 8 years ago

TomaszGasior commented 8 years ago

In file linux/init.py i found this information: `def init(self, activate_browser):

activate_browser is always true on Windows since you can't

    # send keys to an inactive window programmatically. We ignore it.
    self.activate_browser = activate_browser`

This is not true. This is possible according to window manager used by user desktop environment. I use for example XFCE4 and his Xfwm. When I remove from linux/init.py on line 40 "windowfocus" command I can refresh browser without window focusing.


I fount after moment second problem. There is used "--sync" switch for xdotool. It causes problems when browser in "browser" parameter is not open. Sublime hangs because xdotool wait for window that is not open.