question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vscode.window.state.focused not working with i3 window manager

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.66.0-dev
  • OS Version: Ubuntu 22.04 LTS

Steps to Reproduce:

Apologies if this is not the right place to post this, I didn’t see it in the above links. This issue occurs for extension developers trying to use the vscode.window.state.focused API.

  1. Open up VSCode. Add a focus tracker like the following in the DevTools console:
vscode.window.onDidChangeWindowState(state => {
  console.log('state change', state.focused);
});
  1. Check to make sure this works by switching tabs. This should be working as intended.
  2. Try switching windows with the i3 window manager. You should see that the console log has not been triggered.

Thanks for your help and for building such a great product!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jriekencommented, May 17, 2022

@joaomoreno you added this API

0reactions
KevinVillelacommented, Dec 10, 2022

Hi @deepak1556, thanks very much for your response! Yes, I did find a way to reproduce this without i3. It seems like if you are on a more standard window manager (such as GNOME), switching windows does not cause the focused attribute to change either. So actually, this seems like a much larger issue than just not working with i3 - it doesn’t work for switching windows in general, only for switching tabs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This seems like a good time to plug my tiling window manager ...
I run linux at home but Windows at work, so I miss i3 a lot. ... there are a few bugs, mostly around...
Read more >
Accessibility in Visual Studio Code
Learn here about the various ways VS Code aids user accessibility. ... with the View > Zoom In / Out commands, the zoom...
Read more >
Can you game in i3 window manager? : r/linuxquestions
yes i3 has a fullscreen short cut which is mod + F which u can full screen a window. I use it all...
Read more >
i3 User's Guide - i3 Tiling Window Manager
Only commands can be executed at runtime, not config directives, see [list_of_commands]. 4.15. Don't focus window upon opening. When a new window appears,...
Read more >
My Linux desktop environment (2021 update) - Sebastien Wains
I started looking at how other tiling window managers were ... And I'm not unhappy to have i3 around, should I mess up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found