Skip to content

Conversation

@Kwaadpepper
Copy link

fixes #83
Fix the deadlock issue caused by --sync (removed --sync since it is useless)
Fix the Chromebased since it needs focus before send input
Fix Firefox bug with xdotool since invisible window is returned by xdotool --visible-only
Added Opera support for linux
Added Chromium support

@Kwaadpepper Kwaadpepper force-pushed the linux-fix branch 4 times, most recently from 47b9b36 to de67da8 Compare September 23, 2015 17:17
@gcollazo
Copy link
Owner

@Kwaadpepper I don't have a proper linux testing environment. Can you share what kind of testing you did and what's the environment like?

@Kwaadpepper Kwaadpepper force-pushed the linux-fix branch 6 times, most recently from 618b044 to 34a76ef Compare October 14, 2015 14:25
@Kwaadpepper
Copy link
Author

@gcollazo
Hey i'll try to explain what i did here. I have first noticed --sync should not be used since this plugin does not actually launch browsers so it makes ST freeze.

I have then noticed a bug with Firefox using xdotool where --only-visible would not work as expected, so using wmctrl to detect browser with window name and a regex is a pretty good work around since all browsers have their name in the window title (except epiphany).

I have noticed xdotool actually handles multiple desktop and it sometimes explode at your face if you don't actually specify the desktop XGetWindowProperty[_NET_WM_DESKTOP] failed (code=1).

There is a well know bug where chromebased navigators aren't listening to keys that are 'synthetic', this means the input system on linux (xorg input i would say) make a difference between real input send and program keys send, plus any window can choose to just ignore stuff.

So there are 3 methods added in the code for all these cases.
I also tested on Kubuntu 15.04 and 15.10 all available browsers in this PR to make sure everything is working and good handling of any exceptions.

SendKeyToAllWindows is the normal method
SendKeysToAllNamedWindows is using window name
SendKeyToAllWebkitBasedNavigators force windowactivate with xdotool and refocus sublimetext if the option activate is on false
print_error is refactored
getDesktop provides the actual desktop for xdotool

firefoxdev is firefox in linux whereas nightly is nightly, i just added support for nightly to Linux since i don't own mac or window stuff.
I believe chromium support could be added to windows so as nightly.

To conclude, i just noticed another bug : you actually have to run the plugin twice to make its first refresh (eg use the shortcut twice).

If any question there is anwser will follow. I spend lot of time to make this happening.

PS: #56 should be close as the PR has invalid workaround.

@Kwaadpepper Kwaadpepper force-pushed the linux-fix branch 2 times, most recently from 3559b30 to a2536ea Compare October 14, 2015 14:45
Fix the deadlock issue caused by --sync (removed --sync since it is useless)
Fix the Chromebased since it needs focus before send input
Fix Firefox bug with xdotool since invisible window is returned by xdotool --visible-only
Add xdotool --desktop to search for compatibility purpose
Add dependency to wmctrl
Add Opera support
Add Chromium support
Add Midori support
Add QupZilla support
Add Konqueror support
Add Vivaldi support
Add custom window support for linux only
Add Firefox Nightly builds support (should be the same on mac, linux and windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux xdotool hangs if window type not found (not opened) -> subl hangs

2 participants