Commit graph

1308 commits

Author SHA1 Message Date
lbonn
661625b29e ipc/tree: output mandatory fields for all nodes
Still missing: focus
2017-10-08 11:51:03 +02:00
lbonn
e7df811f10 Security config: skip hidden files
Also: fix a small memory leak
2017-10-06 16:23:59 +02:00
lbonn
a7e1a0eea9 Make workspace_next_name work with spaces
`workspace_next_name` parses workspace commands to find the default
workspace names. It handled " " as a separator, which prevents the use
of workspace names with spaces.
2017-10-06 14:37:35 +02:00
lbonn
6197fff0b4 Fix move to named workspaces
The command parsing did not handle workspaces with spaces in their name
(like it's done in `cmd_workspace`)
2017-10-06 14:16:24 +02:00
Drew DeVault
c850d433a7 Merge pull request #1383 from kasicka/macarena
Fix github links in doc
2017-10-05 23:18:39 -04:00
Zuzana Svetlikova
ef0c51b2f3 Fix github links in doc 2017-10-06 05:13:42 +02:00
Calvin Lee
419a1087ac Clean up output command
Plugs memory leaks during failure of the output command and in other
circumstances and fixes `bg` option.

Fixes #1381
2017-10-05 20:46:31 -06:00
Jonas Karlsson
05aeccfca0 Fix issue #1287
All variables without a $ prefix lost their last character due to off by one error
2017-10-03 21:51:02 +02:00
azarus
5987f19eb2 Check for Raspberry Pi 2017-08-14 22:29:21 +02:00
Hummer12007
6f355c6ff7 Raise max ipc message size limit to 256 MB 2017-08-14 20:43:37 +03:00
Drew DeVault
3553fa0a74 One more 2017-08-09 18:42:22 -04:00
Drew DeVault
03af90d302 Clean up fallthrough issues 2017-08-09 18:34:51 -04:00
Ilya Lukyanov
1c5a96c112
Implement nonblocking IO in IPC server
Added client write buffer and handler for writable status on client
socket.
2017-08-08 19:23:50 +03:00
Calvin Lee
3c93e2cf1b Prevent race condition in the kill command
When killing views with `close_views` a use-after-free can sometimes
occur because parent views are killed before their children. This commit
makes `container_map` run functions on child containers before their
parent, fixing the race.

Fixes #1302
2017-08-06 16:56:39 +02:00
Drew DeVault
14eeeed7e0 Remove test clipboard code 2017-07-26 19:11:57 -04:00
Scott Anderson
c29e5bbde8 Use WLC v2 pointer interface 2017-07-12 16:39:14 +12:00
Johannes Lundberg
a3c07273ba Add secucity config for FreeBSD. 2017-07-11 10:56:07 +02:00
Tobias Blass
566863ba5d fix use-after-free bug 2017-07-10 22:59:59 +02:00
Drew DeVault
23a1e94402 Make asciidoc (and man pages) optional
And remove it from the build
2017-07-04 16:02:54 -04:00
Mykyta Holubakha
7d8a84b587
Do not add empty policies
Policy allocation failure is non-fatal
2017-07-01 21:36:17 +03:00
Mykyta Holubakha
4f905ecb96
permit.c: check for NULL pointer dereference 2017-07-01 21:35:53 +03:00
nyorain
60fa626116 Add the 'clipboard' command to set the clipboard 2017-07-01 18:35:42 +02:00
Drew DeVault
298f56353e Merge branch 'master' into server-decoration 2017-06-14 18:53:40 -04:00
Drew DeVault
76fcfa1e7f Force focus on unmanaged views during pointer test 2017-06-14 18:13:41 -04:00
Drew DeVault
d158e18308 Fix Firefox address bar thing
And probably some other stuff too
2017-06-14 18:09:18 -04:00
Calvin Lee
843ad38b3c Implement Tray Icons
This commit implements the StatusNotifierItem protocol, and enables
swaybar to show tray icons. It also uses `xembedsniproxy` in order to
communicate with xembed applications.
The tray is completely optional, and can be disabled on compile time
with the `enable-tray` option. Or on runtime with the bar config option
`tray_output none`.

Overview of changes:
In swaybar very little is changed outside the tray subfolder except
that all events are now polled in `event_loop.c`, this creates no
functional difference.

Six bar configuration options were added, these are detailed in
sway-bar(5)

The tray subfolder is where all protocol implementation takes place and
is organised as follows:

tray/sni_watcher.c:
	This file contains the StatusNotifierWatcher. It keeps track of
	items and hosts and reports when they come or go.
tray/tray.c
	This file contains the StatusNotifierHost. It keeps track of
	sway's version of the items and represents the tray itself.
tray/sni.c
	This file contains the StatusNotifierItem struct and all
	communication with individual items.
tray/icon.c
	This file implements the icon theme protocol. It allows for
	finding icons by name, rather than by pixmap.
tray/dbus.c
	This file allows for asynchronous DBus communication.

See #986 #343
2017-06-07 17:49:16 -07:00
johalun
7fef283044 FreeBSD fixes
Increase _POSIX_SOURCE value where needed.
Increase _XOPEN_SOURCE value where needed.
Conditionally link to libcap (only on Linux).
Possibly some trailing whitespace fixes (automatic).
2017-06-06 09:45:50 +02:00
Mykyta Holubakha
93cf21fb9a Terminate when both suid bit and filecaps are set 2017-05-11 19:33:57 +03:00
Mykyta Holubakha
f736198c31 Initialise logging earlier 2017-05-11 19:29:25 +03:00
wdbw
264a9ee9d8 Add missing send-event mode to sway-input(5)
Also, fix a small typo.
2017-05-06 10:45:17 +01:00
Josip Janzic
400998d6d2 Add mouse button bindings
Adds support for bindings like:

bindsym button3 floating toggle
bindsym $mod+button3 floating toggle
2017-05-04 23:00:03 +02:00
Zandr Martin
51ce752ebf
document font command 2017-05-01 12:53:07 -04:00
Zandr Martin
f65a88e68d
prevent crash when layout auto is missing args 2017-04-29 14:02:07 -04:00
Drew DeVault
816ceddcbd Set child border to background if not specified 2017-04-29 10:07:18 -04:00
Drew DeVault
02812a2e4d Support specifying fewer than 5 colors
This doesn't work, I'm not sure why. The color structs definitely get
changed but if you specify fewer than 5, it renders with the defaults.
2017-04-29 09:56:07 -04:00
Drew DeVault
a5c07dde6a Implement KDE's server-side decoration protocol 2017-04-28 20:32:05 -04:00
Drew DeVault
537261f23f Fix handling of floating windows 2017-04-26 17:14:24 -04:00
Drew DeVault
ffd0d020d6 Update sway(5) 2017-04-26 15:35:54 -04:00
Drew DeVault
51143a75af Implement no_focus
Ref #2
2017-04-26 15:29:42 -04:00
Sebastian Noack
173b338567 Add -DVERSION flag for release version numbers 2017-04-26 15:56:46 +02:00
Calvin Lee
0dc7e9f514 Fix typo in sway(5) 2017-04-23 21:57:23 -06:00
Tomáš Čech
974be01e83
explicitly ignore unused return value
fixes issue#1182
2017-04-19 10:16:24 +02:00
Drew DeVault
94ad169eb6 Merge pull request #1181 from wasamasa/bugfix-initial-scratchpad-size
Use i3's dimensions for initial scratchpad views
2017-04-18 17:57:07 -04:00
Drew DeVault
35603b2341 Merge pull request #1178 from 4e554c4c/fork
Prevent sway from duplicating on a failed fork
2017-04-18 17:49:23 -04:00
Vasilij Schneidermann
0f31323659 Use i3's dimensions for initial scratchpad views
See https://github.com/i3/i3/blob/master/src/scratchpad.c#L196-L197
2017-04-18 23:47:09 +02:00
Calvin Lee
cee26500a8 Prevent sway from duplicating on a failed fork
Also remove a useless `sway_log` and replace it with a pipe
2017-04-18 15:25:37 -06:00
Vasilij Schneidermann
d4ac594264 Implement and document move [to] scratchpad 2017-04-18 21:41:28 +02:00
Jerzi Kaminsky
2ad8850398 Handle symlinks as IPC security targets
- When policies are allocated, the ipc target path goes
  through symlink resolution. The result is used as
  the canonical for matching pids to policies at runtime.
  In particular, this matches up with the target of
  the `/proc/<pid>/exe`.
- There's a possible race condition if this isn't done
  correctly, read below.

Originally, validate_ipc_target() always tried to resolve
its argument for symlinks, and returned a parogram target string
if it validates. This created a possible race condition with
security implications. The problem is that get_feature_policy()
first independently resolved the policy target in order to check
whether a policy already exists. If it didn't find any, it called
alloc_feature_policy() which called validate_ipc_target() which
resolved the policy target again. In the time between the two
checks, the symlink could be altered, and a lucky attacker could
fool the program into thinking that a policy doesn't exist
for a target, and then switch the symlink to point at another file.
At the very least this could allow him to create two policies
for the same program target, and possibly to bypass security
by associating the permissions for one target with another,
or force default permissions to apply to a target for which
a more specific rule has been configured. So we don't that.

Instead, the policy target is resolved once and that result is
used for the rest of the lookup/creation process.
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
bcf9338ce7 Add validate_ipc_target() 2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
bfb99235e3 Move get_feature_policy to sway/security.c 2017-04-16 17:09:53 +03:00