* refs/heads/master: (34 commits)
Make it clear these are flags.
Remove duplicate check that strsubmatch() already does; while here, fix a comment.
Sprinkle __func__ in appropriate error messages.
Get rid of 'matchname'; it's too surprising to have the menu change during client search as different potential str matches are cycled through. If there's interest, the only string that doesn't exist in the listing is the window's class - that can be added of course, but it makes the line too long imho.
clean up search_match_client(); no behaviour change
Refactor callbacks to take a void * so as to not try and generalize into client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context.
remove another unused proto
Rename 2 kbfunc to match closer to what they do
Add an argument to the callbacks to pass the xevent context, button or key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road.
Check the ptr bounds in the new client during cycling, since not all actions do ptrsave, such as restoring client geometry; adapted from a diff by Vadim Vygonets.
More accurate to say 'toggle', rather than 'select', for group[n]/nogroup.
Add CM-a for 'nogroup' (CM-0 stays for now); update manpage to reflect.
Stash wmname into conf.
When removing xrandr regions, ensure clients are within the bounds of the screen; adapted from an ancient diff from Sviatoslav Chagaev. Things in this area will likely change, but put this in so it works now and serves as a reminder.
Calculate client nameqlen in client_setname(), the only place it's needed/used.
Turn CALMWM_NGROUPS define into variable, ngroups.
Start simplifying menu code; and in turn, remove a cursor no longer needed.
Defaults are split between defines and conf_init(); normalize these, as well as give 'sticky' groups its own variable.
For both kb and mouse move, it is possible to grab a client and move it completely off the screen/region; instead, if the pointer is outside of the client bounds, warp the pointer to the closest edge before moving.
client_ptrwarp should not deal with unhiding or raising clients (non ptr requests); most callers do this already - deal with the few that do not. client_ptrwarp becomes a simple wrapper (setpos) but it will be expanded.
...
client search as different potential str matches are cycled through. If there's
interest, the only string that doesn't exist in the listing is the window's
class - that can be added of course, but it makes the line too long imho.
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's
based on context.
While here, limit some globals, replace defines with appropriate variables and
fix some naming.
key press. This allows to remove a few hacks to duplicate functions only
for behaviour changes; now differing behaviours are pushed down to the
callback. Also will allow for previously unavailable actions to be bind-able
down the road.
the screen; adapted from an ancient diff from Sviatoslav Chagaev. Things
in this area will likely change, but put this in so it works now and
serves as a reminder.
mousefunc_menu_{client,cmd,group} into the respective
kbfunc_menu_{client,cmd,group} functions; simply pass a flag down from
config denoting mouse action behaviour.
* refs/heads/master:
During init, query screen for _NET_ACTIVE_WINDOW and set that client as active; while we already look at what's under the pointer, use this information first, then look under the pointer (saving that round-trip). This restores the active state to a client after restart even if the pointer is not above it (and of course the pointer is not above another client).
active; while we already look at what's under the pointer, use this
information first, then look under the pointer (saving that round-trip).
This restores the active state to a client after restart even if the
pointer is not above it (and of course the pointer is not above another
client).
* refs/heads/master:
Some clients fail to setup hints at all, so initalize for them; fallout from r1.218 switching to malloc - clearly missed this case.
Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag instead of relying on curcc.
init label
Limit mouse resize to hints within the client; matches kbd resize behaviour.
Switch to just malloc since we need initialize most everything anyway.
change 'sticky' to 'stick' to toggle client stickiness (seems the default binding worked for everyone for a long time!); conflict with group sticky found by Ali Farzanrad - thanks!
Simplify group_holds_only_hidden(); from Vadim Vygonets.
Simplify toggling flags; from Vadim Vygonets.
Do not draw borders on ignored clients when returning from fullscreen; from Vadim Vygonets.
Remove redundant minimum client size adjustment (minw and minh are always positive since r1.214); from Vadim Vygonets.