summary refs log tree commit diff
path: root/calmwm.c
Commit message (Collapse)AuthorAgeFilesLines
* calmwm: sighdlr: use -1 instead of WAIT_ANYLeah Neukirchen2017-04-251-1/+1
|
* cvsimportokan2016-10-241-18/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: (34 commits) Make it clear these are flags. Remove duplicate check that strsubmatch() already does; while here, fix a comment. Sprinkle __func__ in appropriate error messages. Get rid of 'matchname'; it's too surprising to have the menu change during client search as different potential str matches are cycled through. If there's interest, the only string that doesn't exist in the listing is the window's class - that can be added of course, but it makes the line too long imho. clean up search_match_client(); no behaviour change 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. remove another unused proto Rename 2 kbfunc to match closer to what they do 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. Check the ptr bounds in the new client during cycling, since not all actions do ptrsave, such as restoring client geometry; adapted from a diff by Vadim Vygonets. More accurate to say 'toggle', rather than 'select', for group[n]/nogroup. Add CM-a for 'nogroup' (CM-0 stays for now); update manpage to reflect. Stash wmname into conf. When removing xrandr regions, ensure clients are within the bounds of the screen; adapted from an ancient diff from Sviatoslav Chagaev. Things in this area will likely change, but put this in so it works now and serves as a reminder. Calculate client nameqlen in client_setname(), the only place it's needed/used. Turn CALMWM_NGROUPS define into variable, ngroups. Start simplifying menu code; and in turn, remove a cursor no longer needed. Defaults are split between defines and conf_init(); normalize these, as well as give 'sticky' groups its own variable. 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. 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. ...
| * Refactor callbacks to take a void * so as to not try and generalize intookan2016-10-181-15/+12
| | | | | | | | | | | | | | | | 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.
| * no need to unmap menu window againokan2016-09-291-2/+1
| |
| * Mechanical change: move screen menu bits to their own struct.okan2016-09-291-3/+3
| |
* | Run pledge only on OpenBSD.Christian Neukirchen2015-11-161-0/+2
| |
* | cvsimportokan2015-11-121-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: more client vs screen context differences If a client sets hints, honor them for kb resize requests, just like we do for mouse based resize requests. 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. pledge "stdio rpath proc exec" cwm before main event loop, after init/setup - mostly for menu building. 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. Use position on root to figure out region. Start cleaning up name vs function differences; replace magic numbers. Clean up unused defines. 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.
| * pledge "stdio rpath proc exec" cwm before main event loop, afterokan2015-11-121-0/+4
| | | | | | | | | | | | init/setup - mostly for menu building. ok semarie@ (another cwm user)
| * Start cleaning up name vs function differences; replace magic numbers.okan2015-11-101-1/+1
| |
* | cvsimportokan2015-09-231-12/+4
|\| | | | | | | | | | | * refs/heads/master: Only when mapping clients from an initial wm start or restart, query the pointer and if it matches the child window, activate it; new clients will not need to make this roundtrip to the server. On execwm, we should properly release resources before exec'ing into a new window manager; so allow CWM_EXEC_WM to assign new wm to wm_argv and pass through cwm_status (now EXECWM) so that x_teardown() gets called before exec'ing the new window manager. Removes the need for a separate x_restart() now, using new wm_argv; and consolidates errno for execvp.
| * On execwm, we should properly release resources before exec'ing into aokan2015-09-161-12/+4
| | | | | | | | | | | | | | new window manager; so allow CWM_EXEC_WM to assign new wm to wm_argv and pass through cwm_status (now EXECWM) so that x_teardown() gets called before exec'ing the new window manager. Removes the need for a separate x_restart() now, using new wm_argv; and consolidates errno for execvp.
* | cvsimportChristian Neukirchen2015-01-221-1/+2
|\|
| * Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAXokan2015-01-191-1/+2
| | | | | | | | | | | | and HOST_NAME_MAX+1, respectively. ok doug@
* | cvsimportokan2014-09-181-4/+3
|\|
| * Remove duplicate client queue (mruq); instead, remove and take theokan2014-09-081-1/+0
| | | | | | | | | | | | 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).
| * more style nitsokan2014-09-071-3/+3
| |
* | cvsimportChristian Neukirchen2014-09-071-10/+13
|\|
| * generic sighandlerokan2014-09-061-10/+13
| |
* | remove TAILQ_END and __dead hacksChristian Neukirchen2014-02-231-1/+1
| |
* | cvsimportokan2014-02-021-1/+2
|\|
| * No need to store screen colormap and visual; rather just use the Xokan2014-02-021-1/+2
| | | | | | | | macros in the one place they are needed.
* | cvsimportokan2014-02-011-6/+4
|\|
| * Let the config parser continue parsing even after encountering an error;okan2014-02-011-6/+4
| | | | | | | | | | | | | | | | original idea (with now-outdated patch) from Thomas Adam. Since we now report where errors exist, this now makes more sense. Expand a bit on config file parsing in the cwm(1). Discussed with a few, including sthen; ok sthen.
* | cvsimportokan2014-01-281-1/+4
|\|
| * Move conf_init/clear into main - no behaviour change; from Tiago Cunha.okan2014-01-281-1/+4
| |
* | cvsimportokan2014-01-241-2/+34
|\|
| * cwm_argv doesn't need to be global any longerokan2014-01-221-5/+5
| |
| * start properly releasing X resources during teardownokan2014-01-221-0/+19
| |
| * Somewhat streamline event loop/restart/quit handling; most notableokan2014-01-221-1/+14
| | | | | | | | | | | | | | | | change allows a restart to trigger proper teardown first, even though teardown is not (yet) complete. After some discussion with oga@nicotinebsd.org regarding a more complicated version/idea.
* | cvsimportokan2014-01-211-1/+1
|\|
| * Sprinkle a few more const; from Tiago Cunha.okan2014-01-211-1/+1
| |
* | cvsimportokan2014-01-031-1/+1
|\|
| * use consistent typesokan2014-01-031-1/+1
| |
* | cvsimportChristian Neukirchen2013-12-131-0/+1
|\|
| * ICCCM explicitly states that server time (CurrentTime) should *not* beokan2013-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | used for focus events, but rather the timestamp of the generated event. Track the last event timestamp and send it down for a WM_TAKE_FOCUS ClientMessage. I suspect we should do this for clients that don't announce this Atom as well, though the raciness gets us into a bind. Solves focus order issue since WM_TAKE_FOCUS; fix verified by sthen@ ok sthen@
* | cvsimportokan2013-07-161-1/+3
|\|
| * simplify atom handling; allows us to limit to one round-trip to serverokan2013-07-151-1/+3
| | | | | | | | for gathering Atoms.
* | cvsimportokan2013-07-101-3/+1
|\|
| * whitespace and style fixes; from Tiago Cunha and one from me.okan2013-07-081-3/+1
| |
* | cvsimportokan2013-06-201-23/+6
|\|
| * move Cursors into conf.okan2013-06-171-11/+1
| |
| * now that we have conf_screen, which configures individual screensokan2013-06-171-12/+5
| | | | | | | | | | *after* config parsing, we no longer need to split up display/screen initialization, so collapse.
* | cvsimportChristian Neukirchen2013-05-291-9/+1
|\|
| * get rid of long standing XXX: now that we configure screens based onokan2013-05-221-8/+0
| | | | | | | | config options, add the keybinding GrabKey calls here
| * if -> ifdefokan2013-05-141-1/+1
| |
* | cvsimportokan2013-04-141-8/+2
|\|
| * makes no sense to set an error handler which uses X_Dpy before XOpenDisplay.okan2013-04-121-2/+0
| |
| * push Screenq into screen_initokan2013-04-121-6/+2
| |
* | cvsimportokan2012-12-191-67/+30
|\|
| * simplify config file setup; with Tiago Cunhaokan2012-12-181-3/+18
| |