Commit Graph

72 Commits

Author SHA1 Message Date
okan
b31b09dfc2 Purely mechanical; unify 'num', 'no' and 'shortcut'. 2014-08-20 15:15:29 +00:00
okan
2a87320bbf all mapped clients now should have a group, so simplify some cases 2014-02-07 21:59:56 +00:00
okan
7b5b7cc9e9 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
2be890489b Minimize trivial differences between a few kb and mb functions. 2014-01-29 22:30:00 +00:00
okan
34f43e3f2d 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
d91571c567 constify and rename some confusing variables around cmdq. 2014-01-20 21:34:32 +00:00
okan
720b5452aa 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
10d4dcb127 bring mousefunc closer to kbfunc 2014-01-02 21:30:20 +00:00
okan
f98f4615c0 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
5732b65139 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
okan
fe177b7c61 Make sure we really take work area gap into account with snap calculations;
from Dominik Honnef via Christian Neukirchen.
2013-12-12 21:50:50 +00:00
okan
7fad5224d4 If not using sticky mode (the default), clients aren't automagically
assigned a group, thus cc->group will be NULL - fix the client group
shortcut in menu lists; crash reported by Christian Neukirchen.
2013-12-08 13:51:38 +00:00
okan
d1b232fe81 Prepend the group shortcut in the client search menu; from Thomas Adam.
Likewise, prepend shortcut in unhide menu.
2013-12-02 19:30:27 +00:00
okan
5e67a12262 like gap, make snapdist per screen 2013-11-27 18:34:34 +00:00
okan
250f98bf15 simplify/unfold 2013-11-27 14:20:32 +00:00
okan
083a023f2c I believe we redraw the border in too many cases; likely a leftover from
the cc->pwin days - don't redraw on every unhide, resize, and mouse
move/resize Expose event (note, all Expose events trigger a redraw
anyway).

Tested with some finicky X apps I could think of, though I'm sure others
will find more - if so, and they 'lose' the border, please report!
2013-10-19 18:59:22 +00:00
okan
dd10412804 since the root and event window are the same in the case of a button
event on the screen's root window, there's no need to pass down the
entire XButtonEvent event, at least to group_menu(), the only callback
which takes an argument at this point; instead use the already populated
screen.
2013-07-09 01:24:49 +00:00
okan
9bf2498d7e add support for mouse based group {,r}cycle; from Rodrigo Mosconi. not
bound by default.
2013-07-08 18:39:20 +00:00
okan
1f244fe29c move kbfunc and mousefunc closer together 2013-07-08 18:19:22 +00:00
okan
234b8214df move Cursors into conf. 2013-06-17 17:11:10 +00:00
okan
270df196ac - configure menuwin with the screen, then create the xft drawable using
the menu window since that's the only place on which we draw
- elminate the need to change the drawable on every font draw
2013-05-20 20:21:04 +00:00
okan
5b4c55616a move the 2 small font helper functions to xutil.c 2013-05-19 23:38:20 +00:00
okan
c637a54048 - let callers of font_draw figure out (and pass) the color instead of an
'active' flag.
- use strlen() inside of font_draw; the only instance where it wasn't
  used happened to be ignored on a subsequent draw.
2013-05-14 12:35:56 +00:00
okan
9de81f3d2e get rid of cc->name in the resize box and make dimensions more readable. 2013-05-02 19:33:17 +00:00
okan
bb56bf4c4b only redraw the name/size box when the client resizes, not every time
there's movement; should slightly help with resize syncs.
2013-05-02 19:30:10 +00:00
okan
5acf6c147f no need for font_{ascent,descent,height} wrappers; limit font_width to
just requiring xftfont.
2013-05-02 17:25:15 +00:00
okan
58c1d48d10 plug memleak; always need to menuq_clear even when a selection is made. 2013-04-08 15:43:04 +00:00
okan
28b54db221 consistency 2013-04-08 13:02:31 +00:00
okan
c139df129c pass the screen workarea, as opposed to viewarea, allowing client
snapping to honor gap.
2013-01-02 21:41:14 +00:00
okan
2ac65bd288 re-work client_snapcalc() so it takes client and edge dimensions with
snapdist; allows for simplier snap calculations.

