aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Use PRId64 to print int64_tWolfgang Müller2022-01-17-1/+2
| | | | | | | | | | The previous commit as taken from upstream introduces a compiler warning for parse.y: parse.y:110:42: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ Quelch this warning by using PRId64 from inttypes.h
* Allow bare numbers for key and mouse bindings; taken from similar support in ↵okan2022-01-17-6/+17
| | | | other parse.y's; from Leon Fischer <lfischer@airmail.cc>.
* sync parse.y changes from base; ok naddy@okan2021-12-03-11/+11
| | | | | | | | | | | | | | | original from naddy@: > Don't declare variables as "unsigned char *" that are passed to > functions that take "char *" arguments. Where such chars are > assigned to int or passed to ctype functions, explicitly cast them > to unsigned char. > > For OpenBSD's clang, -Wpointer-sign has been disabled by default, > but when the parse.y code was built elsewhere, the compiler would > complain. > > With help from millert@ > ok benno@ deraadt@
* Do not attempt to grab keys without a keycode; this incidentally allows XF86 ↵okan2021-12-03-1/+3
| | | | | | keys support. found and fix by Luis Henriques <henrix@camandro.org>
* Make it possible to override pkg-config in the Makefile6.9Wolfgang Müller2021-04-27-2/+4
|
* Remove mention of window title history from cwm.1Juhani Krekelä2021-04-27-2/+2
| | | | | The feature was removed from this fork already. This commit brings the documentation up to date with the source.
* Add links to relevant commits in READMEWolfgang Müller2021-04-27-9/+9
|
* Add READMEWolfgang Müller2021-04-27-0/+27
|
* Do not include ignored clients in the window menuWolfgang Müller2021-04-27-0/+2
| | | | | | Nowadays, most ignored clients will be bars or other "decorative" elements. We do not see the use of jumping to those using the window menu. They also tend to clutter up the menu, so let's ignore them there.
* Warp pointer to last active window if there is no active clientWalter Alejandro Iglesias2021-04-27-0/+10
| | | | | | | | | | If a client is killed and the cursor lands in the root window, no client is focused. Attempting to cycle back to the last focused client will instead focus the previous-to-last. Add specific checks that make sure the cursor is positioned where the user expects it to be. This patch was taken from a bug report on openbsd-misc [1]. [1] https://marc.info/?l=openbsd-tech&m=155931484124288&w=2
* Raise windows automatically when entering fullscreenWynn Wolf Arbor2021-04-27-0/+2
|
* Return the window position overlay menu to its old formatWynn Wolf Arbor2021-04-27-2/+2
|
* Migrate to an XDG-compliant config file locationWynn Wolf Arbor2021-04-27-13/+25
|
* Fix several sign-compare warningsWynn Wolf Arbor2021-04-27-4/+6
|
* Calculate colors using the client's visual and colormapWynn Wolf Arbor2021-04-27-14/+41
| | | | | | | | | | | | | | | As cwm was using the screen's default visual and colormap to draw all client borders, borders for windows that had a depth of 32 bits were not rendered correctly. The same happened with text in the popup menus which were recently changed to be drawn in the context of the client. This commit introduces a Visual reference for each client, and allocates all potential colors for a client's specific visual and colormap in the client_ctx struct. These colors are then used to draw client borders and popup menus. Additionally, since we touch the drawing code anyway, borders are reintroduced to the popup menus for better contrast.
* Plug a memory leak in conf_clearWynn Wolf Arbor2021-04-27-9/+2
| | | | | | These loops never freed cargs and cargs->cmd from bind_ctx. Instead of adding more calls to free() manually, replace the whole loops with the conf_unbind_* functions which free the struct properly.
* Fix string truncation in menu_drawWynn Wolf Arbor2021-04-27-1/+1
| | | | | The previous size calculation did not account for the prompt characters (0xc2 0xbb and 0xc2 0xab respectively).
* Remove matching on window title historyWynn Wolf Arbor2021-04-27-44/+3
| | | | | Obscure feature. Confusing if you don't know about it, mostly useless if you do. Matching on currently visible window titles is enough.
* Remove wm menuWynn Wolf Arbor2021-04-27-102/+4
| | | | | | | | Whilst arguably useful for certain people, or in rare cases, this functionality is not needed in the general case. This will also remove a memory leak where fallback was not properly freed.
* Remove ssh menuWynn Wolf Arbor2021-04-27-85/+0
| | | | | | There is no point in keeping this functionality. Saving a few key strokes is not worth the added complexity of the window manager parsing the known_hosts file.
* Remove path completion in the exec menuWynn Wolf Arbor2021-04-27-48/+0
| | | | | | | | | | | | | There are a couple of issues I found with this functionality: 1) To my knowledge, it is undocumented and extremely specific. 2) Since this function would only complete a full path (by wrapping it in quotes before passing it on), it is entirely useless when composing a command that has more than one argument. 3) The snprintf call has no check for truncation, possibly leading to the path not being quoted properly.
* Add gitignoreWynn Wolf Arbor2021-04-27-0/+5
|
* Convert MakefileWynn Wolf Arbor2021-04-27-17/+23
|
* Add BSD compatibility functions and headersWynn Wolf Arbor2021-04-27-13/+786
| | | | | | | | | Original file locations in the OpenBSD tree: - lib/libc/stdlib/reallocarray.c - lib/libc/stdlib/strtonum.c - lib/libc/string/strlcat.c - lib/libc/string/strlcpy.c - sys/sys/queue.h
* Revert "use u_char for buffers in yylex"Wynn Wolf Arbor2021-04-27-5/+5
| | | | | | | This reverts commit 603548105b9bf9ffd11eb053e62db99f9433e821. Using u_char instead of char will generate signedness warnings for strtonum(), lookup(), and xstrdup().
* Replace INFTIM with -1Wynn Wolf Arbor2021-04-27-1/+1
|
* Use pledge(3) only on OpenBSDWynn Wolf Arbor2021-04-27-0/+2
|
* Define __dead if missingWynn Wolf Arbor2021-04-27-0/+4
|
* Keep pointer within window on maximize/fullscreen togglekn@openbsd.org2021-04-27-1/+5
| | | | | | | | | | | | | | | | | | Spawn a window, maximize it in any way, move the cursor to a window border that is not on the screen's edge and unmaximize again: While the window goes back the cursor stays at the screen's edge, i.e. focus is lost to the underlaying window. Moving, resizing, tiling or snapping windows in any way always moves the cursor along iff needed, e.g. using MS-[hjkl] to move a small window from the center to the edge keeps the cursor within window borders -- no matter what you do with the keyboard, focus stays on that window. Make CM-f, CM-m, CM-equal and CMS-equal (default bindings) for toggling full-screen mode, maximization, vertical maximization and horizontal maximization of the current window drag the cursor along if needed as well. OK okan kmos dv
* Fixed memory leak in xu_get_strprop.tobias2020-04-26-2/+4
| | | | | | | If a client calls XSetTextProperty for a window to clear all its properties, then allocated memory within libX11 is not freed. OK okan@
* Prevent out of boundary write with configuration files in which too many ↵tobias2020-04-18-2/+2
| | | | | | | | | | quoted arguments are stored for other window managers. The quotation handling happens within the while loop without checking if the "end" limit has been already reached. If this happens, the final NULL assignment leads to an out of boundary write on stack. OK okan@
* Allow configuring a percentage window size of the master window during ↵okan2020-04-18-11/+51
| | | | htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
* zap stray tabsokan2020-03-26-2/+2
|
* Instead of using _NET_ACTIVE_WINDOW on restart, use the pointer location to ↵okan2020-03-26-45/+25
| | | | determine what client to set active. Reduces a round trip for every window.
* Add support for SIGINT/SIGTERM.okan2020-03-26-5/+10
|
* Simplify conditional construct.tim2020-03-26-6/+3
| | | | OK okan@
* Trim event_mask to those that the root window actually needs.okan2020-03-26-11/+8
|
* No need to lookup current client early; move to right before it is needed.okan2020-03-26-4/+2
|
* Recommit 1.259, but now with TAILQ_FOREACH_SAFE.tim2020-03-26-10/+12
| | | | | | | | | | | From and OK okan@ Original commit message: Plug two memory leaks. Also get rid of a variable that is no longer necessary. OK okan@
* Revert previous. Causes a crash as reported by Tom Murphy.tim2020-03-18-10/+8
|
* Simplify list markup.tim2020-03-18-27/+4
| | | | OK okan@ schwarze@
* Plug two memory leaks. Also get rid of a variable that is no longer necessary.tim2020-03-18-8/+10
| | | | OK okan@
* Remove ColormaskChange from event-mask since there's no event handler.okan2020-03-18-3/+3
|
* Unrelated style fixes, consistency changes and sorting, appropriate ↵okan2020-03-18-452/+471
| | | | dosage/removal of wrappers, simplification of name queue, client cycle joins other kb/mb bound functions.
* Allow the 'empty' group clients to be window-{h,v}tile'd.okan2020-03-18-7/+1
| | | | Behaviour (or lack there of) noticed by Raf Czlonka.
* Map ('5') and allow mod5mask (altgr) as a modifier.okan2020-03-18-18/+13
| | | | From Artturi Alm (though changed from 'm' to '5')
* add, then use, xvasprintf, checking for appropriate return.okan2020-03-18-10/+18
|
* Ensure the pointer stays within client bounds after a window 'snap' (to edge).okan2020-03-18-1/+2
| | | | reported by Stefan Hagen.
* Because cwm warps the pointer during a client move (to stay within the ↵okan2019-08-24-1/+3
| | | | | | client), there's a window of time where an expose or enternotify event will get generated for a lower client; use a hammer and drain events after keyboard move/resize, until such a time that cwm doesn't warp the pointer. Behavior noticed by kn. ok kn@
* Fix regression from r1.107 (lost a return); kettenis@ pointed out the high ↵okan2019-08-24-1/+2
| | | | potential for a use-after-free (true!) where kn@ ran into the regression using an app that actually exercised the XGrabPointer() failure path.