Commit graph

5785 commits

Author SHA1 Message Date
emersion
d803861504
Don't escape swaybg arguments anymore
swaybg used to be invoked with sh, which made escaping necessary. This is no
longer necessary.

Fixes https://github.com/swaywm/sway/issues/3456
2019-01-18 09:22:33 +01:00
emersion
765d7bc94f
meson: remove extraneous parentheses 2019-01-18 08:44:02 +01:00
emersion
bb2f007ad3
meson: remove rpath options 2019-01-18 08:26:44 +01:00
emersion
ab35e0383f
meson: remove unused dependencies 2019-01-18 08:22:59 +01:00
emersion
ba16f16e4d
meson: add gdk-pixbuf and man-pages options 2019-01-18 08:21:43 +01:00
emersion
08a5b304e4
Use Meson feature options 2019-01-17 18:26:24 +01:00
Drew DeVault
5a0c4234b8
Merge pull request #3447 from emersion/remove-swaylock-includes
Remove swaylock headers and unicode.c
2019-01-17 08:13:19 -05:00
Drew DeVault
60a16bbf41
Merge pull request #3448 from emersion/swaybg-xdg-output
swaybg fixes
2019-01-17 08:12:53 -05:00
emersion
f951c2357f
Remove unicode.c 2019-01-17 12:45:41 +01:00
emersion
fe3f4882ed
Don't use sh when spawning swaybg 2019-01-17 11:20:08 +01:00
emersion
808d0e1c51
swaybg: use wl_surface_damage_buffer 2019-01-17 11:14:36 +01:00
emersion
000b313985
swaybg: use output names instead of output indexes 2019-01-17 11:13:10 +01:00
emersion
b29d19bf0d
Remove swaylock headers 2019-01-17 10:26:42 +01:00
Connor E
70637b40fe Fixes for small existing bugs. 2019-01-16 13:02:26 +01:00
Connor E
de6f5b3453 Use static arrays where possible. 2019-01-16 13:02:26 +01:00
Connor E
aa9d7d8ca1 Remove usage of VLAs. 2019-01-16 13:02:26 +01:00
Brian Ashworth
02bbefda20 bar_cmd_tray_bind: Use mouse button helpers
This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for
parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`,
which will use `get_mouse_bindcode` for parsing mouse buttons. Like with
sway bindings, the two commands are encapsulated in a single file to
maximize shared code.

This also modifies tray bindings to work off of events codes rather than
x11 buttons, which allows for any mouse buttons to be used.

For `get_bar_config`, `event_code` has been added to the `tray_bindings`
section and will include to event code for the button. If the event code
can be mapped to a x11 button, `input_code` will still be the x11 button
number. Otherwise, `input_code` will be `0`.
2019-01-16 11:12:45 +01:00
Brian Ashworth
247817f68c layer_shell: do not SIGABRT sway on zero outputs
If there are no outputs, do not SIGABRT when a layer surface is created,
just close the layer surface.
2019-01-16 10:55:25 +01:00
Brian Ashworth
81e595e6e8 cmd_resize: allow resizing hidden scratchpad by px
Allow resizing a hidden scratchpad container by px. Resizing a hidden
scratchpad container by ppt is still not allowed since there is no
workspace
2019-01-16 09:30:43 +01:00
Brian Ashworth
638b04b3e0 seatop_begin_down: raise floating
In `seatop_begin_down`, raise the floating container. This appears to
have been dropped in the transition to seatops.
2019-01-15 22:45:01 +01:00
Brian Ashworth
686b853047 Do not send ipc_event_shutdown from ipc client
In `sway_terminate`, `ipc_event_shutdown` was being sent regardless
which mode sway was running in. When running as an ipc client,
`sway_terminate` should just exit
2019-01-15 22:41:54 +01:00
Rouven Czerwinski
f7309778a7 cursor: send clear_focus on hide and enter event on unhide
Clear the focus when we hide the cursor and show it again during the unhide
action. The unhide function will rebase the cursor after the unhide.

Tested by looking at the WAYLAND_DEBUG=1 output of termite.

Also call cursor_handle_activity before sending pointer events to send the enter
events to the surface if the cursor was hidden before.

Fixes #3431
2019-01-15 14:06:48 -05:00
Connor E
023c92423e Remove wlr_xdg_surface_send_close. 2019-01-15 09:13:27 +01:00
Brian Ashworth
a68bc5f449 Do not damage view child when container is NULL
In `view_child_damage`, do not damage the surface if it has been
unmapped or if the container is NULL.
2019-01-15 09:06:42 +01:00
Brian Ashworth
3087942c35 Handle hidden scratchpad containers in commands
This fixes the handling of hidden scratchpad containers for some
commands. For the most part, this just prevents running the commands on
hidden scratchpad containers, but there are some commands that have some
special handling for them.
2019-01-15 09:05:27 +01:00
Brian Ashworth
bbd312c95a
Merge pull request #3422 from RyanDwyer/resize-immediate-siblings
Resize only current and immediate siblings rather than all siblings
2019-01-14 21:45:14 -05:00
Ryan Dwyer
289130430f Fix invalid pointers when using resize grow width on first/last siblings 2019-01-15 08:17:41 +10:00
Ryan Dwyer
2024f1da72 Resize only current and immediate siblings rather than all siblings
For example, create layout V[view view view] and resize the leftmost
view using mod+rightclick. Previously, the edge between view 2 and 3
would be adjusted as well. Now this edge will remain constant, which
matches the behaviour of i3.

To do this operation correctly, the resize tiling seatop now keeps track
of two containers, as the container that resizes horizontally will be a
different container to the one which resizes vertically (one will be an
ancestor). The tiling resize seatop now figures out these containers
during the start of the operation and keeps references to them in the
event. A new function container_find_resize_parent has been introduced
to do this. This function is also used by the resize command.

During cursor motion, the seatop logic is similar to before, but now has
to choose the correct container to resize.

In resize.c, container_resize_tiled and resize_tiled have been merged
into one. One of them originally did nothing except pass the values
through to the other.

container_resize_tiled now takes a simplified approach where it just
finds the immediate siblings on either side and resizes them without
worrying about the others. The parellel_coord and parallel_size
functions are no longer needed and have been removed.
2019-01-15 08:01:21 +10:00
Brian Ashworth
2573606b60 Disarm key repeat on reload
When resetting the keyboard during reload, disarm the key repeat on all
keyboards since the bindings (and possibly keyboard) will be freed before
the key repeat can go off.
2019-01-14 20:15:23 +01:00
Brian Ashworth
2257368f1a CONTRIBUTING.md: mention tab width for line length
Adds a note about assuming a tab width equal to 4 spaces when
determining the line length to CONTRIBUTING.md
2019-01-14 19:46:54 +01:00
Ian Fan
2f36db15d4 config.in: update swayidle/swaylock example 2019-01-14 18:08:13 +01:00
Brian Ashworth
15cd8b6a86
Merge pull request #3403 from mstoeckl/ipcleanup
Remove 'input' field of IPC command return json
2019-01-14 11:44:18 -05:00
M Stoeckl
2a684cad5f Remove now-unused "input" argument of cmd_results_new
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))`
applied to `cmd_results_new`.

