Commit Graph

112 Commits

Author SHA1 Message Date
okan
dcdbf54e85 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
54cccf114b Use instinsic X11 functions for key/btn/ptr grab/ungrab/regrab requests;
the one line wrappers provided no value and limited altering calls where
needed; additionally, most of them had but one caller.
2016-09-30 18:28:06 +00:00
okan
e49083a483 Replace mousefunc_sweep_draw() with a generic menu_windraw() using va
lists; use it appropriately for both window dimension and position in
the respective mousefunc calls.

ok bryent@
2016-09-30 15:12:19 +00:00
okan
e30959f62f Switch to XWindowEvent() pulling out events that match the mask *and*
window.
2016-09-30 15:05:02 +00:00
okan
1b369f6063 Mechanical change: move screen menu bits to their own struct. 2016-09-29 00:21:55 +00:00
okan
b46a5b0b56 Inline Xft draw and extents wrappers; too much abstraction. 2016-09-28 17:06:33 +00:00
okan
7c35826ca9 Do not call sweep_draw() too early: don't yet have w/h dimensions; plus
we will get a MotionNotify event right away anyway, setting required
parameters.
2016-09-28 15:54:54 +00:00
okan
374d386034 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
6937dedc0d Limit mouse resize to hints within the client; matches kbd resize
behaviour.
2016-09-13 13:42:28 +00:00
okan
5dd7f2f304 Inline the only use of mousefunc_sweep_calc. 2015-11-17 14:31:28 +00:00
okan
a7bbf5197e Partial revert of replacing screen_area() with region_find(); until a
fix for a regression is found; this bug has been around for a long time
it seems, but this change exposed it. Likely need to track clients in to
and out of regions.
2015-11-11 14:22:01 +00:00
okan
72507096a1 Use position on root to figure out region. 2015-11-10 22:06:57 +00:00
okan
0abb5fd0f1 Start cleaning up name vs function differences; replace magic numbers. 2015-11-10 20:05:33 +00:00
okan
ffc7945b8d Extend region to include both view and work areas; switch to
region_find() which no longer needs to recalculate gap each time
a client (or menu) is created or altered. If no RandR, fall back
to display dimensions while building regions instead of during
execution.
2015-11-09 20:03:29 +00:00
okan
d01e312b01 _NET_WM_STATE_STICKY implies only sticky at the group/desktop level, not
position and size; based on discussion with a few.
2015-08-21 16:14:39 +00:00
okan
8809c816d0 Instead of special casing the 'term' and 'lock' commands, go back to
keeping them hidden; showing them has apparently caused confusion/angst.
2015-08-21 16:05:55 +00:00
okan
8529d9a1c6 introduce 'groupsearch' for group menu search; matches on either group
number/shortcut and/or name.
2015-07-12 14:31:47 +00:00
okan
56fb99c70c style 2015-07-01 14:36:42 +00:00
okan
cfb0bdf8f5 no longer need to pass down format strings after introducing search_print_cmd 2015-06-30 19:02:24 +00:00
okan
6e095b76d0 Introduce a callback for cmd menu printing, special-casing 'lock' and
'term'.
2015-06-30 18:54:12 +00:00
okan
933ce723de Mechanical change from xinerama to region backed areas. 2015-06-26 17:17:46 +00:00
okan
fb854e1538 switch to search_print_client() as the print callback since it will now display labels as well 2015-06-08 15:41:27 +00:00
okan
5a1ff2b250 stash window dimensions 2015-06-08 15:11:29 +00:00
okan
a4ce9f9682 even if the menuq is empty, at least show an empty menu instead of just
bailing making it look like the binding isn't working.
2015-06-07 19:10:00 +00:00
okan
055ed363c8 add a flag to indicate a menu list instead of overloading 'prompt' 2015-06-05 15:01:51 +00:00
okan
d6e84c8298 merge kbd and mouse grouptoggle 2015-05-21 00:37:04 +00:00
okan
c199720bcc Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX
and HOST_NAME_MAX+1, respectively.

