Commit graph

118 commits

Author SHA1 Message Date
Mikkel Oscar Lyderik 856ac7d5cc Remove unused function 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik 5a22c0f1c0 Don't send invisble view to back 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik 5492277f0c Disable inner gaps when in tabbed/stacked mode 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik 3e1f78ab26 Add support for nested tabbed/stacked containers 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik e226b20bd8 Reapply prev layout when exiting tabbed/stacked 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik d26658fb35 Correctly determine default layout 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik 8d700fe008 Fix problems with floating windows
Makes any tabbed/stacked layout a container to separate from floating
windows which may be attached to a workspace.
2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik ec7ff769c7 Tabbed and stacked layout 2016-04-25 00:00:49 +02:00
Mikkel Oscar Lyderik f39034a55f Use correct format string for x86_64 and i686
Fix #587
2016-04-17 16:51:33 +02:00
Chang Liu 91d2a505b2 Plug two memory leaks
Plug two memory leaks introduced in the border drawing code.
2016-04-12 12:35:50 +12:00
Mikkel Oscar Lyderik cfea40dce3 Don't init desired width/height on new_view
When creating a new view, wlc usually returns an initial geometry with
size 1x1. Setting those values as desired width/height causes a problem
for some windows (QT5) because they don't request a new geometry for
instance when made floating, so the floating window becomes 1x1.

To fix this problem we can just omit setting the desired width/height on
new_view and instead let the clients request a certain size if they feel
like it. e.i. gnome-calculator.

Fix #578
2016-04-09 23:20:26 +02:00
Eric Engestrom 3e8081514d Fix spelling mistakes 2016-04-02 16:00:05 +01:00
Mikkel Oscar Lyderik 258e31ccdf Fix pointer related crash when stacked/tabbed
Fix #564
2016-03-31 16:39:42 +02:00
Mikkel Oscar Lyderik 7be476c115 Add cmds new_window and new_float
Makes it possible to set default layout style for new windows and new
floating windows.

Close #556
2016-03-31 12:42:20 +02:00
Mikkel Oscar Lyderik 5a13cb0ed1 Implement borders
The borders are implemented as a surface/buffer attached to each view
which is sent to and rendered by wlc in the view_pre_render callback.

All the drawing logic is handled in sway/border.c and all the logic for
calculating the geometry of the border/view is handled in
`update_geometry` in sway/layout.c (same place as gaps are calculated).
2016-03-30 00:47:58 +02:00
Drew DeVault b903f7f655 Implement some more on borders
Note that this segfaults ALL THE TIME in wlc code. Paging @Cloudef for
help, I'm at a loss.
2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik 2935e24cf5 Implement 'smart_gaps' feature from i3-gaps 2016-03-20 12:29:47 +01:00
Mikkel Oscar Lyderik 8ddafeeaae Fix assigning workspaces to outputs
It's possible to assign workspaces to certain outputs using the command:

    workspace <name> output <output>

However, this did not work in some cases where the workspace was
assigned before the given output was made available to sway.

This patch fixes those cases.
2016-03-04 16:44:49 +01:00
Mikkel Oscar Lyderik bad4e22f3b Make sway spawn only one bar per bar config 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik ee32bc3aef Send workspace ICP event on ws destroy/empty.
There is no 'destroy' change type in the i3 IPC so this uses `empty` to
notify about empty workspaces (which will be destroyed from sway right
after).
2016-02-25 12:59:22 +01:00
Mikkel Oscar Lyderik 016a77424a Prefer named output config over wildcard config.
This makes sure that a named output config is applied before the
general wildcard config when a new output is created. This ensures that
the config:

    output * ...
    output NAME ...

behaves the same way as:

    output NAME ...
    output * ...
2016-02-12 13:45:47 +01:00
Mikkel Oscar Lyderik fa0526f3df Fix rendering of view when moving to new workspace
This is a possible fix for #384.

