summaryrefslogtreecommitdiff
path: root/src/window.c
AgeCommit message (Collapse)Author
2024-07-28*: switch to gplv2Vito Caputo
Part of the reason for adding headless support in vmon is to facilitate embedded use cases. These are often incompatible with anti-tivoization aspects of gplv3. I am the copyright holder of all this stuff so it's entirely fine to switch to gplv2. Phil Freeman contributed one trivial patch (4183fbd), regardless I checked if he had any objections to the gplv2 switch and he had none. So here we go, gplv2 all the things.
2023-10-19window: constify vwm_t in vwm_win_get_focused()Vito Caputo
There needs to be a bunch of this throughout the codebase, but just doing this spot fix to silence warnings introduced by subsequent commits... preparatory commit for rmd integration
2021-12-24window: fix VWM_TRACE() vestigial desktop name printVito Caputo
Once upon a time names were going to be added, but that never came to be and at some point that unused member was removed. Turns out -DTRACE builds have been broken since.
2021-10-23window: don't crash in assimilate unexpected caseVito Caputo
the non-empty focused_desktop having NULL focused_window shouldn't be possible, but it just happened to me again while playing with eon's WIP windowed/fullscreen/fillscreen tristate branch. Though exceedingly rare, it's annoying, so log the bug and don't crash.
2021-01-02*: replace the "shelf" with "contexts"Vito Caputo
This is unfortunately a bit of a large commit, but it's at least pretty much all on-topic for the generalized "contexts" feature. Rather than waste time trying to split this further into smaller commits, I'm just landing it as-is, now that I've lived with the interaction model long enough to not completely hate it. I fully expect to revisit this in the future. One TODO item in particular I'd like to note is "sending" windows to contexts always creates a new virtual desktop for the sent window in the destination context. What should really happen is the destination context should be checked for an empty desktop, and a new desktop created only when there isn't an empty one to be reused for receiving the sent window. Note this only affects non-migrate sends, as migrates (modified by Shift) explicitly use the existing focused desktop at the destination context. See the README for more information on how contexts work and what's different about the interaction model. It's fairly minimal, most of what you already know how to do should keep working as-is. The only oddity would be Mos1-s no longer "shelves" windows, it's now a modifier to turn "migrates" into "sends", and by itself is a noop now. Colors used for contexts haven't been refined and are enumerated in src/context_colors.def.
2021-01-01*: return MRU object from _mru() funcsVito Caputo
minor ergonomic improvement; enables plain wrapping of creates or other relevant object pointers with _mru() calls without requiring an intermediate storage variable.
2020-12-23desktop: drop unused desktop namesVito Caputo
At some point I wanted to support naming virtual desktops, but that never materialized and I don't find myself wishing it was there.
2020-12-23*: introduce and use direction parameterVito Caputo
This adds a direction parameter to vwm_desktop_next{_mru}() and vwm_win_focus_next(), deprecating _prev() variants in favor of a vwm_direction_t parameter. XK_r has been wired up as a modifier for reversing the direction of actions like Mod1+Tab (window next MRU cycle) and Mod1+Space (desktop next MRU cycle). So now if you overshoot, simply hold the "r" key and repeat the operation to go back, much like how Shift is often used for reversing alt+tab in i.e. Windows.
2018-10-23*: update copyright lines to include 2018Vito Caputo
2018-10-23window: vwm_win_focus_next() skip shelf unmap/mapVito Caputo
When the shelf isn't the currently focused context but the focus next is relative to the focus context the mapping manipulation shouldn't be performed. This would cause unexpected appearance of shelved windows in a virtual desktop should a shelved window become invisibly unmanaged. Simple way to repro is to shelf an mplayer window. When the movie finishes, if you're on a desktop, out of nowhere the next shelved window appears but you're not supposed to be looking at the shelf. A simple visit to the shelf then back to the desktop would undo the anomaly, but it's trivial to fix - hell there was already a FIXME/TODO sitting there.
2018-10-23window: trivial simplification of vwm_win_lookup()Vito Caputo
2017-11-28window: discover allscreen on configure tooVito Caputo
Previously only windows fitting the screen dimensions @ assimilate would become automagically "allscreened". Newer mplayer seems to break this heuristic, so expand the application of the heuristic to include configure requests as well.
2017-11-27window: improve vwm_win_manage_xwin() tracingVito Caputo
Use VWM_TRACE_WIN() and add a trace for when we try manage an xwin.
2017-10-05window: split out focused window setterVito Caputo
vwm_win_focus() previously simultaneously told the X server to set the input focus on the window (if mapped) and set the internal vwm state of the window to focused. These are really two separate operations: 1. request the X server to focus the window 2. change vwm's concept of the currently focused window Since clients can call XSetInputFocus() as well, there's need for doing step 2 discretely in response to FocusIn events. Nothing is functionally different after this commit, it just exposes step 2 as a separate vwm_win_set_focused() function for a future commit to leverage in handling of FocusIn events.
2017-10-05*: s/vwm_win_focused/vwm_win_get_focused/Vito Caputo
2017-04-07window: move console identification to helperVito Caputo
2017-04-04window: drop configuring member from vwm_window_tVito Caputo
Rather than setting this configuring flag for the sake of vwm_screen_is_empty() to ignore, simply supply the xwin to ignore if desired.
2017-03-27*: update email address: s/gnugeneration/pengaru/Vito Caputo
2017-03-25*: add some missing includesVito Caputo
2017-03-25*: more minor style fixupsVito Caputo
2017-03-25*: restore old indentation of switch casesVito Caputo
In the course of applying the new style over the rest of the code I decided it's obnoxiouos and prefer the old way of indenting the cases one level from the switch. I know it wastes horizontal space and can see the value of flattening the cases with the switch, but once you start having variables at the start of the switch body, and blocked cases, it just starts becoming quite unattractive without the indentation.
2017-03-25*: s/malloc/calloc/Vito Caputo
Eliminate some 0/NULL initializations.
2017-03-25xwindow: s/xwindow->mapped/xwindow->client_mapped/Vito Caputo
This member reflects if the window is mapped from the client's perspective, not necessarily if the window is currently mapped (since vwm maps and unmaps windows the client has mapped in the course of providing virtual desktops) Changing the name for better clarity, since it's a bit ambiguous as-is.
2017-03-24xevent: cleanup vwm_xevent_handle_map_request()Vito Caputo
Long overdue tidying of the map request handling. This moves all the window classifying and placement stuff into a separate helper, adding a call to that in vwm_win_manage_xwin(), where this always belonged. The map request handling now just manages windows that aren't already managed, then lets the usual "is this window mapped?" logic filter the map request. This should fix a lingering bug where a window on the unfocused desktop would become spuriously visible if the client mapped it. Firefox started doing this recently when a page finished loading.
2017-03-24window: cleanup vwm_win_focused()Vito Caputo
We can assume (vwm->focused_desktop != NULL), the initial desktop is created early in startup and the last one can't be destroyed.
2017-03-21*: update copyrights for 2017Vito Caputo
2017-03-14*: trivial code formatting cleanupsVito Caputo
I'm no longer fond of combining one-line conditional statements on the same line as their conditional expression.
2017-03-14vwm: utilize vwm_xserver_t, minor refactorVito Caputo
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.
© All Rights Reserved