Drew DeVault
4cba91803e
Revert "Fixes dealing with workspace_layout and related bugs [rfc]"
2016-10-12 21:26:06 -04:00
Drew DeVault
f30f60dad8
Revert "also check floating cons in container_find"
2016-10-12 12:19:02 -04:00
Drew DeVault
ce713efcd2
Merge pull request #945 from thejan2009/workspace_layout
...
Fixes dealing with workspace_layout and related bugs [rfc]
2016-10-11 08:24:38 -04:00
D.B
166c2a3687
generalize wrapping views under workspaces
2016-10-11 09:16:59 +02:00
D.B
571321a1d8
add workspace_layout, ensure ws is always L_HORIZ
...
Add swayc_change_layout function, which changes either layout or
workspace_layout, depending on the container type. Workspace being
always L_HORIZ makes this much more i3-compatible.
2016-10-11 09:16:59 +02:00
D.B
0ddc4279d1
wrap workspace's child into a container if needed
...
If workspace has stacked/tabbed layout, its direct children should be
wrapped into a container which enables them to draw the titlebar.
2016-10-11 09:15:48 +02:00
D.B
24c3b86065
also check floating cons in container_find
2016-10-11 06:22:54 +02:00
Nicolas Cornu
5384d3effe
Can't move an empty workspace
2016-10-11 01:51:55 +02:00
Drew DeVault
8d277bc962
Merge pull request #942 from thejan2009/bugfix-931
...
fix for_window [] move scratchpad
2016-10-08 09:45:21 -04:00
Drew DeVault
0fc03f9c13
Merge pull request #941 from thejan2009/floating-border
...
Fix border color for floating containers
2016-10-08 09:45:06 -04:00
D.B
8264fedce6
fix for_window [] move scratchpad
...
- move wlc_view_set_mask before applying window criteria
- check parent_container because container in scratchpad doesn't have a
parent
2016-10-08 12:37:28 +02:00
D.B
746345e3b8
reorder cmd_handler arrays for bsearch
2016-10-08 11:12:45 +02:00
D.B
77f99480ae
draw indicator border only for non-floating
2016-10-08 09:15:34 +02:00
Nicolas Cornu
382d47e238
Fix creating of sibling floating/children
...
If we want to add a sibling of different type than current
container it failed. Because we add it to the wrong list
2016-10-07 22:29:56 +02:00
Nicolas Cornu
2d82586c88
Add constant scale factor in get_text_size
...
af44154
forget one "get_text_size" made it possible to
do a format string by setting title bar.
2016-10-07 20:38:56 +02:00
D.B
379b1a0378
add focus changing between floating containers
...
It will also wrap if needed.
2016-10-07 09:37:09 +02:00
D.B
d3f5ac8cbb
add force_focus_wrapping option
2016-10-07 08:12:14 +02:00
D.B
7f558ce894
wrap container in direction (if possible)
...
Introduces container wrapping - if there is no other viable move, the
selection wraps on the first container where such action is possible.
2016-10-07 08:12:14 +02:00
Nicolas Cornu
6ced4098dc
fix for click on title_bar
...
- Check null pointer for swayc_parent_by_type
- Split lines to follow coding style
2016-10-06 21:17:45 +02:00
Nicolas Cornu
37065cd0c4
add click on title_bar to focus a container
2016-10-06 20:23:46 +02:00
Drew DeVault
d2aba3ce3a
Merge pull request #924 from zandrmartin/fix-focus-segfault
...
prevent dereference of freed workspace
2016-10-03 08:10:29 -04:00
Zandr Martin
ba581c4442
consolidate nodes json
2016-10-02 22:21:16 -05:00
Zandr Martin
09a44263c3
Merge branch 'master' into fix-focus-segfault
2016-10-02 22:13:40 -05:00
Zandr Martin
4c0e809028
prevent dereference of freed workspace
2016-10-02 22:03:52 -05:00
Patrick Sauter
153620aefe
moved ipc_init above config file processing.
...
This is necessary because commands in the config file (mode for
instance) emit ipc events, and if ipc_init has not been called the
ipc_clients_list is not initialized, and we segfault. This fixes that
bug.
2016-10-02 17:29:40 -05:00
Zandr Martin
58ac1f7f24
fix pointer format string in sway_log() call
2016-10-01 06:40:16 -05:00
Drew DeVault
4e660975a9
Merge pull request #911 from thejan2009/setgid-setuid
...
Split setgid and setuid, add privilege check [RFC]
2016-09-27 14:28:14 -04:00
Drew DeVault
a95ce5ce65
Merge pull request #914 from zandrmartin/container-ids
...
add unique IDs to containers
2016-09-27 14:27:29 -04:00
Ryan Dwyer
64d463142f
Implement default name for workspace command
...
This implements commands such as:
workspace number 9: test
If a workspace with the given number exists then it will be focused,
otherwise a new workspace with the given name will be created.
2016-09-25 21:42:28 +10:00
Zandr Martin
7d947fdb95
add unique IDs to containers
2016-09-21 21:05:09 -05:00
D.B
5e585f9603
Split setgid and setuid, add privilege check
...
This commit deals with issue #884 . I consulted the following sources:
https://www.securecoding.cert.org/confluence/display/c/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
and
https://www.securecoding.cert.org/confluence/display/c/POS37-C.+Ensure+that+privilege+relinquishment+is+successful
2016-09-20 16:25:32 +02:00
Zandr Martin
0516dba3f6
implement "focused container" feature for swaygrab
2016-09-18 16:41:08 -05:00
Zandr Martin
e75217cfb1
fix get_workspaces json reply
2016-09-17 22:00:11 -05:00
Zandr Martin
87080bb9cc
take four!
2016-09-17 16:36:55 -05:00
Zandr Martin
e18b7cdfa9
add global current_focus
pointer
2016-09-17 15:54:45 -05:00
Ryan Dwyer
e4cb4d1b5c
Fix swaybar when running on named outputs.
...
When using a bar on a named output, load_swaybars() requires the
output to be active (ie. in the root container), but this is not the case if
the bar is added to the last output. To fix this, load_swaybars() is now
called after the output has been added to the root container.
After fixing that, swaybar would segfault due to using the wrong index
variable when loading outputs and config.
2016-09-17 17:25:45 +10:00
Zandr Martin
64f61873a9
document workspace_auto_back_and_forth
command
2016-09-16 21:53:46 -05:00
D.B
873dfc07f3
Use indicator border color only when needed.
...
Indicator border color is now used only when a container is the only
child. Reason for the change? i3 does it this way. Sway container
borders are now a bit more similar to i3 ones.
2016-09-10 16:11:33 +02:00
Zandr Martin
511eed90cd
squash commits, move enum into resize.c
2016-09-07 06:48:41 -05:00
Mikkel Oscar Lyderik
84d504ebdf
Make it possible to move views between outputs
...
This patch makes it possible to move views between outputs using the
`move left|right|up|down` commands.
It behaves similar to i3 with one important difference. The focus will
always follow the view being moved, unlike i3 where the focus doesn't
always follow the view to a new output (I assume that's a bug in i3).
2016-09-05 12:14:23 -04:00
Drew DeVault
af44154119
Fix constant scale factor in font code
2016-09-05 11:52:52 -04:00
Drew DeVault
0913eff915
Add support for * input configs
...
Closes #852
2016-09-05 10:18:38 -04:00
Zandr Martin
65ace5dec5
merge in latest commits
2016-09-02 14:11:48 -05:00
Zandr Martin
79ffea328c
Merge branch 'master' of git://github.com/SirCmpwn/sway into commands-refactor
2016-09-02 13:46:19 -05:00
Zandr Martin
b374c35758
refactor commands.c
2016-09-01 21:39:08 -05:00
Lukas Lihotzki
6addaca9fa
Correct hide_edge_borders
command
...
`vertical` and `horizontal` should be swapped.
If border_left and border_right were set to 0, the vertical borders
instead of the horizontal borders would be hidden.
i3 handles this command equally.
2016-09-02 01:16:03 +02:00
Drew DeVault
38ca94e0ed
Tweak how swaylock surfaces are handled
...
Fixes #875
2016-09-01 08:34:52 -04:00
Drew DeVault
416417a54c
Reorganize includes
2016-09-01 08:18:37 -04:00
Zandr Martin
a9c0993218
document orientation
command
2016-08-31 21:07:20 -05:00
Hummer12007
db1c105e77
Fix a format string
2016-08-22 18:56:49 +03:00
James Murphy
8af49eb696
Avoid dereferencing null configuration
...
Fixes: https://github.com/SirCmpwn/sway/issues/865
2016-08-20 16:24:08 +00:00
Götz Christ
aecd33d25d
Add input example section to config
...
Also improve sway-input(5) description to be more consistent with sway-bar(5).
2016-08-18 18:00:58 -05:00
Guillaume Brogi
7bbf7e15a0
Update man page
...
The man page mentioned that "indicator" wasn't implemented, this isn't
the case anymore.
2016-08-12 00:13:48 +02:00
Guillaume Brogi
6173c84117
Rerender after every split command
2016-08-12 00:12:56 +02:00
Guillaume Brogi
fc492a4da8
Add support for indicator color
2016-08-11 23:57:38 +02:00
D.B
ce98569fbc
Handle output disabling during runtime
...
Output now gets disabled if disable command is invoked via bindsym or
IPC.
2016-08-10 18:52:49 +02:00
Manuel Mendez
631ba506d6
document all xkb settings handled by wlc
2016-08-09 10:41:06 -04:00
Drew DeVault
b8642ce681
Merge pull request #843 from thejan2009/bug/move-container-819
...
Fix container move when workspace is focused
2016-08-07 12:04:08 -04:00
D.B
41b5c6d1a9
Sort workspaces when moving workspace to output
...
This should fix #839
2016-08-07 17:32:18 +02:00
D.B
61781bbef0
Fix container move when workspace is focused
...
Fixes #819 . If workspace is focused and command 'move container to
workspace/output' is issued, workspace child containers are wrapped in a
new container and moved according to command.
2016-08-07 17:07:30 +02:00
D.B
9c91952aec
Display class in tab title if app_id is null
...
This is a feature that can't work the same as i3, because there is no
real window classes in wayland. This way, we avoid null titles as much
as possible.
2016-08-07 08:37:26 +02:00
Drew DeVault
aca9f6b2a2
Merge pull request #840 from minus7/man-inputs
...
added get_inputs hint to man 5 sway-input
2016-08-05 13:58:14 -04:00
minus
2f50be3d88
added get_inputs hint to man 5 sway-input
2016-08-05 19:55:00 +02:00
D.B
aa292db8d1
Fix switch to prev ws on handle_view_created
...
Switching back to original workspace should be done only if workspace
was switched while appending new view.
2016-08-05 10:43:54 +02:00
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.
2016-08-04 21:48:20 -04:00
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.
2016-08-04 21:26:39 -04:00
Tony Crisci
50901a0892
ipc: always include nodes in views
...
This is for i3 (and i3ipc library) compatability.
2016-08-04 21:19:52 -04:00
Mykyta Holubakha
e1b1d94a4e
Arrange windows after swapping containers
...
Fixes #833
2016-08-05 02:07:03 +03:00
D.B
132017d242
Fix 'workspace back_and_forth' and workspace_auto_back_and_forth clash
...
When workspace_auto_back_and_forth is enabled, workspaces get switched
twice with previously mentioned command, which is not the expected
behavior.
Removes one redundant creation of previous workspace.
2016-08-04 21:31:46 +02:00
Tony Crisci
81eb9ea12c
Simplify focus setting
...
Merge the main rendering paths of all containers to make focus setting a bit
simpler and easier to follow.
2016-08-03 23:24:53 -04:00
Tony Crisci
c98e91f01f
Use uintptr_t for ipc container id
...
This is for compatability with i3.
2016-08-03 20:34:47 -04:00
minus
b246799548
fixed uninitialized bar.wrap_scroll
2016-08-02 22:02:39 +02:00
Zandr Martin
9fa92951fe
remove unmanaged nodes from get_tree
2016-08-02 13:24:21 -05:00
Drew DeVault
31ce010861
Fix segfault in border.c
2016-08-02 07:35:25 -04:00
Tony Crisci
4344fe5011
bugfix: focus container on output when focused
...
Focus the container on the output (not the output itself) when an output is
focused.
This is intended to fix a bug where borders are not updated correctly when
switching the vt away/back to sway.
2016-08-01 23:56:34 -04:00
Tony Crisci
2f65100bee
Remove dead global locked_view_focus
...
The value of `locked_view_focus` is always false. Remove dead code associated
with this variable to simplify things.
2016-08-01 22:25:08 -04:00
Drew DeVault
2d907ef1f6
Merge pull request #811 from acrisci/feature/focus-container
...
Implement focus handling for containers
2016-08-01 07:27:12 -04:00
Zandr Martin
b18c169036
cache floating container size when fullscreening
2016-07-31 21:45:27 -05:00
Tony Crisci
fe608c80ae
Update view border when workspace is focused
...
When a workspace is focused, update the borders of all its child containers to
be focused to indicate the workspace container is focused.
2016-07-31 21:42:51 -04:00
Tony Crisci
d731d6a846
Bugfix: descend focus stack on new window focus
...
When switching back to a workspace after new window creation, it is now
necessary to descend the focus stack into the focused container of the
workspace to determine which container should get the focus. This is because
the `set_focused_container()` function no longer automatically descends into
the focus stack to find the correct view to focus.
2016-07-31 21:25:40 -04:00
Tony Crisci
b39249508f
Refactor functions to update container borders
...
Replace `update_view_border()` with `update_container_border()`. The latter
should handle both the case where the container is a view or if the container
has children.
2016-07-31 20:32:40 -04:00
Tony Crisci
f78d07d39b
Implement focus handling for containers
...
The previous implementation of focus handling assumed that only views can be
focused. Containers can also be focused with a command like `focus parent` or
`focus child`.
Change `set_focused_container()` to handle the case of the given container
being a container with children and update borders accordingly.
2016-07-31 18:10:33 -04:00
Zandr Martin
53f6b1f3b0
document kill
command
2016-07-31 08:54:15 -05:00
D.B
9977b01928
Update container geometry on layout switch
...
Deeply nested containers which had their layouts changed didn't update
their actual_geometry, this messed up their child containers. Those got
width and height of 0, which was then decreased for stacked/tabbed
containers by title height. Underflow ensued, these containers suddenly
had height 4294967273. In short, not updating actual_geometry didn't
play nicely with nested containers.
2016-07-31 10:22:18 +02:00
Zandr Martin
98aa59fdda
implement solid color rendering for swaybg
2016-07-30 18:50:13 -05:00
Zandr Martin
e6af5f8bdb
Merge branch 'master' of git://github.com/SirCmpwn/sway into x11-pids
2016-07-30 08:44:21 -05:00
D.B
c33e0ee629
revert border hiding to more recent version
2016-07-30 15:22:53 +02:00
D.B
8d0048c8d5
properly hide top border inside tabbed/stacked
...
When titlebar is hidden, top border of the topmost view inside
tabbed/stacked container will not be drawn. This is changed in layout.c
On the other hand, top border should be drawn sometimes, for example
when titlebar is hidden on a view that is not the topmost inside
tabbed/stacked container. This is changed in border.c
2016-07-30 15:12:34 +02:00
Zandr Martin
c0683a0444
remove outdated (when wlc commit merged) comment
2016-07-29 20:20:14 -05:00
Zandr Martin
d0a0d5e03c
update handler to get pid from wlc for all views
2016-07-29 16:40:38 -05:00
Drew DeVault
3f83968d30
Fix swaybg sizing on hidpi outputs
2016-07-29 09:14:26 -04:00
Drew DeVault
9b24af1c22
Document scale factor configuration in sway(5)
2016-07-29 08:00:23 -04:00
Drew DeVault
9661272224
Merge remote-tracking branch 'origin/hidpi'
2016-07-29 07:35:43 -04:00
Zandr Martin
a3980d456d
third try for #678
2016-07-28 17:43:43 -05:00
Drew DeVault
cad085ed9d
Update IPC JSON responses for HiDPI setups
2016-07-28 14:42:39 -04:00
Drew DeVault
11e7ca044c
Update hidpi support to latest wlc API
2016-07-28 14:36:49 -04:00
Drew DeVault
6ea02f3064
Initial pass on HiDPI support
2016-07-28 14:36:49 -04:00
Mykyta Holubakha
cf8ef2aea2
Initialize client's subscribed events
2016-07-28 13:38:02 +00:00
Drew DeVault
d07eaed79f
Merge pull request #793 from thejan2009/workspace_layout_first_window_fix
...
bugfix: invisible windows on empty workspace with tabbed/stacked layout
2016-07-28 07:42:43 -04:00
Drew DeVault
ee67c5bee3
Merge pull request #791 from acrisci/feature/focus-child
...
Implement `focus child` command
2016-07-28 07:26:37 -04:00