Commit Graph

6054 Commits

Author SHA1 Message Date
Ian Fan
011d43746f Add error handling for getting config file size 2018-07-15 15:36:51 +01:00
Ian Fan
e6209afcd6 Fix config buffer overflow and logic 2018-07-15 14:59:54 +01:00
Drew DeVault
8e05fb7826
Merge pull request #2275 from RyanDwyer/transactionise-focus
Make focus part of transactions
2018-07-15 06:49:29 -07:00
Ryan Dwyer
a120d4c79f Make focus part of transactions
Rather than maintain copies of the entire focus stack, this PR
transactionises the focus by introducing two new properties to the
container state and using those when rendering.

* `bool focused` means this container has actual focus. Only one
container should have this equalling true in its current state.
* `struct sway_container *focus_inactive_child` points to the immediate
child that was most recently focused (eg. for tabbed and stacked
containers).
2018-07-15 22:08:26 +10:00
Drew DeVault
53e3f35ba3
Merge pull request #2272 from RyanDwyer/simplify-transactions
Simplify transactions by using a dirty flag on containers
2018-07-15 05:01:25 -07:00
Drew DeVault
806c06fdfb
Merge pull request #2266 from emersion/remove-orbital-screenshooter
Remove orbital screenshooter
2018-07-15 05:00:38 -07:00
Drew DeVault
f4edf84b4f
Merge pull request #2273 from swaywm/debug-flags
Add extended debugging flags
2018-07-14 18:30:59 -07:00
Drew DeVault
b1afcc69fa Add extended debugging flags
We currently have several ways of setting debug flags, including command
line arguments, environment variables, and compile-time macros. This
replaces the lot with command line flags.
2018-07-14 20:44:32 -04:00
Ryan Dwyer
6b2dc7e63b Set signature to void 2018-07-15 10:41:10 +10:00
Ryan Dwyer
2032f85d94 Simplify transactions by utilising a dirty flag on containers
This PR changes the way we handle transactions to a more simple method.
The new method is to mark containers as dirty from low level code
(eg. arranging, or container_destroy, and eventually seat_set_focus),
then call transaction_commit_dirty which picks up those containers and
runs them through a transaction. The old methods of using transactions
(arrange_and_commit, or creating one manually) are now no longer
possible.

The highest-level code (execute_command and view implementation
handlers) will call transaction_commit_dirty, so most other code just
needs to set containers as dirty. This is done by arranging, but can
also be done by calling container_set_dirty.
2018-07-14 23:14:55 +10:00
Drew DeVault
dbeb03aa68
Merge pull request #2271 from RedSoxFan/implement-1569
Implement tap_button_map for input devices
2018-07-14 06:11:44 -07:00
Brian Ashworth
13c6627ddb Implement tap_button_map for input devices 2018-07-14 01:01:47 -04:00
Drew DeVault
63f28bcf1e
Merge pull request #2244 from RyanDwyer/floating-resize
Implement resize command for floating views
2018-07-13 18:35:40 -07:00
Ryan Dwyer
0584ecec0a Force min/max size when resizing floating containers 2018-07-14 10:00:39 +10:00
Ryan Dwyer
5940682f40 Implement resize grow|shrink <direction> <amount> or <amount> 2018-07-14 10:00:39 +10:00
Ryan Dwyer
558ca9fc28 Implement resize command for floating views
Implements the following for floating views:

* resize set <width> <height>
* resize <grow|shrink> <width|height|up|down|left|right> <amount>
2018-07-14 10:00:39 +10:00
emersion
4e486a01bb
Merge pull request #2269 from minus7/swaybarbg-crash-on-dpms-resume
swaybar/bg: Fix crash on DPMS off
2018-07-13 23:15:10 +01:00
minus
c73a40555f swaybar/bg: Fix crash on DPMS off
When turning off displays via DPMS, swaybar and swaybg still tried to
render, but did not get a valid buffer, causing them to crash.
2018-07-14 00:04:02 +02:00
Drew DeVault
e0e31418d4
Merge pull request #2267 from emersion/simplify-popup-constraints
Simplify popup_unconstrain
2018-07-13 13:26:30 -07:00
emersion
efda33b285 Simplify popup_unconstrain
Just use the parent output.
2018-07-13 21:17:31 +01:00
emersion
82c978d34b Remove orbital screenshooter 2018-07-13 19:29:44 +01:00
Drew DeVault
671a202c94
Merge pull request #2260 from emersion/fix-has-opaque-lockscreen
Fix output_has_opaque_lockscreen
2018-07-13 04:33:58 -07:00
emersion
d88f1d2196 Fix output_has_opaque_lockscreen 2018-07-13 12:26:20 +01:00
Drew DeVault
bcdf04d79c
Merge pull request #2252 from rkubosz/scroll-button-option
feature: scroll button option for input devices
2018-07-13 04:07:11 -07:00
Robert Kubosz
f8bc928b2d
add error handling for scroll button out of range
user will be informed if the scroll button indentifier values causes
underflow or overflow.
2018-07-13 11:39:39 +02:00
Ryan Dwyer
683a307151
Merge pull request #2255 from emersion/xwayland-floating-borders
Don't disable borders for xwayland floating views
2018-07-13 08:28:34 +10:00
Ryan Dwyer
53133fdefb
Merge branch 'master' into xwayland-floating-borders 2018-07-13 08:17:45 +10:00
Robert Kubosz
89db5b5716
expanded error detection for scroll button option
Now the scroll_button will not accept:
  - letters on string beginning;
  - negative numbers.

