Commit Graph

64 Commits

Author SHA1 Message Date
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
e14123210a no reason to pass around *sc when it's already in menu_ctx. 2013-05-20 20:04:36 +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
d0fe80b1f4 spacing 2013-05-10 16:10:40 +00:00
okan
5f06e5a8ca border width/color makes sense for some, so put it back 2013-05-07 01:35:41 +00:00
okan
27854d9061 border width/color makes no sense on menuwin 2013-05-06 16:00:34 +00:00
okan
e91c716262 - no need to position and size the menu window before an Expose event
since we'll be calculating required size later anyway; allows us to
  consolidate all prompt/display/search string building goop into
  menu_draw.
- reset the pos/size of menuwin when leaving a menu.
- reverse the 'prompt' NULL check to be consistent with 'initial' one
  and fix a whitespace nit while here.
2013-05-02 20:18:35 +00:00
okan
0d209028be zap leftover debug printf 2013-05-02 19:41:52 +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
28b54db221 consistency 2013-04-08 13:02:31 +00:00
okan
8c47a12a86 missing prototype 2013-04-08 00:56:21 +00:00
okan
670207f79b zap stray whitespace 2013-04-05 17:07:25 +00:00
okan
e7b85cfb2f fix menu/client placement in panning setups; XineramaQueryScreens gives
us the width of the psuedo screen, but here we need the edge instead
(xmax/ymax); just re-use w/h here for now.
2013-01-07 21:53:23 +00:00
okan
ce8ef02ed2 have screen_find_xinerama() return struct geom *reliably* instead of
XineramaScreenInfo; simplifies goop around the callers.
2013-01-02 16:26:34 +00:00
okan
e492ed8e41 more variable consistency 2013-01-02 02:19:20 +00:00
okan
3a3e0383b2 create and use menuq_clear() helper; from Tiago Cunha 2012-12-17 14:32:39 +00:00
okan
96cd288a2a knf 2012-12-17 02:53:29 +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
587d623e4a tab-complete buglet fix: once exec_path is completed, allow for
subsequent completion; from Alexander Polakov
2012-11-14 21:12:24 +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
4b84287d19 tab completion support for menus; from Alexander Polakov.
ok sthen@ on an older incarnation
2012-11-07 14:39:44 +00:00
okan
4fb420514d replace 'reload' with 'restart', which merely re-exec's cwm using the
existing argv; same idea with respect to argv saving as Alexander
Polakov.  reload support was half-complete and is getting in the way.

agreed to by many
2012-10-31 19:30:19 +00:00
okan
742bcec522 comment what this whole bit does, not just part of it. 2012-10-23 16:13:59 +00:00
okan
710347df1b add a height to struct menu and use it in the most obvious of places. 2012-10-23 16:08:59 +00:00
okan
637c52abf8 treat menu width the same as the height is treated when deciding its
max size and location; partially from a diff from Alexander Polakov.
2012-10-23 15:50:15 +00:00
okan
c21d56e5a1 Stop drawing when menu doesn't fit inside the screen; picked from a
larger diff from Alexander Polakov.
2012-10-23 15:32:38 +00:00
okan
7071261bde support multibyte input to menu code; from Alexander Polakov with a tiny tweak. 2012-08-07 14:05:49 +00:00
okan
186a78ff1e convert xmax/ymax uses to view geometry. 2012-07-13 15:21:35 +00:00
okan
dd5bfdb064 convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym
ok sthen@
2012-05-16 01:04:36 +00:00
okan
840323558d reinit menu on reload; from Alexander Polakov. needed for catching
upcoming menu config changes.

ok oga@
2011-09-08 12:00:49 +00:00
okan
30dbdf4178 use the menu border; from Alexander Polakov, but with the existing define.
ok oga@
2011-07-25 15:41:05 +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
3db2d84fa8 UTF8-ify, from Alexander Polakov, but without setlocale(), after
feedback from stsp@ - thanks!

'go for it' oga@
2011-06-27 12:46:54 +00:00
okan
d8747ae702 add 'normal' cursor and shuffle the others we use to make a bit more
sense and to be slightly less un-expected.  from Alexander Polakov.
re-use 'normal' cursor now instead XC_hand1 for menu selection.  i
really wish X had real docs and made sense.

ok on earlier diff with '?' removed (but it's back now) oga@
2011-06-24 06:52:23 +00:00
okan
c8cd94882d tag and comment cleanup; ok oga@ 2011-05-11 13:53:51 +00:00
okan
c62c0ee9db make the menu window aware of xinerama info; this makes the menu stay
within the current screen, like other cwm window placements and
mutations (vmax/hmax/max) - from Sviatoslav Chagaev.

ok oga@
2011-05-05 15:32:24 +00:00
okan
5972c7a507 warp the pointer back, iff we don't move the mouse, once we are done
with the menu; idea and initial from Sviatoslav Chagaev.

discussion with and ok oga@
2011-03-22 13:50:40 +00:00
okan
e28a7f832e we should re-focus the client and ungrab the ptr even if we don't have a
mouse based match (i.e. in the kbd no match case).  update the comment
as well.

ok oga@
2011-03-22 11:09:52 +00:00
okan
9c587d9725 fix nousance of always highlighting the first entry even when there is
no match (seen in the ctrl-a case)

ok oga@
2011-03-22 11:05:13 +00:00
okan
765479fc86 move the default case to the end.
ok oga@
2011-03-22 11:03:05 +00:00
okan
00b502b1da move the single keycode function directly into the menu code.
ok oga@
2011-03-22 10:47:59 +00:00
okan
507480a695 preserve labels after an edit action is aborted; extending the menu
struct just for this is the least intrusive approach until the menu code
is reviewed.

inspired by Thomas Pfaff's report on tech@

ok oga@
2010-02-10 01:23:05 +00:00
okan
ccb207a8a8 pull all non-X11 headers from calmwm.h and place them only where they
are required.

encourged to go all the way by oga@
2009-12-15 04:10:42 +00:00
okan
b6b7d273d4 merge the 2 common header files; specific includes to be pulled out as
separate commits.

ok oga@
2009-12-15 03:24:36 +00:00
oga
134e777cf0 finish unfucking the screen_ctx handling.
remove screen_current() it was utterly bogus when nscreens > 1.

pass a fake client_ctx in the case where there's no client and the
kbfunc or mousefunc doesn't need a real one, it just contains the
current screen, modify these functions so that they pass down the screen
context to their callees.

make groups per screen, it's the only way it makes sense in this regard.

ok okan@.
2009-12-10 17:16:51 +00:00
okan
ee7df6a95f start fixing screen_ctx usage, for it is utterly broken. bring font
into screen_ctx and start passing screen_ctx around to in order get rid
of Curscreen; fixup per-screen config colors the same way.

diff mostly from oga@, with a bit harsher reaction to the state of screen_ctx.

"please commit" oga@
2009-12-08 16:52:17 +00:00
okan
46630531f8 fix off-by-one where a mere click would select the first item inside a menu
from Thomas Pfaff

ok oga@
2009-12-07 19:48:08 +00:00