ok doug@
2015-01-19 14:54:16 +00:00
okan
c9178afc38 these have nothing to do with 'sticky', but rather group membership; rename. 2014-09-27 19:04:32 +00:00
okan
c9ebdf69aa Move motion time check to the top of each MotionNotify block (and
eliminate from ButtonRelease); further limits the amount of work done
outside the threshold, notably mousefunc_sweep_calc,
screen_find_xinerama and client_snapcalc.
2014-09-18 13:56:58 +00:00
okan
9daa5fe3e6 ewmh states _NET_WM_STATE_STICKY should not alter position 2014-09-17 18:09:30 +00:00
okan
05b4f3491a Use a similarly named check as sticky for hidden check in a group. 2014-09-17 16:32:53 +00:00
okan
d4ceb9f4e3 Introduce a check to see if a group holds only 'sticky' clients and use
this check to decide if a group is virtually empty.  Rationale: if a
group contains *only* 'sticky' clients, it should be skipped while
cycling through groups.  Apply similar logic to the group menu.

Based on an idea from phessler@, who also tested another version.
2014-09-17 14:31:37 +00:00
okan
57ff8d4658 name the group client queue appropriately, like other queues 2014-09-08 21:15:14 +00:00
okan
0fefd96f3e Remove duplicate client queue (mruq); instead, remove and take the
global Clientq and place it inside screen_ctx since every client belongs
to a screen, then use the same per screen clientq to track stacking
order (the sole reason for mruq).
2014-09-08 20:11:22 +00:00
okan
898bea2d90 Now that a group knows its screen, only pass down the group_ctx. 2014-09-08 13:51:29 +00:00
okan
4abab66820 Rework group names: stash the group name inside the group_ctx as opposed
to having to manage an array outside in screen_ctx for group names and
shortcuts.  Simplifies (and moves bits for) reading, and constructing
data for, EWMH's _NET_DESKTOP_NAMES.
2014-09-06 16:08:58 +00:00
okan
bef5d30e83 bring menu bits closer together 2014-09-02 14:08:39 +00:00
okan
1150bfd22b add explicit paran and drop some empty lines bringing like functions closer 2014-09-01 18:17:32 +00:00
okan
de52ddf635 Merge group_menu into mousefunc_menu_group. 2014-09-01 18:04:58 +00:00
okan
9567454909 Fix nogroup regression, where nogroup became an actual group - the
symantics between cwm groups and ewmh got in the way.  Ensure a client
that wants to be in nogroup stays in nogroup (thus stays in view), even
when (re)reading NET_WM_DESKTOP.  Paritially reverts patchset 644
(2014-02-07 13:09 PST) which deals with a NULL cc->group.  All to be
revisited when NET_WM_STATE_STICKY hits cwm.

Reported by many; testing and ok phessler.
2014-08-22 19:04:00 +00:00
okan
b7cd8019f2 Purely mechanical; unify 'num', 'no' and 'shortcut'. 2014-08-20 15:15:29 +00:00
okan
92bf6935f5 all mapped clients now should have a group, so simplify some cases 2014-02-07 21:59:56 +00:00
okan
06d9319772 Remove duplicate mouse functions and instead use the kbfunc ones. No
user visable changes at this point, but they'll merge at an appropriate
time.
2014-01-30 14:40:21 +00:00
okan
d5979e3ab6 Minimize trivial differences between a few kb and mb functions. 2014-01-29 22:30:00 +00:00
okan
42e2d07b2b Use argument to pass down flags for mousefunc cyclegroup; removes
rcyclegroup wrapper need - now similar to kbfunc.
2014-01-20 22:31:53 +00:00
okan
9a540a7adb constify and rename some confusing variables around cmdq. 2014-01-20 21:34:32 +00:00
okan
83b0cbf116 Add a function that adds an entry to a menuq, normalizing a common code
path; from Tiago Cunha.
2014-01-20 18:58:03 +00:00
okan
24e4f6a4b6 bring mousefunc closer to kbfunc 2014-01-02 21:30:20 +00:00
okan
4104232e02 Teach screen_find_xinerama() to apply gap only when told to do so;
adjust callers.  Needed for an upcoming feature.
2013-12-13 22:39:13 +00:00
okan
5671dd5497 Instead of using work area, use the Xinerama area for snap calculations;
based on a patch from Thomas Adam with appropriate adjustments for gap.
2013-12-13 21:51:56 +00:00