Age | Commit message (Collapse) | Author |
|
cmd_bind{sym,code}: Implement per-device bindings
|
|
Fixes a regression introduced in
24a90e5d86441fc345356eb3767e5a6880dcedbd.
consider_warp_to_focus has been renamed to seat_consider_warp_to_focus,
moved to seat.c and made public. It is now called when switching
workspaces via `workspace <ws>`.
|
|
bindsym --input-device=<identifier> ...
bindcode --input-device=<identifier> ...
|
|
Because cursor warping was the default behaviour in seat_set_focus,
there may be cases where we may have been warping the cursor
unintentionally. This patch removes cursor warping from seat_set_focus
and only does it in the focus command. This is managed by a static
function in focus.c.
To know whether to warp or not, we need to know which node had focus
previously. To keep track of this easily, seat->prev_focus has been
introduced and is set to the previous in seat_set_focus.
|
|
Fix moving tiled containers to workspaces which only have floating views
|
|
This fixes crashes when running the border, mark, unmark and
title_format commands on an empty workspace.
|
|
* Make a workspace which only contains floating views
* Switch to another workspace and create a tiled view
* Move the tiled view to the workspace with
`move container to workspace N`
The container would be added as a sibling to the floating view, which
makes the container floating while having the geometry of a tiled
container.
This changes it so it only looks for tiled containers in the workspace
with a fallback to the workspace itself.
|
|
|
|
|
|
Previously we would compare the last focus's workspace with the new
focus's workspace to determine if we need to emit an IPC
workspace::focus event. This doesn't work when moving the focused
container to a new workspace.
This adds a workspace property to the seat which stores the last emitted
workspace::focus workspace. Using this method, after moving the
container, refocusing it will trigger exactly one workspace::focus
event: from the old workspace to the new workspace.
|
|
This introduces seat_set_raw_focus: a function that manipulates the
focus stack without doing any other behaviour whatsoever. There are a
few places where this is useful, such as where we set focus_inactive
followed by another call to set the real focus again. With this change,
the notify argument to seat_set_focus_warp is also removed as these
cases now use the raw function instead.
A bonus of this is we are no longer emitting window::focus IPC events
when setting focus_inactive, nor are we sending focus/unfocus events to
the surface.
This also fixes the following:
* When running `move workspace to output <name>` and moving the last
workspace from the source output, the workspace::focus IPC event is no
longer emitted for the newly created workspace.
* When splitting the currently focused container, unfocus/focus events
will not be sent to the surface when giving focus_inactive to the newly
created parent, and window::focus events will not be emitted.
|
|
When swapping containers that are in the root of the workspace, parent
will be NULL.
|
|
|
|
Previously, if a change was sent to all bars, it would only actually
change the first bar it encountered, due to return value handling
|
|
Fix bar subcommand handler structs and selection
|
|
|
|
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
|
|
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.
|
|
Ideally, this will be replaced with an IPC barconfig_update event in the
near future
|
|
|
|
|
|
|
|
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
|
|
Returning a boolean from container_resize_tiled and resize_tiled doesn't
work in all cases. This patch changes it back to void and does a
before/after check to see if the container was resized.
|
|
|
|
|
|
|
|
|
|
|
|
Allow swaybg to be disabled
|
|
|
|
|
|
Same as #2791 but for swaybg.
Fixes #2790
|
|
This introduces a new view_impl function: is_transient_for. Similar to
container_has_ancestor but works using the surface parents rather than
the tree.
This patch modifies view_is_visible, container_at and so on to allow
transient views to function normally when they're in front of a
fullscreen view.
|
|
|
|
|
|
This patch makes it so when you run reload, the actual reloading is
deferred to the next time the event loop becomes idle. This avoids
several use-after-frees and removes the workarounds we have to avoid
them.
When you run reload, we validate the config before creating the idle
event. This is so the reload command will still return an error if there
are validation errors. To allow this, load_main_config has been adjusted
so it doesn't apply the config if validating is true rather than
applying it unconditionally.
This also fixes a memory leak in the reload command where if the config
failed to load, the bar_ids list would not be freed.
|
|
These are not supported by sway, but are valid i3 commands and should not
cause config errors.
Also includes a couple of minor touch-ups.
|
|
* New configuration option: raise_floating
(From the discussion on https://github.com/i3/i3/issues/2990)
* By default, it still raises the window on focus, otherwise it
will raise the window on click.
|
|
|
|
Add CSD to border modes
|
|
Fixes `hide_edge_borders smart` when gaps are in use.
Implements `hide_edge_borders smart_no_gaps` and `smart_borders
on|no_gaps|off`.
Since `smart_borders on` is equivalent to `hide_edge_borders smart`
and `smart_borders no_gaps` is equivalent to `hide_edge_borders
smart_no_gaps`, I opted to just save the last value set for
`hide_edge_borders` and restore that on `smart_borders off`. This
simplifies the conditions for setting the border.
|
|
Make gaps implementation consistent with i3-gaps
|
|
Add tap and drag to sway-input
|
|
|
|
Return an error when resizing is a no op
|
|
|
|
This changes it back so the path given to swaybg is enclosed in quotes.
Additionally, the only character that is escaped in the path stored is
double quotes now. This makes it so we don't need to keep an exhaustive
list of characters that need to be escaped.
The end user will still need to escape these characters in their config
or when passed to swaybg.
|
|
|
|
This changes our gaps implementation to behave like i3-gaps.
Our previous implementation allowed you to set gaps on a per container
basis. This isn't supported by i3-gaps and doesn't seem to have a
practical use case. The gaps_outer and gaps_inner properties on
containers are now removed as they just read the gaps_inner from the
workspace.
`gaps inner|outer <px>` no longer changes the gaps for all workspaces.
It only sets defaults for new workspaces.
`gaps inner|outer current|workspace|all set|plus|minus <px>` is now
runtime only, and the workspace option is now removed. `current` now
sets gaps for the current workspace as opposed to the current container.
`workspace <ws> gaps inner|outer <px>` is now implemented. This sets
defaults for a workspace.
This also fixes a bug where changing the layout of a split container
from linear to tabbed would cause gaps to not be applied to it until you
switch to another workspace and back.
|