TrilbyWhite / alopex

A tabbed tiling window manager, with fur.
36 stars 4 forks source link

Full Screen Focus Issue: Back with a vengence #13

Closed HalosGhost closed 11 years ago

HalosGhost commented 11 years ago

Looks like 2fa4e1907b2bf4a5f1fa2cb12865b4c47219e77f has brought back the issue documented in Issue #11 .

Thoughts?

TrilbyWhite commented 11 years ago

Hmm, I was about to say I couldn't replicate the issue - but then I did, but only uder certain circumstances. It seems to depend on the order in which windows were opened on the tag with the fullscreened window.

I've been struggling with figuring out which window should get focus when one changes tags/views. If I don't refocus anything this problem doesn't exist - but this can be odd to.

If I open some terminals on tag 1 and a web browser on tag two, switch to tag one, do some work on the terminals, then switch to tag two, the web browser doesn't get focus.

This is actually nice for some purposes - focus stays where you put it - but it is a hassle in other cases. I can't switch to the browser tag, and hit a browser key-shortcut to do anything.

To avoid this annoyance I had ttwm focus a window on the currently active tag whenever there is a tag change. But I haven't found a reasonable way of doing this. Input would be welcomed.

HalosGhost commented 11 years ago

So, is the current intended functionality that focus should remain where the user has last left it? Because that's not quite what I am experiencing. For instance, the specific problem that I'm having is that when I switch back to a full-screened video on a tag separate from the one I had visible before, the terminal from which the video is playing is risen above the video itself. To me, that would imply that the focus is not remaining where I last placed it, for the last place I had focused was, in fact, the full-screened video.

I actually quite like the notion of focus remaining with the last focused window on any given tag, but that only works if TTWM is capable of remembering the last window I had focused correctly.

TrilbyWhite commented 11 years ago

No, that would be the behavior if I didn't have it refocus on every tag change. But this would not leave focus where the user last placed in on that tag, it would leave focus on whichever window globally last had it. So in many cases you'd switch to a tag, try to type something in a window, but the characters would be sent unseen to a window on another tag which still had the focus.

That was very bad.

The current problems were side effects of my short-sighted fix.

I've tried out a better fix now: when you switch tags a few tests will be done: 1) if the focused window is on one of the selected tags, leave it be. 2) otherwise if there is any window on the newly chosen tag (or tag set) then focus the first one found, but 3) also check for any fullscreen windows on the newly selected tag set and focus them if present.

HalosGhost commented 11 years ago

Ahh, this sounds like a good compromise. I will test your fix shortly. I like it.

Closed as per f7a0cba77bfffe9aabc4944186ea68594f7c06c4