What is tolerated:
  - letters after number;
  - rational numbers: the fraction after dot will be omitted.
2018-07-12 23:50:34 +02:00
Drew DeVault
da8149c066
Merge pull request #2253 from Hello71/issue2249
config.c: fix current_config uninit warning (#2249)
2018-07-12 12:49:11 -07:00
Drew DeVault
447e1e6f8a
Merge pull request #2256 from emersion/xdg-positioner
Add xdg-positioner support
2018-07-12 12:46:57 -07:00
emersion
a96f1c22fe Add xdg-positioner support 2018-07-12 20:31:55 +01:00
emersion
9b16227ec3 Don't disable borders for xwayland floating views 2018-07-12 20:01:33 +01:00
Alex Xu
fbecfc2d35 config.c: fix current_config uninit warning (#2249) 2018-07-12 13:00:57 -04:00
Robert Kubosz
094edcbea2
rm constraint for max value of button identifier
updated error message to be more adequate for current contraint
2018-07-12 15:50:42 +02:00
Robert Kubosz
20d6c7c2e4
add paragraph to sway-input man page
The added paragraph describes how to get button identifier and set it in
config.
2018-07-12 15:35:14 +02:00
Robert Kubosz
08edaf4e76
increase maximum value of button identifier
and also cleanup spaces
2018-07-12 12:08:53 +02:00
Brian Ashworth
abcc2ef9eb
Merge pull request #2250 from RyanDwyer/fix-crash
Fix crash when launching swaylock
2018-07-12 01:32:35 -04:00
Ryan Dwyer
ee0e1b170e Fix crash in seat code
Container will be NULL if launching swaylock.
2018-07-12 14:43:08 +10:00
Drew DeVault
106a9eaf11
Merge pull request #2235 from emersion/wlr-surface-role
Update for swaywm/wlroots#1116
2018-07-11 15:50:04 -07:00
emersion
60fdb71a1f Updates for swaywm/wlroots#1116 2018-07-11 18:37:17 -04:00
Drew DeVault
2bc18d8cf7
Merge pull request #2248 from Dudemanguy911/fix_crash_on_floating_windows
fix crash on floating windows
2018-07-11 15:26:47 -07:00
Robert Kubosz
41b80c28df
add scroll button option
This commit introduces a scroll_button option, which is intended to be
used with scroll_method. Now user can edit his sway config and add an
scroll_button option to device section.
2018-07-11 22:03:06 +02:00
emersion
588abbb128
Merge pull request #2245 from RyanDwyer/floating-minmax-size
Implement floating_minimum_size and floating_maximum_size
2018-07-11 18:51:07 +01:00
dudemanguy
600c126150 fix crash on floating windows 2018-07-11 12:24:06 -05:00
Ryan Dwyer
f2d1cf3ceb Implement floating_minimum_size and floating_maximum_size 2018-07-11 22:16:48 +10:00
emersion
73084c5fa6
Merge pull request #2243 from RyanDwyer/use-fullscreen-saved-buffer
Use saved buffer when fullscreen view is in a transaction
2018-07-11 13:04:06 +01:00
Drew DeVault
edfe42032c
Merge pull request #2240 from RedSoxFan/implement-1961
Implement swaylock customization flags
2018-07-11 04:39:13 -07:00
Drew DeVault
00daa17446
Merge pull request #2242 from RyanDwyer/floating-zindex
Move floating windows to front when focused
2018-07-11 04:38:46 -07:00
Ryan Dwyer
3b50a2a3af Use saved buffer when fullscreen view is in a transaction
Fixes #2237.
2018-07-11 20:33:36 +10:00
Ryan Dwyer
15dc5286e2 Move floating windows to front when focused 2018-07-11 19:50:02 +10:00