To be honest I don't fully understand why this bug is happening, but I
have narrowed it down to the view stack in wlc and how sway orders views
in very specific situations (those described in #384).

Anyway this should fix the problem by eliminating the call to
`wlc_view_bring_to_front` which isn't really needed anyway since sending
all invisible views to the back is the same as bringing all visible
views to the front (rotating the view stack).
2016-01-21 22:28:26 +01:00
Mikkel Oscar Lyderik 364e37a1eb Fix whitespace issues. 2016-01-05 23:42:40 +01:00
Mikkel Oscar Lyderik 16b8c2e915 Handle SIGTERM sent to sway
This makes sway handle and gracefully shut down everything when
receiving a SIGTERM.

Fix #416
2015-12-29 13:03:53 +01:00
S. Christoffer Eliesen ce54b4ff2e container: Fix inner gaps against screen edge. 2015-12-20 21:23:20 +01:00
Mikkel Oscar Lyderik 90ff36cab8 Terminate children when freeing output container 2015-12-18 18:27:54 +01:00
Mikkel Oscar Lyderik ede27eabc5 Reload swaybar/swaybg on config reload.
This works by tracking the pids of the child processes in the related
output container and terminating the processes and spawning new ones on
a config reload.

Should solve: #347
2015-12-18 18:27:44 +01:00
progandy 76c520a04b sway: insert numbered workspaces in order
fixes #308

Ordered by number ascending, with insert before same numbers.
Workspaces without numbers are appended at the end of the list.

Example order:
1 2:named 3:the_second 3:the_first 9 FIRST_NAME SECOND_NAME ...
2015-12-18 01:22:07 +01:00
Drew DeVault f6da4dda4b Bring unmanaged windows to front on output arrange
Fixes #312
2015-12-16 19:20:34 -05:00
Kevin Hamacher d77d03ce84 Make destroy_workspace behave as expected 2015-12-13 18:19:24 +01:00
Christoph Gysin bf5244b49c Fix using last output config if none matched 2015-12-02 23:05:04 +02:00
Drew DeVault 1661edee28 Allow output config for output named *
Which will match any output.
2015-11-28 10:18:37 -05:00
S. Christoffer Eliesen 2d0f78c0d6 workspace: Learn sticky.
A floating window that's sticky will move to the new active workspace
whenever the workspace on the same output changes.
2015-11-27 17:58:10 +01:00
S. Christoffer Eliesen 4367e6d3e3 container: Store app_id attribute for views. 2015-11-24 16:00:41 +01:00
S. Christoffer Eliesen 47c313fe3e container: Store class attribute for views. 2015-11-24 16:00:41 +01:00
Drew DeVault 95442dac8d We wlc_point now
cc @Cloudef
2015-11-14 11:30:29 -05:00
S. Christoffer Eliesen 5ba47d4a44 input_state: Remove mouse_origin (x&y). Query wlc instead. 2015-10-29 18:02:02 +01:00
S. Christoffer Eliesen 865b30f138 container: Move container_under_pointer here from handlers. 2015-10-29 16:37:19 +01:00
S. Christoffer Eliesen ca862a5bd4 config: Apply output config also during config reload. 2015-10-21 23:24:06 +02:00
S. Christoffer Eliesen 6eb8da0e14 commands,container: Tweak debug output to better reflect reality. 2015-10-21 22:22:01 +02:00
taiyu 0d51f62224 merge + no c_extensions 2015-09-18 07:23:04 -07:00
taiyu d2e2b04bfd minor fix 2015-09-18 06:52:04 -07:00
Drew DeVault 318e1be240 Fix warnings introduced by prior commit 2015-09-18 07:27:35 -04:00
Drew DeVault e505abfe75 Revert "new_workspace null behavior + testmap functions + regex"
This reverts commit e1d18e42a8.

Fixes #180

cc @taiyu-len
2015-09-13 19:46:16 -04:00
taiyu e1d18e42a8 new_workspace null behavior + testmap functions + regex 2015-09-12 02:38:03 -07:00
taiyu f25c6b312b gap resize 2015-09-05 20:48:52 -07:00
taiyu dbeca88dee default gap value 2015-09-04 16:14:59 -07:00
taiyu 09c9ee76c3 properly remove children in loops 2015-08-31 08:49:24 -07:00
taiyu 4757ea6a12 forgot visibility of floating containers 2015-08-27 23:42:26 -07:00
taiyu 5678d824e4 update visibility + container info functions 2015-08-27 23:18:28 -07:00