deter0 / xborder

Active window border replacement for window managers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why only the active border? / hints on finding ALL visible windows.

acidkewpie opened this issue · comments

I may be missing a key point but I don't see why this only addresses the border of the active window. In my case I think I can use this to nicely deal with the fact it's impossible to not show, or at least allocate screen space for, a title bar of some form with stacked i3 tabs. it's possible to squish the title bar down to about 4px and then draw a border around the real window that overlap the space the title bar is drawn in, and make a stacked vs non stacked window look identical... I think...

Digging through code I've updated it to draw a border for every suitable window, but at present (and hopefully this post is the key to me immediately finding the solution somewhere else!) I see no way within the confines of wnck (i.e. sticking with your approach) to find which windows are actually visible on screen across multiple monitors. the "visible()" functions still show true if a workspace as a whole is not visible, and the "active_workspace()" ones naturally only return the active workspace, but all the top ones across the whole screen. There are various tools one could shell out to, but as you've managed to very nicely stay doing your think without doing so, I don't want to break that if possible!

Again, that you only look at the active window feels like my requirements (Well, I don't have requirements, I'm just playing around and amusing myself of course...) might just totally be missing with yours, and drawing ALL visible frames then naturally leaves having to deal with partially hidden frames and such... which could be ... fun... :-s

commented

I have played around with in the testing branch and have gotten it to work with all windows just the problem is performance. Right now I'm pretty busy but if I get time I could optimize the testing branch and merge it.

Ah right you really simplified the testing code i see, interesting. Wasn't using that. I think though you'll have a problem dealing with both multiple monitors and new workspaces. Of course, if you don't care about that, it's a non issue for you. Driving me mad there's no simple way to find which windows are actually visible across multiple workspaces. I got to find which monitors contain which workspaces, and from zipping the gdk window stack and wnck window stack I can reliably find which are the windows in the highest workspace on each monitor, but that doesn't cover the case of a new workspace opening, as it contains no windows, and I can't tell it exists in a useful way via gdk or wnck as far as I can tell. Looks like it should definitely be something wnck should do, but no one wrote that function. I'm looking to convert the whole thing over to not use wnck at all now though, coding specific wm's ipc interfaces etc. Until I get bored!