Age | Commit message (Collapse) | Author |
|
In preparation for vwm_overlays_* encapsulation of overlay global state
and general cleanup therein.
|
|
We need to eventually plumb an vwm_overlays_t reference back to sample_cb,
for now we'll just obviate the need for the vwm_ptr global by plumbing the
vwm_t through.
|
|
|
|
If walking ancestors never entered the loop, bar_y isn't set.
Set the bar_y once per row, and independent of ancestors. This
is obviously more correct and fixes a situation where the siblings
have children but there are no ancestors (siblings under the root).
Surprisingly this isn't generally observed in vwm, but was noticed
in vmon development.
|
|
This was a known bug, there's a TODO sitting right there noting it.
The items array was sized very large so it never triggered and was
forgotten about.
Running `make tags` in the linux kernel source steps on it though,
because it constructs a massive argv.
This just adds a bounds check so no crash occurs in argv2xtext().
I don't see the point of allocating memory for this as the TODO's
suggested, since any such argv is unlikely to fit in the overlay
anyways.
Also shrunk the max from 1024 to 512, which is still quite large.
|
|
If vmon hasn't seen any heirarchical changes, and we aren't forcing a redraw,
and the process information being shown isn't changed, don't bother
re-rendering the same thing the overlay already contains.
This can be further improved, like if only wchan changed and nothing else, only
redraw the wchan column for the relevant row. It gets tricky quickly though,
because a new wchan could be wider than the column currently permits for
example, then we'd need to go render all the rows to the new wchan column
width...
It's simpler to just redraw it all if anything has changed, and this stuff
doesn't generally change that frequently in practice so it's pretty effective
as-is.
|
|
|
|
Set on window resize, clear on draw_overlay() return.
Used in combination with sample_interval check to gate HZ redraw.
Will be used to gate redraw of process monitors heirarchy as well,
in a subsequent commit.
|
|
Also moved vertical graph bars drawing to helper function
|
|
We currently only use the width, and XTextExtents does substantially more crap
per character in Xorg's xlib. XTextWidth is not just a wrapper around it, it's
a specialized subset implementation.
|
|
Long overdue house cleaning.
The addition of compositing/monitoring overlays in vwm3 pushed vwm well past
what is a reasonable size for a simple thousand line file. This is a first
step towards restoring sanity in the code, but no behavioral differences are
intended, this is mostly just shuffling around and organizing code.
I expect some performance regressions initially, follow-on commits will make
more improvements to that end as the dust settles.
|