emersion
63b4bf5000
Update for swaywm/wlroots#1126
6 years ago
emersion
b3c55dd909
Merge branch 'master' into leaks
6 years ago
Brian Ashworth
78c08fb0a2
Implement mode --pango_markup
6 years ago
Dominique Martinet
fe72e3b349
cmd_results_to_json: return copied string and properly free the json
...
The only user of this function would copy the string right away
to get rid of the const flag anyway, and freeing a const string
afterwards might work but is not meant to be done according to the
json-c API.
6 years ago
Dominique Martinet
ffe9de6e24
ipc-server: free clients at destroy
6 years ago
Dominique Martinet
b0918b1058
ipc-server: add display destroy listener and remove ipc_terminate
...
wl_event_source_remove() is illegal after display has been destroyed,
so just destroy everything when we still can.
==20392==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000001240 at pc 0x00000048e86e bp 0x7ffe4b557e00 sp 0x7ffe4b557df0
READ of size 8 at 0x607000001240 thread T0
#0 0x48e86d in wl_list_insert ../common/list.c:149
#1 0x7fdf673d4d7d in wl_event_source_remove src/event-loop.c:487
#2 0x41b742 in ipc_terminate ../sway/ipc-server.c:94
#3 0x40b1ad in main ../sway/main.c:440
#4 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308
#5 0x409359 in _start (/opt/wayland/bin/sway+0x409359)
0x607000001240 is located 48 bytes inside of 72-byte region [0x607000001210,0x607000001258)
freed by thread T0 here:
#0 0x7fdf692c4880 in __interceptor_free (/lib64/libasan.so.5+0xee880)
#1 0x7fdf673d371a in wl_display_destroy src/wayland-server.c:1097
previously allocated by thread T0 here:
#0 0x7fdf692c4c48 in malloc (/lib64/libasan.so.5+0xeec48)
#1 0x7fdf673d4d9e in wl_event_loop_create src/event-loop.c:522
#2 0x40acb2 in main ../sway/main.c:363
#3 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308
6 years ago
Dominique Martinet
ebe69583c7
ipc-server: fix more use-after-frees on ipc_send_reply error
...
Since ipc_send_reply frees the client on error, we need to check the
return value properly as we access client later on
Found through static analysis.
6 years ago
Dominique Martinet
0ab04b7434
ipc-server: minor code cleanup
...
No logic change here, this one is mostly to please static analyzer:
- client->fd can never be -1 (and if it could, close() a few lines below
would have needed the same check)
- we never send permission denied error (dead code)
6 years ago
Dominique Martinet
546ddbcd5b
ipc-server: fix double-free on send error in ipc_send_event
...
ipc_send_reply already does client disconnect on error, so we shouldn't
do it again.
We also need to process current index again as disconnect removes client
from the list we currently are processing (this is an indexed "list")
Found through static analysis.
6 years ago
Brian Ashworth
e072fbc6d9
Switch output storing from list_t to wl_list
7 years ago
Brian Ashworth
a1b5b93d29
Store sway_outputs so that they can be reenabled
7 years ago
Brian Ashworth
7c810dc344
Make command block implementation generic
7 years ago
Brian Ashworth
a6d43ff746
Implement IPC_GET_MARKS
7 years ago
Ryan Dwyer
c72940837c
Implement IPC get_seats command
7 years ago
Dominique Martinet
25af959fe9
Fix gcc string truncation warnings
7 years ago
Tony Crisci
6b308dbeb7
address feedback
7 years ago
Tony Crisci
235798ff8e
dont send ipc events when there are no listeners
7 years ago
Tony Crisci
0828c77251
rename input-manager functions
7 years ago
Tony Crisci
e677c5b204
rename seat functions
7 years ago
Drew DeVault
e6fa7a722e
Merge pull request #1669 from emersion/workspace-pointer-events
...
Fix pointer events for hidden workspaces
7 years ago
emersion
eb716c6c43
Fix segfaults when focusing a workspace
7 years ago
Drew DeVault
b28e6d2369
IPC fixes
7 years ago
Drew DeVault
f26ecd9f58
Merge remote-tracking branch 'origin/wlroots' into swaybar-layers
7 years ago
Tony Crisci
dc8c9fbeb6
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
...
This reverts commit 472e81f35d
, reversing
changes made to 6b7841b11f
.
7 years ago
Drew DeVault
d0c7f66e95
Revert "Refactor tree"
7 years ago
Drew DeVault
dbda7bfbed
Move declaration into loop
7 years ago
Drew DeVault
ddc09940b1
Exit ipc_get_workspace_callback early
7 years ago
Drew DeVault
8efee109ad
Implement modes
7 years ago
Drew DeVault
f3fbf19312
Do some small cleanup
...
- Fix workspace events (security config isn't in use so it wasn't being
sent)
- Kill status bar process when swaybar exits
- Don't rearrange windows on every layer surface commit
7 years ago
Drew DeVault
bf7a4cd0eb
Add bar configuration commands
7 years ago
Drew DeVault
6836074fed
Implement enough IPC for swaybar to work
7 years ago
Tony Crisci
b90099b4b7
rename container functions
7 years ago
Tony Crisci
02804584e5
ipc new window event
7 years ago
Tony Crisci
ac8269d536
take seat param for handle_command and rename
7 years ago
Tony Crisci
52670c636c
basic focus (without direction)
7 years ago
Tony Crisci
38a1628a76
clear handler context before ipc command
7 years ago
Dominique Martinet
67985e9031
sway: change all sway_log to wlr_log
7 years ago
Tony Crisci
f2985000f3
ipc get_inputs
7 years ago
emersion
4e2ab53119
Add IPC get_outputs
7 years ago
Tony Crisci
421f49fe03
basic get_tree
7 years ago
Drew DeVault
7753a0ec75
Wire up IPC server
7 years ago
Drew DeVault
733993a651
Move everything to sway/old/
7 years ago
Drew DeVault
0f45fad18c
Establish sway input submodule
7 years ago
Drew DeVault
7c448b4081
Fire up the wlroots backend and run the event loop
7 years ago
Johannes Lundberg
5a63f0f57b
Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.
7 years ago
Drew DeVault
6d83a59b46
Merge pull request #1263 from nyorain/master
...
Implement get_clipboard ipc message
7 years ago
lbonn
61005c3bda
ipc/window-event: fill "container" on close events
...
Also use the recursive description to include children as well
Careful: send the event before deleting the parent
7 years ago
Hummer12007
6f355c6ff7
Raise max ipc message size limit to 256 MB
7 years ago
Ilya Lukyanov
1c5a96c112
Implement nonblocking IO in IPC server
...
Added client write buffer and handler for writable status on client
socket.
7 years ago
nyorain
1cca551c6f
Add get_clipbard ipc errors; Adapt swaymsg
...
Also increase the get_clipboard timeout to 30 secs
7 years ago
nyorain
20888fbb5e
Close fd in clipboard request
7 years ago
nyorain
727215c907
Add timeout; Fix receive loop & style issues
7 years ago
nyorain
f0463dab32
Signal base64 in clipboard type; Reimplement loop
7 years ago
nyorain
1e894c1166
Handle x11 text atoms in get_clipboard ipc
7 years ago
nyorain
c0f2acce4e
Rework get_clipboard implementation
7 years ago
nyorain
42547cafb6
Fix/Simplify get_clipboard ipc-server impl
7 years ago
nyorain
02c75ebe37
Implement ipc get_clipboard
7 years ago
Jerzi Kaminsky
cf5e764c7f
Disambiguate get_*_policy() and get_*_policy_mask()
8 years ago
Drew DeVault
5d3a02a7c6
Merge branch 'master' into pretty-print-swaymsg
8 years ago
Calvin Lee
154c6718c1
Add `-t get_marks` and use more i3-like marks
...
In i3 every mark is unique and one mark cannot be used in more than one
window, sway behavior has been amended to match this.
`swaymsg -t get_marks` will now return an array of all marks used in sway.
See #98
8 years ago
Scott Anderson
1b2cd93212
Removed explicitly setting file descriptors to -1
8 years ago
Drew DeVault
50a31a6c88
Fix dangling file descriptors ( fixes #1152 )
8 years ago
Drew DeVault
60ce81e06a
Add pretty printing to swaymsg
...
If stdout is a tty, it will pretty print unless -r (--raw) is given.
Sample outputs:
```
~/s/s/build > ./bin/swaymsg fullscreen toggle
Error: Permission denied for fullscreen toggle via IPC
~/s/s/build > ./bin/swaymsg -t get_workspaces
Workspace 3:三
Output: DVI-I-1
Layout: splith
Workspace 1:一 (off-screen)
Output: HDMI-A-1
Layout: splith
Workspace 5:五 (focused)
Output: HDMI-A-1
Layout: splith
~/s/s/build > ./bin/swaymsg -t get_inputs
Input device Metadot - Das Keyboard Das Keyboard
Type: Keyboard
Sway ID: 9456:320:Metadot_-_Das_Keyboard_Das_Keyb
Input device Wacom Intuos S 2 Pen
Type: Tablet tool
Sway ID: 1386:827:Wacom_Intuos_S_2
Input device Wacom Intuos S 2 Pad
Type: Tablet pad
Sway ID: 1386:827:Wacom_Intuos_S_2
Input device Logitech Gaming Mouse G502
Type: Keyboard, Mouse
Sway ID: 1133:49277:Logitech_Gaming_Mous
~/s/s/build > ./bin/swaymsg -t get_outputs
Output DVI-I-1
Geometry: 1920x1080 @ 3840,0
Scale factor: 1x
Workspace: 3:三
Output DVI-D-1
Geometry: 1920x1080 @ 0,0
Scale factor: 1x
Workspace: 4:四
Output HDMI-A-1
Geometry: 1920x1080 @ 1920,0
Scale factor: 1x
Workspace: 5:五
```
8 years ago
Drew DeVault
9aed9d9359
UnGNUify the codebase
8 years ago
Drew DeVault
126ce571da
Read configs from /etc/sway/security.d/*
8 years ago
Drew DeVault
1980a08358
Enforce new IPC policies
8 years ago
Drew DeVault
b10721b89e
Add initial support code for new IPC security
8 years ago
Drew DeVault
d859f825d3
Fix build error
8 years ago
Drew DeVault
31b002b6d5
Handle IPC server allocation failures
8 years ago
Drew DeVault
8cef81d6f2
Handle some more memory allocation failures
8 years ago
Greg V
da26d69cb1
Fix build on FreeBSD
...
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf
- Add forgotten json-c include path to swaymsg/CMakeLists.txt
- Disable -Werror because of assert warnings
- Add correct /proc/pid/file path for FreeBSD
- Use libepoll-shim on FreeBSD
- Only use Linux capabilities on, well, Linux
8 years ago
Drew DeVault
d93e53fd4b
Use return value of write
8 years ago
Drew DeVault
d353da248b
Add ipc connection feature policy controls
8 years ago
Drew DeVault
62dad7148f
Enforce IPC security policy
8 years ago
Drew DeVault
e9e1a6a409
Add IPC policy to config
...
Also reduces enum abuse, cc @minus7
8 years ago
Drew DeVault
0a1b211e09
Drop -Denable-binding-event
8 years ago
Drew DeVault
39cf9a82f7
Enforce command policies
8 years ago
Zandr Martin
0516dba3f6
implement "focused container" feature for swaygrab
8 years ago
Zandr Martin
e75217cfb1
fix get_workspaces json reply
8 years ago
Drew DeVault
416417a54c
Reorganize includes
8 years ago
Tony Crisci
4ab35df157
ipc: log sending of events
...
Log the sending of the events in the debug log. This makes ipc server events
easier to verify.
8 years ago
Tony Crisci
e1e15bb43e
ipc: recursive workspace containers in event
...
Recursively describe workspace containers in the workspace event. This is for
compatability with i3 and i3ipc libraries.
8 years ago
Mykyta Holubakha
cf8ef2aea2
Initialize client's subscribed events
8 years ago
Mykyta Holubakha
f52daa26c9
Unite describe_view and describe_window
8 years ago
Mykyta Holubakha
e5c7b019ff
Fix dispatching and assigning events
8 years ago
Mykyta Holubakha
2029fef6b8
More progress on window events
8 years ago
Mykyta Holubakha
976e48d79f
Initial work on window events
8 years ago
Zandr Martin
15a324b0d3
implement `get_tree` command
9 years ago
Zandr Martin
1b4d61662c
fix swaybar problem in 08bef67
9 years ago
Eric Engestrom
08bef67f85
sway: refactor ipc_client_handle_command()
...
This fixes a few mem leaks, as well as remove a false-positive error msg
in IPC_GET_BAR_CONFIG
9 years ago
Eric Engestrom
9d7d73df7f
sway: fix IPC resource leak
9 years ago
Eric Engestrom
3d6a3413b8
sway: always terminate ipc path
9 years ago
Mykyta Holubakha
0f1cfdec61
Renamed to pango_markup
9 years ago
Mykyta Holubakha
2e6c43e62b
Added plaintext_markup to swaybar IPC
9 years ago
Mikkel Oscar Lyderik
f39034a55f
Use correct format string for x86_64 and i686
...
Fix #587
9 years ago
Mikkel Oscar Lyderik
212c6a18a2
Add outputs to bar_config ipc response
9 years ago
Mikkel Oscar Lyderik
6f7cbf2eac
Replace deprecated function wlc_output_get_pixels.
...
This makes IPC GET_PIXELS use the new `wlc_pixels_read` call instead of
the deprecated `wlc_output_get_pixels`.
The old version worked by passing a callback function to wlc which would
grab the pixels and send them to the IPC client.
The new version works by maintaining a list of clients who have
requested the pixels of some output and then grap and send the pixels in
the output_post_render hook of the `wlc_interface`.
9 years ago
crondog
0ee5547406
font: Allow adding font to the config. In prep for border titles
...
v2: Give default font and make bar use it if no bar font
9 years ago
Cole Mickens
28081b7689
libinput
9 years ago
Mikkel Oscar Lyderik
15621ea8ff
Add backwards compatability for binding event
9 years ago