IABSD.fr/xenocara/app/cwm/menu.c

Branch :


Log

Author Commit Date CI Message
2ccd7ef8 2022-10-15 16:06:07 Fix overlapping menu items as reported by kn@ and probably others at some point; with op@ and Walter Alejandro Iglesias helping along the way. Consistently use font ascent+descent instead of an arbitrary font height+1 for individual menu item rectangles and placement. ok kn@ op@
caa934d8 2020-02-27 14:56:39 Unrelated style fixes, consistency changes and sorting, appropriate dosage/removal of wrappers, simplification of name queue, client cycle joins other kb/mb bound functions.
ba4d949d 2019-08-12 00:52:36 Fix regression from r1.107 (lost a return); kettenis@ pointed out the high potential for a use-after-free (true!) where kn@ ran into the regression using an app that actually exercised the XGrabPointer() failure path.
8fa20d6f 2019-03-04 19:28:17 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.
7d9a5b34 2018-11-14 19:22:51 Stop asking for events (NoEventMask) from menu window once done with the menu (we don't destroy it, only unmap).
a3cbca55 2017-12-19 19:38:43 Use a variable to keep track of flags for menu_filter().
0202b86b 2017-12-12 15:37:16 clean up after previous (noprompt removal)
2a75b150 2017-12-11 20:58:18 Unconditionally show prompt on menus, regardless of invocation.
591ec270 2017-04-25 12:08:05 Remove 'noresult' (and simplify) as it does nothing and makes the logic around it needless. History doesn't show what this might have been used for in future iterations.
13e3ebc4 2016-12-06 21:59:33 stray newlines
62c01a2e 2016-12-06 21:54:10 Add search_print_text(), a default callback for mi->print in menu_filter(). While here, normalize the remaining search_print_* argument paramters.
c6068df3 2016-12-01 20:28:19 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.
943e3e75 2016-10-24 20:44:08 Make it clear these are flags.
cdbe6c3b 2016-10-03 18:43:49 Start simplifying menu code; and in turn, remove a cursor no longer needed.
54cccf11 2016-09-30 18:28:06 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.
e49083a4 2016-09-30 15:12:19 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@
1b369f60 2016-09-29 00:21:55 Mechanical change: move screen menu bits to their own struct.
b46a5b0b 2016-09-28 17:06:33 Inline Xft draw and extents wrappers; too much abstraction.
c1ac9460 2016-09-20 19:58:54 Allow ctrl-[ for abort (esc); from Benjamin Scher Purcell
156bfda8 2016-08-28 15:23:24 Enable the use of numpad Enter key on menus; from Henrique N. Lengler. ok beck phessler
dbd50a50 2016-04-28 16:28:38 If supplied format to menuq_add() is NULL, fill text with an empty string; found by Christian Neukirchen.
a7bbf519 2015-11-11 14:22:01 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.
ffc7945b 2015-11-09 20:03:29 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.
7dc8db63 2015-07-12 14:21:09 simplify menu print text
56fb99c7 2015-07-01 14:36:42 style
5fede6d7 2015-06-30 18:42:50 style and spacing nits
933ce723 2015-06-26 17:17:46 Mechanical change from xinerama to region backed areas.
d7a32307 2015-06-08 15:08:44 clean up
ee2e58a8 2015-06-05 18:43:36 use the same geometry struct in menus as everywhere else
055ed363 2015-06-05 15:01:51 add a flag to indicate a menu list instead of overloading 'prompt'
3f1203de 2015-06-05 14:54:04 redundant check for 'list'
d42a2489 2015-03-28 22:09:10 Reshuffle and slightly simplify menu_complete_path(), removing an allocation, for tab-completion; checked by Alexander Polakov as well.
c199720b 2015-01-19 14:54:16 Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX and HOST_NAME_MAX+1, respectively. ok doug@
c4e86dac 2014-09-07 19:27:30 more style nits
dc9a1b77 2014-09-06 16:18:08 style nit
90620930 2014-02-01 19:28:46 Take menu's bwidth into account for position/size; reported by Thomas Adam.
b92e846e 2014-01-21 15:42:44 Sprinkle a few more const; from Tiago Cunha.
83b0cbf1 2014-01-20 18:58:03 Add a function that adds an entry to a menuq, normalizing a common code path; from Tiago Cunha.
72ccee09 2014-01-03 15:29:06 use consistent types
9fbf947a 2014-01-02 22:49:10 calculate proper menu width/height on the first Expose event; 'jump' (while using gap) noticed by Christian Neukirchen
d504b54a 2013-12-17 16:10:43 replace with memset
4104232e 2013-12-13 22:39:13 Teach screen_find_xinerama() to apply gap only when told to do so; adjust callers. Needed for an upcoming feature.
7459d3af 2013-12-02 20:01:19 When we receive a NotionNotify event, there's no need to (incorrectly might I add) redraw the top menu selection.
e5072fc2 2013-12-02 19:49:26 Always highlight the first menu item (helpful to see selected items when not using a mouse and therefore not generating Expose/MotionNotify events); from Thomas Adam.
537fe7fe 2013-06-17 17:11:10 move Cursors into conf.
1e33cdcb 2013-05-20 21:32:00 stray whitespace
bd38e60d 2013-05-20 20:21:04 - 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
85d547bc 2013-05-20 20:04:36 no reason to pass around *sc when it's already in menu_ctx.
ce73dfea 2013-05-19 23:38:20 move the 2 small font helper functions to xutil.c
7f75636e 2013-05-14 12:35:56 - 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.
6ab8a91e 2013-05-10 16:10:40 spacing
384bb6c5 2013-05-07 01:35:41 border width/color makes sense for some, so put it back
ed984685 2013-05-06 16:00:34 border width/color makes no sense on menuwin
72e88bc9 2013-05-02 20:18:35 - 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.
c3f5c372 2013-05-02 19:41:52 zap leftover debug printf
f0a64471 2013-05-02 17:25:15 no need for font_{ascent,descent,height} wrappers; limit font_width to just requiring xftfont.
a395df4a 2013-04-08 13:02:31 consistency
29a51173 2013-04-08 00:56:21 missing prototype
13a11c87 2013-04-05 17:07:25 zap stray whitespace
1124cee9 2013-01-07 21:53:23 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.
10e814fe 2013-01-02 16:26:34 have screen_find_xinerama() return struct geom *reliably* instead of XineramaScreenInfo; simplifies goop around the callers.
23c2576b 2013-01-02 02:19:20 more variable consistency
1c7a3484 2012-12-17 14:32:39 create and use menuq_clear() helper; from Tiago Cunha
5ca4dca2 2012-12-17 02:53:29 knf
52982ae1 2012-12-17 02:28:45 non-trivial menu drawing rewrite, moving to Xft and solving various font/color drawing issues; from Alexander Polakov
89bef83e 2012-11-14 21:12:24 tab-complete buglet fix: once exec_path is completed, allow for subsequent completion; from Alexander Polakov
4f78cb68 2012-11-09 03:52:02 sort
1e3fec43 2012-11-07 20:34:39 get rid of the xfree() wrapper around free(); from Tiago Cunha.
8bbba5ae 2012-11-07 14:39:44 tab completion support for menus; from Alexander Polakov. ok sthen@ on an older incarnation
34267fe6 2012-10-31 19:30:19 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
72f1943e 2012-10-23 16:13:59 comment what this whole bit does, not just part of it.
b94eed0a 2012-10-23 16:08:59 add a height to struct menu and use it in the most obvious of places.
770189e8 2012-10-23 15:50:15 treat menu width the same as the height is treated when deciding its max size and location; partially from a diff from Alexander Polakov.
44b83028 2012-10-23 15:32:38 Stop drawing when menu doesn't fit inside the screen; picked from a larger diff from Alexander Polakov.
f4e0469f 2012-08-07 14:05:49 support multibyte input to menu code; from Alexander Polakov with a tiny tweak.
6ee7c653 2012-07-13 15:21:35 convert xmax/ymax uses to view geometry.
abc316c1 2012-05-16 01:04:36 convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym ok sthen@
9ab59987 2011-09-08 12:00:49 reinit menu on reload; from Alexander Polakov. needed for catching upcoming menu config changes. ok oga@
3826753e 2011-07-25 15:41:05 use the menu border; from Alexander Polakov, but with the existing define. ok oga@
bd65f031 2011-07-25 15:10:24 We are inconsistent when it comes to function returns, so just go all the way with the cwm specific parts. ok oga@
24bf547e 2011-07-23 13:09:11 Clarify defines and make them not look like non-local ones; started by a small diff from Thomas Pfaff. ok oga@
33023ff9 2011-06-27 12:46:54 UTF8-ify, from Alexander Polakov, but without setlocale(), after feedback from stsp@ - thanks! 'go for it' oga@
0fd446f0 2011-06-24 06:52:23 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@
4fb00eca 2011-05-11 13:53:51 tag and comment cleanup; ok oga@
d4b279e2 2011-05-05 15:32:24 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@
4c04a273 2011-03-22 13:50:40 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@
9a52c582 2011-03-22 11:09:52 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@
482c4ce4 2011-03-22 11:05:13 fix nousance of always highlighting the first entry even when there is no match (seen in the ctrl-a case) ok oga@
d0a487aa 2011-03-22 11:03:05 move the default case to the end. ok oga@
3b73daa6 2011-03-22 10:47:59 move the single keycode function directly into the menu code. ok oga@
5d675943 2010-02-10 01:23:05 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@
ba93a73a 2009-12-15 04:10:42 pull all non-X11 headers from calmwm.h and place them only where they are required. encourged to go all the way by oga@
9dfa8ad1 2009-12-15 03:24:36 merge the 2 common header files; specific includes to be pulled out as separate commits. ok oga@
206c3e3b 2009-12-10 17:16:51 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@.
ed29ebe5 2009-12-08 16:52:17 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@
bb65c9fc 2009-12-07 19:48:08 fix off-by-one where a mere click would select the first item inside a menu from Thomas Pfaff ok oga@
18dd1d8f 2009-11-28 17:52:12 style (whitespaces) ok oga, okan
6e4f4540 2009-09-05 14:10:11 style ok oga
d893a97d 2009-06-26 12:21:58 static local functions and data; almost identical diff from Thomas Pfaff ok oga@
a7dfb91b 2009-06-20 00:22:39 unroll XCALLOC/XMALLOC macros; since we use xcalloc/xmalloc all over the place anyway, this makes things a bit more consistent; from Thomas Pfaff ok oga@