Commit Graph

4957 Commits

Author SHA1 Message Date
Drew DeVault 7f2e6d812a Document `border csd` 2018-10-14 10:23:40 -04:00
Drew DeVault 4a05fbf8ab
Merge pull request #2751 from ianyfan/swaybar
Bar mode/hidden_state events
2018-10-14 15:13:50 +02:00
Ian Fan 85dd36e92b swaybar: add documentation for hide/hidden_state subcommands 2018-10-14 13:33:12 +01:00
Ian Fan 4dba7c084a swaybar: when hiding bar, save old height to be restored upon reshow
Previously, when the bar was hidden, the height would be set to 0.
This meant that if the bar was empty upon reshow, it would not render
since the height was still 0, which made it seem there was a problem.
Now, the height is not reset, but the width is, to indicate upon reshow
that the layer surface needed reconfiguring.
2018-10-14 13:33:12 +01:00
Ian Fan a29ee77411 swaybar: send signal to status when hiding or showing bar 2018-10-14 13:33:12 +01:00
Ian Fan f6f72cb949 swaybar: show hidden bar on urgency 2018-10-14 13:33:12 +01:00
Ian Fan 2f1fd80726 swaybar: show hidden bar on key event
Since wayland does not currently allow swaybar to create global
keybinds, this is handled within sway and sent to the bar using a custom
event, so as not to pollute existing events, called bar_state_update.
2018-10-14 13:33:12 +01:00
Ian Fan bcc61e5147 swaybar: handle mode/hidden_state changes
As well as adding the hidden_state property to the bar config struct,
this commit handles barconfig_update events when the mode or
hidden_state changes, and uses a new function determine_bar_visibility
to hide or show the bar as required, using, respectively,
destroy_layer_surface, which is also newly added, and add_layer_surface,
which has been changed to allow dynamically adding the surface.
2018-10-14 13:33:12 +01:00
Ian Fan 55ca16f2d8 swaybar: streamline ipc handling
The received json is handled outside of the case statement, which will
allow better extensibility.
This commit also introduces the variable bar_is_dirty, the return value
signifying whether the bar requires rendering.
2018-10-14 13:33:12 +01:00
Ian Fan fed11d1c7b swaybar: move mode & mode_pango_markup to bar struct
This distinguishes the binding mode from the distinct config mode, as
well as removing mode_pango_markup from the config struct where it
should not be present.
2018-10-14 13:33:12 +01:00
Ian Fan a388ffa127 swaybar: only send initial workspace request if workspace buttons are enabled 2018-10-14 13:33:12 +01:00
Ian Fan 19f0bf3864 swaybar: add free_hotspots helper function 2018-10-14 13:33:12 +01:00
Ian Fan a67fa8a05d swaybar: only subscribe to required events
This adds barconfig_update to the list of subscribed events, as well as
checking when the other events need to be subscribed to.
2018-10-14 13:33:12 +01:00
Ian Fan 18eaf45224 swaybar: annotate wl_list properties in definitions 2018-10-14 13:33:12 +01:00
Ian Fan d0b54e932b swaybar: save id upon startup
This adds an id property to the bar, which will be used to filter
barconfig_update events
2018-10-14 13:33:12 +01:00
Ian Fan 1f90f92f45 commands: fix sending bar mode/hidden_state updates to all bars
Previously, if a change was sent to all bars, it would only actually
change the first bar it encountered, due to return value handling
2018-10-14 13:33:12 +01:00
Drew DeVault abde9d6627
Merge pull request #2808 from RedSoxFan/bar-subcommands
Fix bar subcommand handler structs and selection
2018-10-14 14:30:52 +02:00
Drew DeVault dbb169bf15
Merge pull request #2829 from espkk/master
Fix clear_password_buffer
2018-10-14 14:30:06 +02:00
espkk 42f72f8bb4 swaylock: fix clear_password_buffer 2018-10-14 07:40:33 +03:00
Drew DeVault 71aaa7e130 Remove unnecessary comment 2018-10-13 20:51:29 -04:00
Brian Ashworth 350f7d3460
Merge pull request #2823 from tarmack/fix_edge_gaps
Fix edge gaps
2018-10-13 18:49:31 -04:00
Brian Ashworth 02aeb0f0be
Merge branch 'master' into fix_edge_gaps 2018-10-13 18:08:23 -04:00
Brian Ashworth 2a0c7ebd43 cmd_bar: simplify logic 2018-10-13 17:56:11 -04:00
Brian Ashworth 84b28dc593 cmd_bar: fix bar id issues
Allows bar-subcommand to be a valid bar-ids
Destroys runtime created bar if trying to use a config only subcommand
Allow subcommands (except for id) to be ids
2018-10-13 17:55:49 -04:00
Tarmack 36d9037f2c fix_edge_gaps: Allow negative values for outer gaps.
While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
2018-10-13 17:42:49 +02:00
Brian Ashworth 2340b14eba bar_cmd_status_command: only reload current bar
Ideally, this will be replaced with an IPC barconfig_update event in the
near future
2018-10-13 08:00:01 -04:00
Brian Ashworth 00745d6280 Fix bar subcommand handler structs and selection 2018-10-13 08:00:01 -04:00
emersion 782a835175
Merge pull request #2828 from RyanDwyer/fix-locked-map-crash
Fix crash when view maps while locked
2018-10-13 13:22:35 +02:00
Ryan Dwyer 9190735947 Fix crash when view maps while locked
When locked, there is no active workspace so it must find the
focus_inactive workspace instead.