required for an upcoming diff for honoring gap.
2013-01-02 21:37:21 +00:00
okan
3a3e0383b2 create and use menuq_clear() helper; from Tiago Cunha 2012-12-17 14:32:39 +00:00
okan
6900cd3612 non-trivial menu drawing rewrite, moving to Xft and solving various
font/color drawing issues; from Alexander Polakov
2012-12-17 02:28:45 +00:00
okan
28224ff830 sort 2012-11-09 03:52:02 +00:00
okan
76b0874b4c get rid of the xfree() wrapper around free(); from Tiago Cunha. 2012-11-07 20:34:39 +00:00
okan
86524e21dd extend client_resize so that it can know when to reset max flags and
bwidth; this allows a client to be resized from a max state, which now
gets treated like a non-max'd client.  based on a diff that does part of
this in a different way from Alexander Polakov.
2012-09-09 19:47:47 +00:00
okan
0e8815dfb0 re-use geom struct in client_ctx (saved)geometry. 2012-07-13 17:01:04 +00:00
okan
186a78ff1e convert xmax/ymax uses to view geometry. 2012-07-13 15:21:35 +00:00
okan
287a5b2aad assign and use screen ctx where appropriate and consistently. 2012-07-04 23:42:03 +00:00
okan
fded46ba9f rename variable to reduce potential for name-space collision.
bikesheding and ok oga@.
2011-10-17 18:18:38 +00:00
okan
b852a73a60 split off window hints from geometry so we don't need to carry them all
around when dealing with {,h,v}max.  same idea from oga.
2011-09-03 09:42:33 +00:00
okan
f51f3cb9c2 We are inconsistent when it comes to function returns, so just go all
the way with the cwm specific parts.

ok oga@
2011-07-25 15:10:24 +00:00
okan
69ac0624cc Clarify defines and make them not look like non-local ones; started by a
small diff from Thomas Pfaff.

ok oga@
2011-07-23 13:09:11 +00:00
okan
8f1c583361 New option to raise a client via the mouse (unbound by default);
opposing action, lower, already exists and bound.  Both keyboard
mappings already exist.

'no opinion either way' oga@
2011-06-24 06:09:26 +00:00
okan
34ba6cdbcc introduce a new config option to snap to the screen edge. 'snapdist'
keyword taken from a diff from Sviatoslav Chagaev to do the same thing,
but implemented in a completely way (based on some very old code from
mk@).  default set to 0, so no behavior change.

ok oga@ (who would also like to take it further...)
2011-06-24 06:06:24 +00:00
okan
c8ea76a965 re-order sweep draw so that we map into the client window after
re-parenting; from Sviatoslav Chagaev.

ok oga@
2011-06-24 05:51:25 +00:00
okan
c2a8363dd9 struct XftFont already has height which we can use directly instead of
calculating ourselves, so do so.

ok oga@
2011-06-24 05:45:57 +00:00
okan
fa64bc2f32 remove left over XSync; ok oga@ 2011-05-13 12:53:19 +00:00
okan
c8cd94882d tag and comment cleanup; ok oga@ 2011-05-11 13:53:51 +00:00
okan
43450c8fd7 introduce a new 'freeze' flag (CMS-f by default) which may be applied to
any window, after which all move/resize requests will be ignored,
essentially freezing the window in place.

there's a possibility to merge this with the 'ignore' concept, pending
on how ignore+freeze should behave (really more ewmh stuff), but punting
for now since ponies are on the line.

requested and tested by thib at k2k11 with ponies, unicorns and rainbows.

'save the unicorns' todd@, ok oga@
2011-05-07 17:15:37 +00:00
okan
604a5d07a4 bump window resize back to 60hz. instead, we should not need to sync
every time we move/resize a window, so remove XSync in both mouse move
and resize events.  tested by Brynet as well.

ok oga@
2011-05-05 19:52:52 +00:00