Commit Graph

843 Commits

Author SHA1 Message Date
Mykyta Holubakha a25c35f859 Passing missing argument to get_text_size 2016-04-24 10:39:42 +03:00
Drew DeVault 84fae94ab9 Flesh out pango markup implementation 2016-04-17 11:36:03 -04:00
Mikkel Oscar Lyderik f39034a55f Use correct format string for x86_64 and i686
Fix #587
2016-04-17 16:51:33 +02:00
Mikkel Oscar Lyderik 60731ffba1 Remove clang warnings (-Wsign-compare) 2016-04-16 20:06:50 +02:00
Drew DeVault 54c635ca16 Update to wlc 0.0.2 2016-04-16 10:22:50 -04: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
Mikkel Oscar Lyderik a7f26939c2 Only update geometry of single floating view 2016-04-09 22:51:41 +02:00
Kevin Hamacher b6e2b6add9 Add border color commands 2016-04-03 17:14:14 +02:00
Kevin Hamacher 115b482ed8 Use border background color as border background 2016-04-03 16:52:40 +02:00
crondog b02be709cd Fix window borders
This fixes floating borders when moving outside of the output. Not sure what
happens with dual screen as I only have 1 monitor
2016-04-03 10:37:16 +10:00
Kevin Hamacher 3953b064f5 improve endianess handeling 2016-04-02 21:16:57 +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 66e8b4d5de Correctly reset border geometry 2016-03-31 13:51:27 +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 63474aa04d Make pango: optional for bar font 2016-03-30 16:38:04 +02:00
Drew DeVault 655b003062 Fix pointer scroll thing 2016-03-30 09:24:51 -04:00
Drew DeVault ebead7a9bf Fix crashes with borders 2016-03-30 09:21:30 -04:00
Drew DeVault a4bf09f142 Remove leftover comment 2016-03-30 08:36:25 -04:00
Drew DeVault a12850444d New feature: adjust gaps with floating_mod+scroll
I made this configurable but I didn't make the command for it. That's
left as an exercise to an eager contributor.

    mod_scroll_behavior [gaps inner|gaps outer]

Would merge implementions of more behaviors for mod+scroll, if anyone
has some neato ideas.
2016-03-30 08:34:32 -04:00
Drew DeVault 4bf10d7771 Merge pull request #551 from mikkeloscar/window-borders
Implement Window borders
2016-03-30 07:41:13 -04:00
Mikkel Oscar Lyderik 948c594132 Allow surrounding spaces in mode name
This makes it possible to define a mode name with surrounding spaces if
so desired. e.g.:

    mode "   hello   " {  }
2016-03-30 12:58:50 +02:00
Mikkel Oscar Lyderik 0af55539a8 Fix borders with floating windows 2016-03-30 10:09:08 +02:00
Mikkel Oscar Lyderik 6fa6c27f3d Update window title when it changes 2016-03-30 01:01:05 +02:00
Mikkel Oscar Lyderik 7878de5ccc Mark focused view focus_inactive on unfocused output 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik a87a5dbdd5 Comment endianness 2016-03-30 00:47:58 +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
Mikkel Oscar Lyderik 3b05f92f76 Add border <none|normal|toggle|pixel> config 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik 86ea79ea6d Implement parsing of hide_edge_borders 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik da567317ab Make pango: prefix optional for font config 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik e2774aee3c Add default border colors 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
Drew DeVault a8e084433d Window borders proof of concept 2016-03-30 00:47:58 +02:00
Drew DeVault 4611bba3db Initial setup of window border rendering
Please don't complain to me about the performance of this
2016-03-30 00:47:58 +02:00
Drew DeVault eacf3d0396 Loosen restrictions on commands, update docs
Closes #531
2016-03-27 12:41:42 -04:00
Drew DeVault 59a1c5c28c Update sway(1) 2016-03-27 12:24:06 -04:00
Mikkel Oscar Lyderik cdc73fd95e Don't try to read config if not a file. 2016-03-26 17:54:50 +01:00
Mikkel Oscar Lyderik 44ea92ea60 Add config path to error msg 2016-03-26 16:50:47 +01:00
Mikkel Oscar Lyderik b5f34cc27d Load correct config on reload 2016-03-26 16:37:56 +01:00
Mikkel Oscar Lyderik 39df452dc1 Document include command 2016-03-26 16:37:56 +01:00
Mikkel Oscar Lyderik 71a5350b68 Implement include command
The include command (`include <path>`) makes it possible to include sub
config files from the main config file (or from within other sub config
files).

The include command uses the following rules for including config files:

* the `path` can be either a full path or a path that is relative to the
  parent config. Shell expansion is supported, so it's possible to do
  `include ~/.config/sway.d/*`.
* The same config file can only be included once (to prevent include
  cycles). If a config is included multiple times it will just be
  ignored after it has been included once.
* Including a sub config file is the same as inserting the content of
  that file into the parent config, thus rules about overwriting
  bindsyms etc. works the same as for a single config.

Implement #542
2016-03-26 16:37:50 +01:00
Mikkel Oscar Lyderik 938ff29b7b Gracefully exit when config is not found
This makes sure that sway will gracefully exit if the config is not
found or sway is unable to read it.
2016-03-24 22:20:25 +01:00
Drew DeVault 06107bb44e Make the nvidia warning louder 2016-03-24 16:48:53 -04:00
Drew DeVault fd061d4dc4 Don't set WLC_DIM on startup 2016-03-24 14:09:18 -04:00
Drew DeVault 5c85c018b4 Update to new WLC API 2016-03-24 14:08:53 -04:00
Drew DeVault ca400e84f5 Merge pull request #525 from mikkeloscar/fix-clang-warning
Use correct type for keycode
2016-03-20 07:46:06 -04:00
Mikkel Oscar Lyderik c1f91c4f5e Use correct type for keycode 2016-03-20 12:41:26 +01:00
Mikkel Oscar Lyderik 2935e24cf5 Implement 'smart_gaps' feature from i3-gaps 2016-03-20 12:29:47 +01:00
Mikkel Oscar Lyderik bb32cba795 Make key handling less strict
Sway has been very strict when it comes to key handling. Only on an
exact match would a bindsym be triggered.

This patch makes it less strict by for instance allowing the key combo
`$mod+1+2` to act as `$mod+2` if 2 was the last pressed key and `$mod+1`
if 1 was the last pressed key.

The new key handling uses the following algorithm:

1. List of bindings sorted by number of keys in binding (already the
default)
2. Find all bindings covered by the current keyboard state and list them
by same order as in 1.
3. Select the first binding from the list where the last pressed key is
part of the binding.

Addresses #452
2016-03-19 14:06:46 +01:00