mixu / nwm

Tiling window manager for X11 written in Node.js
http://mixu.net/nwm/
MIT License
789 stars 72 forks source link

Switching focus to second screen requires that a window is present #19

Closed mixu closed 12 years ago

mixu commented 12 years ago

I missed this case when refactoring the focus code: if the desktop is empty, then there is no window, so the screen does not get focused when hovered over. This means that you need to move a window to the second screen on a dual screen setup to switch focus.

If you have windows on both desktops, then focus switching works fine, but should fix this, though it's not too hard to live with.

ashnur commented 12 years ago

This started to bother me in the past few days. Are there any suggestions on how I might be able to fix it?

mixu commented 12 years ago

It's probably the enternotify logic around https://github.com/mixu/nwm/blob/master/src/nwm/nwm.c#L640

mixu commented 12 years ago

Finally had some time took look at this, and this is now fixed! nwm will correctly switch monitor, even if the second monitor is empty. I'm closing it since I was the reporter, but feel free to reopen if you run into issues.