cornerman / i3-easyfocus

Focus and select windows in i3
GNU General Public License v3.0
172 stars 12 forks source link

Labels are stationary #1

Closed Airblader closed 9 years ago

Airblader commented 9 years ago

When a window is reconfigured (resize, move), the label does not update its position.

cornerman commented 9 years ago

Nice idea, we could listen to i3's window-events and trigger a redraw of all labels if the layout has changed. I hope the events are also emitted when resizing a window.

Airblader commented 9 years ago

Mh, why even use the IPC at all for these things? I think this tool could be made completely window manager agnostic. The IPC could still be used as an "adapter" for when the internal con id should be printed or whatever, but is there a specific reason why you didn't just query the root window's tree (for the window positions) and select ConfigureNotify for this feature?

cornerman commented 9 years ago

That was also my first intuition, but afaik it is not possible to get the position of the window decoration from there, which is crucial for properly positioning labels in a stacked/tabbed layout. Also I am not sure, whether it would then be possible to only iterate the visible part of the tree.

As I would also love this project to be window manager agnostic, please let me know if I am missing something. Currently, an adapter for another window manager would need to implement the methods in ipc.h.