okan
496bcc879d
whitespace
2022-02-26 15:19:18 +00:00
op
7c22b36a23
Add group-last command that shows only the previously active group; ok okan
2022-01-27 18:45:10 +00:00
tim
6c7b8261df
Simplify conditional construct.
...
OK okan@
2020-03-20 18:50:08 +00:00
okan
207b71ef1c
No need to lookup current client early; move to right before it is
...
needed.
2020-03-20 12:13:20 +00:00
okan
96275a835d
Unrelated style fixes, consistency changes and sorting, appropriate
...
dosage/removal of wrappers, simplification of name queue, client cycle joins
other kb/mb bound functions.
2020-02-27 14:56:39 +00:00
okan
2fc191f978
Ensure the pointer stays within client bounds after a window 'snap' (to edge).
...
reported by Stefan Hagen.
2020-01-21 15:50:03 +00:00
okan
781af9c998
Because cwm warps the pointer during a client move (to stay within the client),
...
there's a window of time where an expose or enternotify event will get
generated for a lower client; use a hammer and drain events after keyboard
move/resize, until such a time that cwm doesn't warp the pointer. Behavior
noticed by kn.
ok kn@
2019-08-13 18:45:38 +00:00
okan
7c45b87622
Teach client_current() to use a screen to find the current client instead of
...
iterating over all (fallback if no screen provided for now). Initially convert
trivial uses of client_current().
2019-03-07 14:28:17 +00:00
okan
b26202724a
shuffle deck chairs: rename group actions to match intent for clarity
2019-03-07 12:54:21 +00:00
okan
0bda8f7606
Separate out the menu window from the client resize/move geom window; in each
...
case, create and destroy on-demand. Isolate more menu specific code.
2019-03-04 19:28:17 +00:00
okan
a5ba9aa9da
Add 'group-close-[n]' action to close all windows within specified group.
...
heavily based on a diff from Nam Nguyen.
2019-02-25 16:40:49 +00:00
okan
535cf541c8
Rename internal functions to delinate between client remove, delete and xproto
...
delete; 'window-close' is now the proper action, but 'window-delete' as an
alias will remain until more interesting changes require breaking configs.
2019-02-22 19:40:32 +00:00
okan
c307e37dcb
fix missing includes
2019-02-13 15:43:24 +00:00
okan
6e7dbf5bb7
Convert menu-exec-wm from an abritrary exec menu, into a config-based menu from
...
which one may configure (wm <name> <path_and_args>) (and choose) specific
window managers to replace the running one. 'wm cwm cwm' is included by
default.
No objections and seems sensible to sthen.
2017-12-29 20:03:46 +00:00
okan
43db5b55ea
As done for buttonrelease, work specific un-cycling and un-highlighting actions
...
into the keyrelease event, only performing what's actually needed for each;
should result in much fewer events against keyreleases. No intended behaviour
change.
Additionally, like we do for group membership, grab the keyboard only when
required for cycling.
2017-12-29 18:50:43 +00:00
okan
ba75c13953
Merge group_toggle_membership_leave into the buttonrelease event and only do
...
border work for a group/ungroup action.
2017-12-29 16:55:50 +00:00
okan
5ddaed415c
add helper function client_show to bring together like actions for unhide/raise
2017-12-29 12:54:54 +00:00
okan
18a53717ae
Use a variable to keep track of flags for menu_filter().
2017-12-19 19:38:43 +00:00
okan
888f6c5319
Unconditionally show prompt on menus, regardless of invocation.
2017-12-11 20:58:18 +00:00
okan
0fc9d47fb4
Original idea from Dimitris Papastamos to move windows to corners a while ago;
...
re-proposed by Julien Steinhauser with an updated diff. Apparently this was in
the original calmnwm.
However, expand the original idea and let clients 'snap' to edges instead,
neatly allowing key bindings that snap to adjacent edges (i.e. corners) as
well. No default bindings assigned.
2017-12-07 16:25:33 +00:00
okan
f0524fe07a
give command and group menus their own match callbacks
2017-12-07 16:03:10 +00:00
okan
592e8efaee
spacing
2017-12-07 15:39:47 +00:00
okan
d9d6b4f88f
Revert r1.109 (Switch to XWindowEvent() pulling out events that match the mask
...
*and* window.) of mousefunc.c. When a client destroys itself while we are
moving or resizing it, XWindowEvent() blocks. Found the hard way by Anton
Lazarov, and Lea°hNeukirchen found the right bit to revert - thanks! Reverting
since the reason to switch from XMaskEvent was unclear.
2017-11-30 18:18:51 +00:00
okan
60ed85c50f
remove extra parentheses
2017-07-14 18:01:46 +00:00
okan
c039e7fb8c
Pull over the remaining re-implemented window move/resize functions and create
...
a wrapper so that the key and mouse based move/resize callbacks can be unified.
This has already been done with other window operations and menus.
2017-07-14 17:23:38 +00:00
okan
aefc0bf0fb
rename one function, matching others, to help upcoming change
2017-07-12 16:56:26 +00:00
okan
d179dfdeb9
Replace fgetln(3) with POSIX getline(3); inspired by brynet and Ingo.
...
feedback and ok brynet@
2017-07-10 13:36:58 +00:00
okan
113ffcf47e
Alter callbacks to take a struct instead of a growing number of arguments;
...
greatly simplifies upcoming work.
2017-05-09 13:40:18 +00:00
okan
3d6ff6dabf
Clean up, unify and accurately calculate edge distance with client move/resize
...
actions, so as to not lose windows off the edge.
inspired by diffs (and feedback) from Vadim Vygonets.
2017-05-01 12:54:55 +00:00
okan
96918a06e6
Ensure client stays inbound on key-based resize; based on logic existing in
...
key-based client move; from Vadim Vygonets.
2017-01-05 21:18:20 +00:00
okan
a7f2ab7497
Add search_print_text(), a default callback for mi->print in menu_filter(). While
...
here, normalize the remaining search_print_* argument paramters.
2016-12-06 21:54:10 +00:00
okan
89e4e7fb14
Consistent use of menuq_add for ssh menu.
2016-12-06 21:09:22 +00:00
okan
94f681fc90
Tame the number of 'exec' and 'path' search_match wrappers. No functional
...
change now, though more can likely go later, losing the (paritally complete or
incomplete/broken) argument completion bits.
2016-12-01 20:28:19 +00:00
okan
b94f0748d8
Switch ssh menu to search_match_text; like group/window/cmd menus, use only a
...
substring match. The previous matching is only intended for the exec menus.
2016-12-01 18:44:09 +00:00
okan
92111e526d
Change 'menu-window' to display all windows; then add 'menu-window-hidden' for
...
the previous behaviour of 'menu-window'. 'menu-window' becomes the default
binding; use 'bind-mouse "1" menu-window-hidden' to restore old behaviour for
those who prefer.
OK sthen@ (long long time ago on a different version)
2016-12-01 18:17:52 +00:00
okan
ae9f900b91
Use an additional check with lstat(2) when d_type is unknown.
...
from James McDonald via portable.
2016-11-15 18:43:09 +00:00
okan
db02592e5c
revert previous; upcoming changes will hopefully deal with these more
...
naturally.
2016-11-15 00:22:02 +00:00
okan
62dc5ae132
Add a wrapper based upon xevent handlers around client move/resize for key and
...
mouse bindings.
2016-11-15 00:07:03 +00:00
okan
db93599a0f
Make it clear these are flags.
2016-10-24 20:44:08 +00:00
okan
eb43101591
Sprinkle __func__ in appropriate error messages.
2016-10-24 17:39:38 +00:00
okan
0bb1be86c6
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.
While here, limit some globals, replace defines with appropriate variables and
fix some naming.
2016-10-18 17:03:30 +00:00
okan
15bf703e1c
Rename 2 kbfunc to match closer to what they do
2016-10-06 14:53:52 +00:00
okan
987ee736b9
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.
2016-10-06 14:41:19 +00:00
okan
792f85cde9
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.
2016-10-03 13:52:17 +00:00
okan
a8a111dffd
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.
2016-10-03 13:41:30 +00:00
okan
57b2a6cf79
Continue merging kb and mouse functions: fold
...
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.
2016-09-22 14:36:03 +00:00
okan
8aa2f317af
If a client does not set increment values, use 'moveamount' as a way to
...
scale keyboard based resizes; extend kbfunc_amount().
Behaviour noted by, tested by, and ok sthen@
2015-11-17 14:32:38 +00:00
okan
323672ace7
more client vs screen context differences
2015-11-12 21:28:03 +00:00
okan
4aca2b8764
If a client sets hints, honor them for kb resize requests, just like we
...
do for mouse based resize requests.
Based on a patch from Vadim Vygonets.
2015-11-12 18:33:30 +00:00
okan
9a48836ceb
Move kb pointer movement out of the kbfunc_client_moveresize since it's
...
got nothing to do with clients, thus doing flags work causes lots of
waste and almost useless jumpy pointer movements; while here, split out
move and resize since they share almost no code, just like mouse client
move/resize; factor out amount and factor. Still wonder why this is
here, but it works now.
2015-11-12 18:26:41 +00:00