Commit graph

290 commits

Author SHA1 Message Date
Drew DeVault
db3a363734 Revert "config: free include path on successful load"
This reverts commit 92450883d7.
2018-07-16 21:02:13 -04:00
Ian Fan
92450883d7 config: free include path on successful load 2018-07-15 21:48:39 +01:00
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
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
Alex Xu
fbecfc2d35 config.c: fix current_config uninit warning (#2249) 2018-07-12 13:00:57 -04:00
Ian Fan
23c1c26c3f Add get_config message type to ipc 2018-07-10 12:37:37 +01:00
emersion
63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
Dominique Martinet
9f5d539657 config: add a couple of forgotten frees 2018-07-05 08:13:10 +09:00
Dominique Martinet
4eeca10a8a load_config: move NULL path check before first use
Found through static analysis
2018-07-02 08:03:41 +09:00
Dominique Martinet
8c526bbb03 config include: fix leak on relative include path
Found through static analysis
2018-07-02 08:03:41 +09:00
Dominique Martinet
0c6149171b read_config: fix leak on error
Found through static analysis.
2018-07-02 08:03:41 +09:00
Ryan Dwyer
bb66e6d578 Refactor everything that needs to arrange windows
* The arrange_foo functions are now replaced with arrange_and_commit, or
with manually created transactions and arrange_windows x2.
* The arrange functions are now only called from the highest level
functions rather than from both high level and low level functions.
* Due to the previous point, view_set_fullscreen_raw and
view_set_fullscreen are both merged into one function again.
* Floating and fullscreen are now working with transactions.
2018-06-09 10:11:25 +10:00
Brian Ashworth
212e4ef395 Remove strip quoting and fix strncpy-overlap 2018-06-07 20:37:08 -04:00
Brian Ashworth
f4870d5432 Fix logic issue in do_var_replacement 2018-06-05 10:08:00 -04:00
Brian Ashworth
067fe9d047 Support runtime var expansion and set at runtime 2018-06-05 10:08:00 -04:00
Dominique Martinet
71ab13f1eb sway/config: fix use-after-free for end of block
Introduced in 7c810dc344
2018-06-03 00:31:51 +09:00
Brian Ashworth
8bfa2def88 Address first round of review for generic blocks 2018-06-02 08:07:44 -04:00
Brian Ashworth
51bb9d8573 Support braces on next line for config blocks 2018-06-02 08:07:44 -04:00
Brian Ashworth
7c810dc344 Make command block implementation generic 2018-06-02 08:07:44 -04:00
Ryan Dwyer
00cac22038 Fix crash when using multiple outputs 2018-06-01 23:14:58 +10:00
Ryan Dwyer
c9f8d35ca9 Consider floating views when calculating title height 2018-06-01 23:14:58 +10:00
Brian Ashworth
46da1dc32b Implement focus_wrapping 2018-05-27 23:20:21 -04:00
Mattias Eriksson
8fbafbfab5 Idle handling for dpms/lockscreen et al
Swayidle handles idle events and allows
for dpms and lockscreen handling. It also
handles systemd sleep events, and can
raise a lockscreen on sleep

Fixes #541
2018-05-13 00:30:09 +02:00
Ryan Dwyer
497793b5b7 Use reasonable default for font height
Fixes #1949
2018-05-10 21:24:00 +10:00
Ryan Dwyer
5d6d24e71a Move code for re-arranging after font height change into a common place 2018-05-05 22:29:37 +10:00
Drew DeVault
85396b90fb Fix unfocused.text default 2018-05-03 08:22:16 -04:00
Drew DeVault
58a033d816 Convert border_colors.text to float[4] 2018-05-03 08:14:17 -04:00
Ryan Dwyer
55b307cddf Calculate config->font_height based on existing container titles 2018-05-03 15:12:00 +10:00
Ryan Dwyer
b667298a0a Render titles 2018-05-03 15:12:00 +10:00
Ryan Dwyer
cb07434913 Remove unnecessary pointers 2018-05-01 22:48:57 +10:00
Ryan Dwyer
e67f354333 Implement borders
Implements rendering of borders. Title text is still to do.

Implements the following configuration directives:

* client.focused
* client.focused_inactive
* client.unfocused
* client.urgent
* border
* default_border
2018-04-30 21:24:13 +10:00
Tony Crisci
e677c5b204 rename seat functions 2018-04-02 08:45:37 -04:00
Drew DeVault
9b38ef950f Implement focus_follows_mouse
Also contains two other small changes:

- Clicking any button will focus the container clicked (not just left)
- Remove seamless_mouse (doesn't make sense on wlroots)
2018-03-31 13:05:45 -04:00
Drew DeVault
18173fb5ad Free bar configs on reload and exit 2018-03-31 00:35:06 -04:00
Drew DeVault
f26ecd9f58 Merge remote-tracking branch 'origin/wlroots' into swaybar-layers 2018-03-30 00:04:04 -04:00
Tony Crisci
dc8c9fbeb6 Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
This reverts commit 472e81f35d, reversing
changes made to 6b7841b11f.
2018-03-29 23:41:33 -04:00
Drew DeVault
d0c7f66e95
Revert "Refactor tree" 2018-03-29 23:29:29 -04:00
Drew DeVault
569b2bfd5d Move bar config into its own file 2018-03-29 22:11:08 -04:00
Drew DeVault
bf7a4cd0eb Add bar configuration commands 2018-03-29 22:11:08 -04:00
Drew DeVault
6836074fed Implement enough IPC for swaybar to work 2018-03-29 22:11:08 -04:00
Tony Crisci
874f009866 move tree includes to their own directory 2018-03-29 14:21:42 -04:00
Drew DeVault
b28602aa74 Implement workspaces 2018-01-30 23:09:21 -05:00
Dominique Martinet
6259831d31 commands/reload: remove unimplemented 'load_swaybars' call 2018-01-22 07:26:40 +01:00
Dominique Martinet
5766f426aa config reload: destroy old seat when removed from config
This adds new sway_seat_destroy and sway_cursor_destroy helpers
and compare new and old config on free
2018-01-22 07:26:37 +01:00
Dominique Martinet
869be4378d commands: add 'reload' command 2018-01-22 07:25:23 +01:00
emersion
0c58673c6a
Merge pull request #1574 from acrisci/config-refactor
Command criteria
2018-01-22 01:16:23 +01:00
Tony Crisci
cc3c713889 seat config handler context 2018-01-20 11:44:34 -05:00
Tony Crisci
9e0595f26b input config handler context 2018-01-20 11:34:57 -05:00
Tony Crisci
9f54cd8935 copy config references for input and seat 2018-01-17 09:49:02 -05:00