Commit Graph

2098 Commits

Author SHA1 Message Date
okan
c684045919 fix missing includes 2019-02-13 15:43:24 +00:00
matthieu
f2f9eae95d use abs(3) for integers. Noticed by a clang warning. ok tb@ 2019-02-11 07:10:45 +00:00
landry
ac84202cf8 Pledge video(1):
* video -q needs 'stdio rpath wpath video' (needs O_RDWR on the device)
* video -i needs 'stdio rpath' (rpath for X11 error/locale access)
* other modes (ie display frames via X11, or output frames to file with
 -o/-O) need 'stdio rpath video' since we open output file/video device
before calling pledge(2).

with help from semarie@, nits from matthieu@
ok deraadt@
2019-01-22 20:02:40 +00:00
landry
b0c17c65a4 Rename err to errs to avoid shadowing potential err() usage, and fix two
typos while here.

ok semarie@ matthieu@
2019-01-04 17:45:00 +00:00
matthieu
cfac9b1f49 Unlink the following utilities from the build:
fslsfonts, fstobdf, showfont, xfsinfo, xfwp and scripts (xon)
Ports can be created if needed. ok deraadt@, jca@
2018-12-21 14:37:24 +00:00
okan
7d9a5b3486 Stop asking for events (NoEventMask) from menu window once done with
the menu (we don't destroy it, only unmap).
2018-11-14 19:22:51 +00:00
okan
ee0ce74a2f Allow 'transientfor' clients to inherit group and bwidth either during init or
via property notify events. Previously only the flags were set but nothing was
in the path to apply said flags and/or bwidth. Required slight of re-orgnaization
of client_init.
2018-11-13 17:37:13 +00:00
kn
5089c22b90 Use strtonum(3)
Zap obsolete linter hints while here.

Feedback and OK cheloha
2018-11-11 16:10:37 +00:00
kn
c5d5ef9f35 Zap unneeded bzero(3) on already zero initialized global data
OK cheloha
2018-11-11 16:01:21 +00:00
okan
0a0e524477 merge from base, from sashan@:
> - odd condition/test in PF lexer
> (and other lexers too)
>
> This commit rectifies earlier change:
>
> in the lex... even inside quotes, a \ followed by space or tab should
> expand to space or tab, and a \ followed by newline should be ignored
> (as a line continuation).  compatible with the needs of hoststated
> (which has the most strict quoted string requirements), and ifstated
> (where one commonly does line continuations in strings).
>
> OK deraadt@, OK millert@
2018-11-09 16:00:54 +00:00
okan
2fda12947a Use the original client border width to adjust initial placement of clients
containing {P,US}Position requests where they are explicitly set to 'ignore' in
cwmrc(5); clients are unaware that their border will be altered (removed in
this case) when calcuating position and thus end up a factor of their original
border width off once mapped by cwm(1). cwm(1) will essentially shift the
client to the edge if the original request's position and border match.

Window offset noticed by at least Andre Stoebe via bugs@, and others since
(and likely before). Thanks!
2018-11-08 15:49:42 +00:00
matthieu
b2e24c1d7c Remove the unused 'keyFile' resource.
It is not used anymore in xenodm (was used to specify the secret keys
for the XDM-AUTHORIZATION-1 authentication protocol in xdm with
xdmcp).
ok kn@
2018-11-03 18:04:45 +00:00
matthieu
b129529692 regen 2018-11-03 14:01:21 +00:00
matthieu
e0d21cc9e4 Remove useless check for XdmcpWrap().
It was only needed by xdmcp. ok tb@ mortimer@
2018-11-03 14:01:02 +00:00
matthieu
f5d27d0af0 Fix path to app-default resource file. From Sascha Paunovic,
tweaked by me. ok deraadt@
2018-11-01 11:48:04 +00:00
matthieu
f9024c4d46 Pass the correct buffer length to strlcpy() to avoid truncation.
Problem noticed by Edgar Pettijohn III, ok tb@
2018-10-28 19:38:19 +00:00
mestre
bb65f435ee Add a few \n I missed to add in some fprintf(3)s in my last commit 2018-10-26 17:37:47 +00:00
mestre
2288d216a5 If input_name is provided we can unveil(2) it with read permissions, if
output_name is provided we need to unveil(2) this one with rwc. Additionally
depending on the different combinations of if these files are passed via args
or from stdin/to stdout we can also pledge(2) accordingly to the code path.

OK deraadt@
2018-10-26 17:12:03 +00:00
matthieu
edd3ecfc7c Explicitely disable xf86misc 2018-10-20 19:09:19 +00:00
matthieu
f4445f7d08 Add an option to disable the active area. From Sebastien Marie.
ok claudio@ Thanks.
2018-09-06 07:21:34 +00:00
matthieu
02339cbc79 use #define XXX 0 to explicitelty disable an option. 2018-07-21 09:31:22 +00:00
matthieu
214a961ee2 Explicitely disable paste64 and readline options, to disable bracketed paste.
readline was not enabled, but paste64 which was on by default enables it.
requested by deraadt@
2018-07-21 09:16:42 +00:00
matthieu
0523432214 This file is not generated by configure, @ substitutions arent available 2018-07-17 11:52:12 +00:00
okan
2f18ffa39d Remove unused prototype; from Ross L Richardson. 2018-07-16 14:19:23 +00:00
matthieu
ebae2cc3f5 Remove useless test for DISPLAY number.
This script is only run by xenodm for DISPLAY=:0
2018-07-16 06:52:00 +00:00
matthieu
d39b1994a3 OpenBSD id 2018-07-15 09:58:03 +00:00
matthieu
d31532afbd Make Xstartup/Xreset consistent with GiveConsole/TakeConsole 2018-07-15 09:53:23 +00:00
matthieu
2a47fd34e2 regen 2018-07-15 09:07:48 +00:00
matthieu
10783d146c Revert the removal of Xreset and Xstartup. 2018-07-15 09:05:11 +00:00
matthieu
38960e7a0a Update to xkbcomp 1.4.2 2018-07-12 14:38:26 +00:00
matthieu
0aad528dd7 pledges for session can be tighten a bit now. 2018-07-11 20:28:41 +00:00
matthieu
15bc4073c0 The file descriptor parameter is not used by DefineSelf() in xenodm.
Zap it.
2018-07-11 19:51:12 +00:00
matthieu
4feeb26f77 sessreg -x is useless if not updating utmp. Remove it.
Also don't try to remove utmp lines that were not written.
2018-07-11 19:20:40 +00:00
matthieu
ec07007116 Ooops I didn't intend to commit that part. revert it. 2018-07-11 19:06:29 +00:00
matthieu
b3e8c00865 Actually remove the source files for Xstartup and Xreset 2018-07-11 19:05:22 +00:00
matthieu
35981369b1 Remove Xstartup and Xreset script. Xenodm uses GiveConsole and TakeConsole 2018-07-11 19:03:50 +00:00
matthieu
5d69c81cc1 Keep a better trace of pending children to be reaped. 2018-07-11 16:57:04 +00:00
matthieu
c3094ef041 Delete unused code 2018-07-11 16:33:44 +00:00
matthieu
6d7357f962 Bind <Key>Escape to erase-line by default. 2018-07-11 16:28:54 +00:00
matthieu
c8c914a77e Less ifdef cruft. 2018-07-11 16:26:25 +00:00
matthieu
bf265b5bbc use strvis on login name when logging debug information it since it
may contain control characters. And remove an extra logging of the same.
2018-07-11 16:20:20 +00:00
matthieu
8f540c071b Restore previous SIGCHLD handler in serverPause().
This fixes the issue where xenodm whould stay stuck after kill the
Xserver twice.

While here add some more Debug() calls to help following what's going on
2018-07-11 14:35:46 +00:00
matthieu
2c8cd3e507 Also revert this one, doesn't look right either. 2018-07-10 15:52:52 +00:00
matthieu
a8c7a38ea4 Revert some of the strlcpy() conversions which are wrong. 2018-07-10 15:32:27 +00:00
matthieu
8b4158c82d Remove more unused ifdefs blocks 2018-07-10 14:58:57 +00:00
matthieu
91c82fae6b Remove useless ifdefs 2018-07-10 14:50:21 +00:00
matthieu
a08190694c Get rid of strcpy and strncpy (they were all looking safe though) 2018-07-10 14:44:34 +00:00
matthieu
1b4f7ecea8 Consistant use of bool whenever possible. 2018-07-10 14:20:42 +00:00
matthieu
8e35b035af Remove unused code. 2018-07-10 13:57:31 +00:00
matthieu
72e68d3bca Remove the unused localHostname() function. 2018-07-10 13:15:50 +00:00
matthieu
53d0e5e23b Remove prototype for function that doesn't exist anymore in xenodom. 2018-07-09 16:52:19 +00:00
matthieu
e5b6c5a29f Source the Xsetup script before initializing the greeter widget.
Based on a request by weerd@, tested by jca@ and weerd@
2018-07-09 15:02:41 +00:00
matthieu
eb834a5bcb Explcitely disable xf86misc and fontcache extension support.
Some people may still have old files lying around while building.
Suggested by deraadt@
2018-05-29 06:02:52 +00:00
matthieu
ca1e08f7e7 Update xwud to 1.0.5 2018-05-21 18:47:37 +00:00
matthieu
b04bdc2c8c Update to xwininfo 1.1.4 2018-05-21 18:44:13 +00:00
matthieu
4781b8e95b Update to xwd 1.0.7 2018-05-21 18:37:29 +00:00
matthieu
3a44be172c Update to xsm 1.0.4 2018-05-21 18:33:48 +00:00
matthieu
84bc3460e2 Update to xsetroot 1.1.2 2018-05-21 18:29:41 +00:00
matthieu
3488e8d2b1 Update to xset 1.2.4 2018-05-21 18:24:59 +00:00
matthieu
7836b43bc8 update xrefresh 1.0.6 2018-05-21 18:18:55 +00:00
matthieu
677ce9defe Update to xrdb 1.1.1 2018-05-21 18:14:58 +00:00
matthieu
8e147bf9b3 Update to xprop 1.2.3 2018-05-21 18:11:25 +00:00
matthieu
cf2d414a08 Update to xpr 1.0.5 2018-05-21 18:08:21 +00:00
matthieu
8c04f8bbd4 Update to xmessage 1.0.5 2018-05-21 18:04:09 +00:00
matthieu
ecaf0e92ef Update to xlsfonts 1.0.6 2018-05-21 18:00:32 +00:00
matthieu
96be043b7d Update to xlsclients 1.1.4 2018-05-21 17:58:22 +00:00
matthieu
3a29818cc4 Update to xload 1.1.3 2018-05-21 17:54:50 +00:00
matthieu
28f6cb9d7b Update to xkill 1.0.5 2018-05-21 17:50:14 +00:00
matthieu
e9ceea7e14 Update to xkbcomp 1.4.1 2018-05-21 17:46:26 +00:00
matthieu
169077e610 Update to xinit 1.4.0 2018-05-21 17:05:09 +00:00
matthieu
bb038f719e Update to xfontsel 1.0.6 2018-05-21 16:24:15 +00:00
matthieu
e47cdd2d02 Update to xeyes 1.1.2 2018-05-21 16:19:57 +00:00
matthieu
ec123d971d Update to xdriinfo 1.0.6 2018-05-21 16:15:34 +00:00
matthieu
b11eddb90c Update to xbacklight 1.2.2 2018-05-21 16:11:22 +00:00
matthieu
bd628a1a50 Update to viewres 1.0.5 2018-05-21 16:05:26 +00:00
matthieu
141f5c95e3 Update to twm 1.0.10 2018-05-21 16:00:54 +00:00
matthieu
8259ecda0d Update to oclock 1.0.4 2018-05-21 15:49:52 +00:00
matthieu
488561031c Update to mkfontscale 1.1.3 2018-05-21 15:42:53 +00:00
matthieu
485d079708 Update to listres 1.0.4 2018-05-21 15:38:17 +00:00
matthieu
8b98922533 Update to ico 1.0.5 2018-05-21 15:32:35 +00:00
matthieu
a22e8b4a1c Update to iceauth 1.0.8 2018-05-21 15:22:54 +00:00
matthieu
d8bf5bd739 Update to editres 1.0.7 2018-05-21 15:15:36 +00:00
matthieu
307bf81e1f Update to appres 1.0.5 2018-05-21 15:00:17 +00:00
matthieu
0ebe3be11d Update to appres 1.0.5 2018-05-21 14:59:53 +00:00
matthieu
54917569e6 Change the 'Enable Blinking Cursor' menu item to 'Toggle Cursor Blinking'
This is more coherent with how the menu item interacts with changes
caused by sending escape sequences. Remove the check mark from the
item which was getting out of sync.
2018-05-20 09:28:40 +00:00
matthieu
2c13a1681c Make 'reset terminal' also reset the blinking state of the cursor.
Fix from Thomas Dickey.
2018-05-20 09:25:38 +00:00
matthieu
a7a745bbe2 set the default for cursorBlink to 'never' 2018-05-20 09:22:18 +00:00
matthieu
022476f90f static variable shadowing found by clang 2018-05-06 15:26:15 +00:00
matthieu
537654d79d Unused variables found by clang 2018-05-06 15:25:27 +00:00
matthieu
fc7d5d1825 Add missing brackets to multi-statement if in SaveServerAuthorizations
From Alan Coopersmith in xdm.
2018-05-06 15:18:42 +00:00
cheloha
26b9521ab8 Don't use optarg as format string.
ok millert@
2018-04-09 18:16:44 +00:00
cheloha
c37ef19e61 Measure statistics against UPTIME clock.
So that your statistics remain correct if the system wall clock is
changed during playback.

Use CLOCK_UPTIME instead of CLOCK_MONOTONIC so that statistics remain
correct across suspend/resume.

Testing by tobias@, sthen@,
and Benjamin Baier <programmer AT netzbasis DOT de>.

ok sthen@
2018-04-09 15:48:14 +00:00
matthieu
75cfafe8e6 Update to bdftopcf 1.1 2018-03-29 20:34:30 +00:00
matthieu
a59a4af1e1 Update to xterm 331 2018-03-29 20:23:53 +00:00
matthieu
6e8ae15186 Update to xterm 331 2018-03-29 20:22:05 +00:00
matthieu
364ef0736d Update to xterm 331 2018-03-29 20:19:15 +00:00
jsg
c2b80944a9 take a change from xlockmore 5.55 to make it build with llvm 6.0.0
ok matthieu@
2018-03-16 00:43:32 +00:00
jsg
5397eac377 update glxinfo to mesa-demos 8.4.0 2018-02-23 10:37:24 +00:00
anton
0fee670a91 Do not print any parse errors when ~/.cwmrc is missing. Regression introduced in
revision 1.109 of calmwm.c.

ok okan@
2018-02-19 19:29:42 +00:00
okan
697099fca8 Store the screen's visual type and colormap. 2018-02-13 15:43:15 +00:00
okan
4943cc002d Consolidate region 'view' and 'area'. 2018-02-13 15:06:22 +00:00
okan
f1e693de1a limit scope of screen_apply_gap() 2018-02-09 20:08:07 +00:00
okan
088c402dd1 Clean up conf_file/homedir and conf_init() bits. 2018-02-09 19:54:54 +00:00
okan
96465e4cd4 Use screen's saved view instead of re-querying the server. 2018-02-06 15:05:20 +00:00
okan
5e4538db44 Slightly expand and expose verbose debugging. 2018-02-04 22:56:26 +00:00
okan
b5c7b4db44 add debugging for x events 2018-02-02 13:50:22 +00:00
okan
231107e041 Add a simple debug logging mechanism. 2018-02-02 13:40:55 +00:00
okan
17954eae66 Simplification; use asprintf where appropriate now. 2018-02-02 13:27:25 +00:00
okan
05e2523486 Use func attributes where appropriate. 2018-02-01 15:17:51 +00:00
okan
5a56fafb12 Fix wins comparison declaration since it's unsigned from XQueryTree(). 2018-01-23 16:18:59 +00:00
okan
ebf71bdff9 Generate name_to_func[] in a clean and readable fashion. 2018-01-23 16:00:21 +00:00
okan
a1afcb2881 Shrink tier[] by one after removing matchname in r1.55. 2018-01-23 13:51:39 +00:00
okan
0ddfd6d206 If the requested group number is invalid, bail but don't kill cwm. 2018-01-23 13:48:49 +00:00
okan
d6b2d66ae6 Quick fix: exit after a failed execvp in u_spawn instead; previously we did in
u_exec, but the introduction of re-exec'ing the previous invocation of cwm if
'exec_wm' failed missed the 'exec' failing path. Will likely split out as a
proper fix.

Odd behaviour reported by Ve Telko.
2018-01-08 16:21:54 +00:00
okan
c0bbe24b5b Only exec the fallback when in CWM_EXEC_WM state.
Broken quit noticed by Ve Telko.
2018-01-02 14:04:58 +00:00
okan
13cc53e0d8 Typo, from Julien Steinhauser. 2017-12-30 22:25:09 +00:00
okan
0bf4ad029c If the replacement window manager fails to start, restart the fallback (the
original invocation of cwm).
2017-12-29 20:09:19 +00:00
okan
cd4212fc60 Convert menu-exec-wm from an abritrary exec menu, into a config-based menu from
which one may configure (wm <name> <path_and_args>) (and choose) specific
window managers to replace the running one. 'wm cwm cwm' is included by
default.

No objections and seems sensible to sthen.
2017-12-29 20:03:46 +00:00
okan
73d422515c As done for buttonrelease, work specific un-cycling and un-highlighting actions
into the keyrelease event, only performing what's actually needed for each;
should result in much fewer events against keyreleases. No intended behaviour
change.

Additionally, like we do for group membership, grab the keyboard only when
required for cycling.
2017-12-29 18:50:43 +00:00
okan
ef78852268 Merge group_toggle_membership_leave into the buttonrelease event and only do
border work for a group/ungroup action.
2017-12-29 16:55:50 +00:00
okan
832edccdc9 add helper function client_show to bring together like actions for unhide/raise 2017-12-29 12:54:54 +00:00
okan
9c1762c16f Add support for re-exec'ing with SIGHUP; equivalent to the already built-in
'restart' function.
2017-12-27 18:46:18 +00:00
okan
bcdf71d022 Use poll and XNextEvent to replace XNextEvent blocking inside the x11 event
handler.
2017-12-27 17:04:35 +00:00
okan
97f922dc38 zap stray that snuck in 2017-12-22 21:30:01 +00:00
okan
9ced81cc97 Return the connection number for the display. 2017-12-22 21:27:45 +00:00
okan
3668d8b165 Fix a few comments and while here, wrap some long lines. 2017-12-22 21:21:44 +00:00
okan
a3cbca55bd Use a variable to keep track of flags for menu_filter(). 2017-12-19 19:38:43 +00:00
okan
c7619bea34 Add support for _NET_WM_STATE_SKIP_PAGER and _NET_WM_STATE_SKIP_TASKBAR; eerily
close to cwm's 'ignore'.

Roughly based on an initial diff from Walter Alejandro Iglesias, but with
support for both Atoms and without cwm-based bindings.
2017-12-19 14:30:53 +00:00
okan
2c1aed2ec8 remove duplicate ExposureMask 2017-12-15 13:13:17 +00:00
schwarze
1c45dc4fed Disable Unicode canonical composition by default because that's
less surprising and makes copy and paste work better, even though
some none-default fonts currently do not display combining accents.

Problem reported by Philippe Meunier <meunier at ccs dot neu dot edu>.
Root cause found by bentley@.
OK bentley@, and the general direction was also supported by stsp@.
2017-12-13 17:45:49 +00:00
okan
7944040cd2 move variable declarations up, to match everything else 2017-12-13 15:10:17 +00:00
okan
0202b86b58 clean up after previous (noprompt removal) 2017-12-12 15:37:16 +00:00
okan
2a75b150b0 Unconditionally show prompt on menus, regardless of invocation. 2017-12-11 20:58:18 +00:00
okan
6fd1cc10d9 Original idea from Dimitris Papastamos to move windows to corners a while ago;
re-proposed by Julien Steinhauser with an updated diff. Apparently this was in
the original calmnwm.

However, expand the original idea and let clients 'snap' to edges instead,
neatly allowing key bindings that snap to adjacent edges (i.e. corners) as
well. No default bindings assigned.
2017-12-07 16:25:33 +00:00
okan
4210dba245 give command and group menus their own match callbacks 2017-12-07 16:03:10 +00:00
okan
f7999cdcf1 stash dir into conf since it'll be of use 2017-12-07 15:47:14 +00:00
okan
bf36743105 organize this a bit better 2017-12-07 15:40:54 +00:00
okan
52a26c6c07 spacing 2017-12-07 15:39:47 +00:00
okan
ca283e4b1e Revert r1.109 (Switch to XWindowEvent() pulling out events that match the mask
*and* window.) of mousefunc.c. When a client destroys itself while we are
moving or resizing it, XWindowEvent() blocks. Found the hard way by Anton
Lazarov, and Lea°hNeukirchen found the right bit to revert - thanks! Reverting
since the reason to switch from XMaskEvent was unclear.
2017-11-30 18:18:51 +00:00
matthieu
e172c9b2ce xdm -> xenodm in log and error messages 2017-11-12 17:10:12 +00:00
schwarze
058038d574 use the proper macros in the AUTHORS section 2017-11-09 19:13:03 +00:00
matthieu
ca5563feca Remove xdm. Unhooked since more than 6 months. 2017-10-12 19:32:43 +00:00
matthieu
08a235a628 chown before chmod
This prevents a malicious user logging out from calling
chmod while still owning /dev/console and thus by-passing
the '622' mode that is set here.

Issue reported by Tim Chase. Thanks.


Merged from xdm upstreams
2017-10-04 18:28:59 +00:00
okan
b853354218 Case matters for menu matching on executables; from ben@lloyd.im. 2017-09-06 14:15:13 +00:00
deraadt
5150e677a9 backout hard-coded behaviour change which was not discussed, in
particular no justification for why the current behaviour is wrong
2017-09-05 17:48:07 +00:00
dcoppa
44401622e1 amend comment 2017-08-30 07:59:00 +00:00
dcoppa
7055fe14e7 Use 'unix:0' for the DISPLAY environment variable
ok matthieu@
2017-08-30 07:48:56 +00:00
anton
12dfb02fe0 Fix error check according to the secure idiom described in the snprintf(3)
manual.

ok dcoppa@
2017-08-29 08:50:37 +00:00
dcoppa
7069c249d5 When xinit starts an X server that listens only on UNIX socket,
prefer DISPLAY=unix:0 rather than DISPLAY=:0.
This will prevent applications from ever falling back to TCP if the
UNIX socket connection fails (such as when the X server crashes).

joint work with tb@
cluebat and ok matthieu@
2017-08-28 15:13:11 +00:00
matthieu
1711398f5e Missing dot breaks semantic markup. from Klemens Nanni. Thanks. 2017-08-22 06:54:08 +00:00