String usage constants have been converted from pointers to arrays when
encountered. General handler format strings were sometimes modified to
include the old input string, especially for unknown command errors.
2019-01-14 08:05:29 -05:00
M Stoeckl
6d392150a7 Remove 'input' field of IPC command return json
This field is not in i3 and provides imprecise and redundant information.
(Specifically, when swaymsg is given a list of commands, the IPC return
array already indicates precisely which number command failed; knowing
the name of the command is not useful when multiple commands of the
same type are provided.)
2019-01-14 07:58:02 -05:00
emersion
64ef936673
Merge pull request #3418 from RyanDwyer/remove-resize-axis
Replace resize_axis with wlr_edges
2019-01-14 11:19:18 +01:00
Ryan Dwyer
b322432eff Use uint32_t where resize axis might contain a bitfield 2019-01-14 20:10:49 +10:00
emersion
3ea176bb04
Merge pull request #3419 from ianyfan/swaynag
swaynag: handle empty $XDG_CONFIG_HOME better
2019-01-14 10:50:43 +01:00
Ian Fan
8729c65311 swaynag: handle empty $XDG_CONFIG_HOME better
Set config path to fallback instead of setting $XDG_CONFIG_HOME
2019-01-14 09:45:18 +00:00
Ryan Dwyer
22ac1c121a Replace resize_axis with wlr_edges
This patch removes the resize_axis enum in favour of wlr_edges. As
wlr_edges has no `horizontal` or `vertical` value, it denotes these by
bitwise `or`ing the left/right and up/down values. Two constants are
defined to make it easier to refer to these.

This will allow the tiling resize seatop to utilise the functions in
this file. resize_axis was local to the resize command and couldn't be
exposed in function arguments.
2019-01-14 19:05:48 +10:00
emersion
89ad3f2bbb
Merge pull request #3417 from swaywm/remove-swaylock
Split swaylock into separate project
2019-01-14 08:57:20 +01:00
Drew DeVault
3fca8b8d22 Split swaylock into separate project 2019-01-13 21:40:26 -05:00
Drew DeVault
784178ed37 Remove WIP from README.md 2019-01-13 21:36:59 -05:00
Drew DeVault
4879d40695
Merge pull request #3144 from emersion/cmd-xwayland
Add xwayland command
2019-01-13 20:42:39 -05:00
Drew DeVault
81bb675274
Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improved
Improve mouse button parsing: bar mouse bindings
2019-01-13 20:41:05 -05:00
Drew DeVault
9f9ef76175
Merge pull request #3343 from RedSoxFan/seat-cursor-buttons-improved
Improve mouse button parsing: seat cursor buttons
2019-01-13 20:40:42 -05:00
Drew DeVault
db1631b67d
Merge pull request #3342 from RedSoxFan/scroll-buttons-improved
Improve mouse button parsing: input scroll_button
2019-01-13 20:40:00 -05:00
Drew DeVault
23ab56bbf7
Merge pull request #3402 from RyanDwyer/refactor-seatops
Refactor seat operations to use an interface
2019-01-13 20:38:34 -05:00
Drew DeVault
08569aab36
Merge pull request #3388 from RedSoxFan/reset-inputs-on-reload
reload: reset input configs
2019-01-13 20:37:05 -05:00
Drew DeVault
fc93cd20dc
Merge pull request #3397 from RedSoxFan/fix-swaybar-height
swaybar: obey height if given
2019-01-13 20:36:08 -05:00
Drew DeVault
4eb0767414
Merge pull request #3398 from RedSoxFan/toggle-input-events
input events: toggle and ipc get_inputs
2019-01-13 20:35:45 -05:00