Additionally, this adds a check for if a view maps while there are no
outputs connected and handles it gracefully.
2018-10-13 19:15:04 +10:00
Drew DeVault b80cf982ae
Merge pull request #2825 from RyanDwyer/fractional-scale-pixel-leaks
Fix pixel leaks when using fractional scaling
2018-10-12 23:12:56 +02:00
Ryan Dwyer c699a86e47 Fix pixel leaks when using fractional scaling
The basic idea here is to apply rounding after scaling. It's not as
simple as this, though, and I've detailed it in the comments for a
function.

In order to fix some pixel leaks in the title bar, I found it easier to
change how we place rectangles to fill the area. Instead of placing two
rectangles across the full width above and below the title and having
shorter rectangles in the inner area, it's now pieced together in
vertical chunks. This method involves drawing two less rectangles per
container.
2018-10-12 22:36:11 +10:00
Ryan Dwyer f52af18e0d
Merge pull request #2821 from meakio/master
fix: cmd_sticky crash sway with empty container
2018-10-12 09:21:48 +10:00
Ryan Dwyer 27fb146121
Merge branch 'master' into master 2018-10-12 08:55:29 +10:00
meak 9e96ce4a46 fix: cmd_sticky crash sway with empty container 2018-10-11 22:29:41 +02:00
Drew DeVault e17a99287d
Merge pull request #2824 from chtison/master
Fix documentation of output
2018-10-11 22:26:34 +02:00
chtison 5ab7755649 Fix documentation of output 2018-10-11 22:14:56 +02:00
emersion 8dadfd42df
Merge pull request #2817 from trmendes/libinput-disable-touchscreen-support
Add libinput send_events config for touch
2018-10-10 23:52:29 +02:00
Thiago Mendes 8e147b3f1d
Add libinput send_events config for touch 2018-10-10 23:15:31 +02:00
Drew DeVault 5d19906556
Merge pull request #2806 from v-gu/add-libinput-support-for-keyboard
add libinput config for keyboard
2018-10-10 17:07:38 +02:00
Drew DeVault 0a36d14d7a
Merge pull request #2798 from RedSoxFan/bar-bindsym
Implement bar bindsym
2018-10-10 17:07:02 +02:00
Ian Fan cd6917d4a8
Merge branch 'master' into bar-bindsym 2018-10-10 12:23:04 +00:00
Drew DeVault 782ed19bc3
Merge pull request #2814 from Emantor/mouse-warping-container
Add mouse_warping container
2018-10-10 14:06:14 +02:00
Ryan Dwyer ed33d95b6a
Merge branch 'master' into mouse-warping-container 2018-10-10 21:50:29 +10:00
Drew DeVault 155e863ead
Merge pull request #2811 from RyanDwyer/fix-floating-click-events
Fix floating click events
2018-10-10 13:44:55 +02:00
Rouven Czerwinski 41991542ca Add mouse_warping container
This option always moves the cursor into the middle of the container if the warp
variable is true in seat_set_focus_warp.

Fixes #2577
2018-10-10 12:45:21 +02:00
emersion 87bc707e9b
Merge pull request #2812 from RyanDwyer/fix-version-messages
Fix program name in version strings
2018-10-10 10:57:45 +02:00
Ryan Dwyer fa8959532b Fix program name in version strings
When running swaymsg -v, the version returned is actually the version of
swaymsg itself, yet the message displayed was "sway version <version>".
This can create confusion if users update sway and swaymsg but don't
restart sway, then use swaymsg to check the version.

This patch changes the wording to be "swaymsg version <version>"
instead, and likewise for swaybar.

To get the version of a running sway instance, users should run swaymsg
-t get_version.
2018-10-10 18:34:50 +10:00
Ryan Dwyer 416bb7a214 Fix floating click events
* Set focus to a floating container when clicking its title bar.
* Raise floating when user clicks title bar or decorations (in the
seat_begin functions).
* In container_at, it only returned a floating container if the user had
clicked the surface. This makes it use floating_container_at instead.
2018-10-10 16:58:32 +10:00
Drew DeVault 2bd561d2b7
Merge pull request #2810 from RyanDwyer/fix-docs-backandforth
Fix back_and_forth documentation
2018-10-10 01:58:07 +02:00
Ryan Dwyer 8c98bde20d Fix back_and_forth documentation 2018-10-10 09:41:37 +10:00