summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-14libvmon: add "sys-wide" arg for sample callbacksVito Caputo
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.
2017-03-14vwm: utilize vwm_xserver_t, minor refactorVito Caputo
2017-03-14xserver: introduce isolated core xserver apiVito Caputo
In preparation for monitoring overlays being shared across vwm and vmon, adding a common xserver abstraction for both to use and overlay to depend on.
2017-03-14*: add some missing string.h includesVito Caputo
2017-03-14vwm: split out helper macros into util.hVito Caputo
In preparation for separating out the monitoring overlay code from being vwm-coupled, moving these into an independent header since they'll be used throughout.
2017-03-14overlay: fix heirarchy tee/cap drawing bugVito Caputo
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.
2017-02-22Trivial cleanup and small (but continuous) memory leak fixVito Caputo
Tidy up vwm exit handling and stop leaking an X Region on every clean vwm_composite_paint_all(). If you noticed very long-running vwm instances hogging memory like a web browser, this is the culprit, vwm doesn't typically need much memory.
2017-02-22composite: fix occluded region leakVito Caputo
When vwm_composite_paint_all() short-circuited, occluded wasn't destroyed. Defer the occluded region create to its time of need, which is after the short-circuit, and followed immediately by its destruction.
2017-02-22vwm: use vwm.done to signal quitVito Caputo
This moves the console teardown back to vwm.c, trivial cleanup.
2017-02-02configure: don't generate config.hVito Caputo
it's not being used for anything as of now.
2017-02-02.gitignore: suppress more autotools junkVito Caputo
2017-02-02build: add autotools bootstrap scriptVito Caputo
2017-02-02libvmon: use readdir() instead of readdir_r()Vito Caputo
readdir_r() has been deprecated in glibc
2017-02-02launchers: s/iceweasel/firefox/gVito Caputo
2016-12-19xevent: implicitly manage window in MapNotify handlerVito Caputo
Sometimes `mplayer -fs` would result in an unmanaged window. It seems to be due to an unexpected ordering of events on the window: create notify 0x1000001 creating 0x1000001 map request 0x1000001 managing 0x1000001 configure request 0x1000001 unmap notify 0x1000001 from configure 0 unmanaging 0x1000001 configure notify 0x1000001 map notify 0x1000001 <----- this happens after the window has been unmanaged! configure notify 0x1000001 configure request 0x1000001 configure request 0x1000001 configure request 0x1000001 configure request 0x1000001 configure notify 0x1000001 So in handling MapNotify, if the window is !managed && !override_redirect, manage it. This is confirmed to fix the occasionally unmanaged `mplayer -fs` window.
2016-12-18overlay: fix bug with extraordinarily long argvsVito Caputo
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.
2016-11-10Merge pull request #8 from vcaputo/decrement_key_is_grabbedVito Caputo
key: decrement key_is_grabbed release of multi-Alt
2016-11-10key: decrement key_is_grabbed release of multi-AltVito Caputo
Upon releasing all keys concluding a grab the counter gets reset so this isn't generally observed as being a problem. Sometimes the second Alt is released by itself, restoring the origin, and the original grabbing single Alt persists for subsequent window management operations. It's in this situation when the bug manifests. If the final Alt release occurred with a focused window/desktop differing from the origin, on the final Alt release an unexpected restore to the origin occurred. Usually this goes unnoticed, because typically the lone Alt release occurs immediately following the other one, and the second restore to origin happens to be idempotent.
2016-09-09Merge pull request #6 from vcaputo/clean_houseVito Caputo
House cleaning
2016-09-09overlay: short-circuit draw_heirarchy_row() if unchangedVito Caputo
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.
2016-09-09libvmon: clear {children,threads}_changed when samplingVito Caputo
The samplers may set these, but we need to clear them on every vmon_sample().
2016-09-09overlay: move heirarchy row drawing to functionVito Caputo
2016-09-09overlay: introduce overlay.redraw_neededVito Caputo
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.
2016-09-09overlay: split IOWait/Idle from rest of recursive draw_overlayVito Caputo
Also moved vertical graph bars drawing to helper function
2016-09-09overlay: use XTextWidth instead of XTextExtentsVito Caputo
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.
2016-09-09build: Adopt GNU automake (and thus autotools)Vito Caputo
Trying this out now that there's a pile of files... sigh. Note this spuriously duplicates list.h @ src/libvmon/list.h, the old Makefile shared list.h between vwm and libvmon, but I'm letting them have their own instances with autotools. Libvmon was always an independent project I just pulled in for vwm's use, and will likely continue to be developed independent of vwm with occasional syncs.
2016-09-09*: refactor all the thingsVito Caputo
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.
2016-08-14Merge pull request #5 from vcaputo/spacesVito Caputo
I've warmed up to space after control flow keywords
2016-08-14I've warmed up to space after control flow keywordsVito Caputo
Approximately: s/if(/if (/g s/switch(/switch (/g s/do(/do (/g s/while(/while (/g s/for(/for (/g Macro use continues to be spaceless, even when used as control flow primitives (i.e. list_for_each()), as do function calls.
2016-08-14Merge pull request #4 from vcaputo/fix_focus_of_unmapped_winsVito Caputo
Fix handling of non-visible focus switches
2016-08-14Set input focus in vwm_win_focus() when is_mapped()Vito Caputo
It's inappropriate to assume the window being focused is in the visible context. This caused the input focus to spuriously vanish if a window on another desktop went away causing the next one, also invisible, to get focused. I'm surprised how long I went without ever noticing this bug! My workflow basically never has windows vanishing that aren't in the focused context.
2016-08-14Discard context arg from vwm_win_focus_next()Vito Caputo
This can just be derived from the state of the basis window, I think originally I had intended to implement context switching via this function. Also changes the implementation to stop comparing against focused_(shelf,desktop) which prevented doing transitions on invisible contexts. It's not usually an issue, but windows can go away at any time, and we must be able to focus next when they do, even if their context isn't the visible one.
2016-08-14s/vwm_xwin_is_visible/vwm_xwin_is_mapped/Vito Caputo
Renaming to better describe what this actually checks. Initially I was leaning towards adding a data structure for actual visibility checks rather than just assuming all vwm-mapped windows are visible. But there's a need for knowing just if windows are currently mapped as well, so this function can stay implemented this way with the appropriate name.
2016-06-28Clear the mapping bit when swallowing vwm-triggered MapNotify events.Vito Caputo
I didn't experience any bug in particular which brought this to my attention, but it's an obvious omission, though apparently quite ignorable.
2016-01-03Cleanup random stray whitespace charactersVito Caputo
2016-01-03Fix missed keyboard ungrab when alt was released with others still pressedVito Caputo
2016-01-03Trivial cleanup: s/Mod1Mask/WM_GRAB_MODIFIER/gVito Caputo
2015-05-16Minor reformatting cleanupsVito Caputo
2015-02-21Introduced a 'refocus original window' operationVito Caputo
See changes to README, but basically if you're holding down Alt and doing some window management operations, while still pressing Alt hit the other Alt key to return focus to the starting window+desktop. Nothing is undone, focus is simply returned to the starting window+desktop.
2015-02-21Added .gitignore for build artifactsVito Caputo
2014-10-18Merge pull request #1 from vcaputo/auto_allscreenVito Caputo
Automatically "autoconf" screen-sized new windows as "allscreened"
2014-09-28Automatically "autoconf" screen-sized new windows as "allscreened"Vito Caputo
This enables automagic mplayer -fs borderless fullscreened playback windows with minor additions to the code. Previously one had to focus the playback window and mod1-triple-k it to lose the borders, now it "just works".
2014-09-28Reflowed keystroke section of README to 75 wide, mostly for the github UI.Vito Caputo
2014-09-28Switched launchers to execute via "/bin/sh" rather than "bash"Vito Caputo
Using bash was a bit heavy-handed when all I really want is a /bin/sh -c just like popen()/system(). On some systems this won't make any difference, but on Debian /bin/sh -> dash.
2014-09-14 Import of vwm3 changes from published source tgzVito Caputo
Major changes from vwm2 include: - Introduction of integrated X client process and descendants monitoring in the form of per-window composited overlays. The rendering is done using the Composite, Damage, and Render extensions. When the monitors are visible, vwm3 is a compositing manager. When invisible, vwm3 continues to be an immediate-mode classic X11 minimalist window manager. Monitors are toggled via Mod1-;, Mod1-LeftArrow and Mod1-RightArrow may be used to decrease and increase the sampling frequency, respectively. Mod1-' clears the monitored tasks history for the focused window when monitoring is visible. This feature depends on the CONFIG_CHECKPOINT_RESTORE kernel configuration option for the discovery of descendant processes. Without this kernel option enabled, you'll only get a single process monitored per window; the X client process as indicated by the _NET_WM_PID atom of the window. A library called libvmon has been introduced for the abstraction of lightweight system and process statistics sampling. Since vwm2 received backported features unrelated to monitoring or compositing while vwm3 was developed, there isn't really much difference between the two outside the monitoring context. This isn't to say there isn't much activity in the code, the addition of compositing and monitoring requires a substantial amount of code relative to the scale of vwm[12].
2014-09-14Import of vwm2 changes from published source tgzVito Caputo
Major changes from vwm1: - GNU screen-based "console" integration for monitored launching of X clients via screen remote commands, replacing the simple double fork approach used in vwm1. Clients exiting with non-zero status retain their screen window in the console for 86400 seconds, facilitating easier debugging and troubleshooting. The console xterm is accessed in the shelf and has a red border by default. - Xinerama/multihead support backported from vwm3, including the "screen fencing" implementation facilitating screen-oriented window focus cycling. Shifting the Mod1-Tab window cycling focuses the next most recently used window on another display. Unshifted stays confined to the current display. - SYNC extension integration for prioritizing the WM over other X clients - setpriority() integration for "nicing" X client processes relative to the WM process - "autoconf" windows, horizontal/vertical halfscreen windows, quarterscreen windows in addition to the full/all screen functions. Mod1-[ and Mod1-] resize the focused window vertically with left and right justification to half the screen in width. Shifting these does the same thing just horizontally. Repeating the operation with a second ] or [ press quarters the window in the respective screen corner, extending upon the repeater pattern established in vwm1 for full/allscreen windows with Mod1-k[k[k]] - Exit now requires 3 consecutive strikes of Mod1-Esc - Introduction of a README file
2014-09-14Initial import of vwm1 from published source tgzVito Caputo
- Basic window management, window resizing, virtual desktops and shelf implementation - Simple double fork execution of launched clients
© All Rights Reserved