Age | Commit message (Collapse) | Author |
|
This fixes a bug in `dispatch_cursor_button` where if there was an
operation occurring, the button would not be removed from the state on
release. This resulted in the button appearing to be permanently pressed
and caused mouse bindings to not match correctly.
|
|
swaybar: fix focused_statusline color parsing.
|
|
|
|
Fix crash when scratchpad contains split containers
|
|
To reproduce:
* Launch two terminals in a workspace
* `focus parent` to select both terminals
* `move scratchpad`
* `scratchpad show` to show the terminals
* `scratchpad show` to hide the terminals
* `scratchpad show` - crash
When hiding the terminals, it should be moving focus to whatever is in
the workspace, but this wasn't happening because the focus check didn't
consider split containers. So the terminals were hidden in the
scratchpad while still having focus. This confused the next invocation
of scratchpad show, causing it to attempt to hide them instead of show
them, and the hide-related code caused a crash when it tried to arrange
the workspace which was NULL.
This patch corrects the focus check.
|
|
Signed-off-by: NokiDev <noki.dev@gmail.com>
|
|
|
|
Allows the cursor to be hidden after a specified timeout in
milliseconds
|
|
This modifies the way mouse bindings are parsed. Instead of adding to
BTN_LEFT, which results in button numbers that may not be expected,
buttons will be parsed in one of the following ways:
1. `button[1-9]` will now map to their x11 equivalents. This is already
the case for bar bindings. This adds support for binding to axis events,
which was not possible in the previous approach.
2. Anything that starts with `BTN_` will be parsed as an event code name
using `libevdev_event_code_from_name`. This allows for any button to be
mapped to instead of limiting usage to the ones near BTN_LEFT. This also
adds a dependency on libevdev, but since libevdev is already a dependency
of libinput, this should be fine. If needed, this option can have dependency
guards added.
Binding changes:
- button1: BTN_LEFT -> BTN_LEFT
- button2: BTN_RIGHT -> BTN_MIDDLE
- button3: BTN_MIDDLE -> BTN_RIGHT
- button4: BTN_SIDE -> SWAY_SCROLL_UP
- button5: BTN_EXTRA -> SWAY_SCROLL_DOWN
- button6: BTN_FORWARD -> SWAY_SCROLL_LEFT
- button7: BTN_BACK -> SWAY_SCROLL_RIGHT
- button8: BTN_TASK -> BTN_SIDE
- button9: BTN_JOYSTICK -> BTN_EXTRA
Since the axis events need to be mapped to an event code, this uses the
following mappings to avoid any conflicts:
- SWAY_SCROLL_UP: KEY_MAX + 1
- SWAY_SCROLL_DOWN: KEY_MAX + 2
- SWAY_SCROLL_LEFT: KEY_MAX + 3
- SWAY_SCROLL_RIGHT: KEY_MAX + 4
|
|
Adds documentation in sway(5) for the tiling_drag command
|
|
Ctrl-D functions as EOF in most cases on the terminal. login(1) & many other
programs check the password on EOF, same as Enter. To make behavior consistent,
have swaylock submit the password on Ctrl-D.
This commit moves the handling for Enter into its own static function, which is
now also called on Ctrl-D.
|
|
I've got in the habit of using Ctrl-C with login(1) to restart password entry.
If Sway does the same thing I don't have to retrain my login muscle memory ;)
|
|
The fix pushed to master missed wlr_box_intersection. This just fixes
those lines so sway renders properly again
|
|
|
|
Fixes #3320
|
|
This combines `output_by_name` and `output_by_identifier` into a single
function called `output_by_name_or_id`. This allows for output
identifiers to be used in all commands, simplifies the logic of the
callers, and is more efficient since worst case is a single pass through
the output list.
|
|
Moves the call to `terminate_swaybg` from inside `apply_output_config` to
`output_disable`. The former was only called when an output was being
disabled. The latter is called when an output is being disabled and when
an output becomes disconnected. Without this, disconnecting an enabled
output would result in a defunct swaybg process.
|
|
|
|
Focus node before tiling drag if on titlebar
|
|
Before attempting to drag a tiling container by its titlebar,
focus it. This fixes clicking on titlebars to focus a container.
|
|
issue template: add instructions for stack traces
|
|
|
|
Fixes a crash when running `split` commands with the workspace focused.
|
|
This allows for output identifiers and to be used in the `workspace
<workspace> output <outputs...>` command. Previously, only output names
would be allowed. If an output identifier was given, it would never match
an output. This also allows for the wildcard character (`*`) to be
specified, which can be used to generate a list of workspace names that
should be used when generating new workspaces
|
|
If there are no arguments or invalid arguments given, swaynag will free
`swaynag.details.button_details` under the `cleanup` label in main. It
then called `swaynag_destroy`, which would attempt to free it again.
Since `swaynag.details.button_details` is either freed on line 106 of
main (when there is no detailed message) or added to `swaynag.buttons`
on line 103 of main, there is no reason to manually free it in
`swaynag_destroy`.
Although I cannot reproduce a double free on my system, for some reason,
it should have actually resulted in a double free in all code paths.
|
|
Enables titling views to be dragged by the titlebar. This is in addition
to using the modifier and dragging them from anywhere on the container
surface. Floating views already allow this behavior.
|
|
-Werror is eͫ̐ͭ҉vi͆ͦ̏ͦlͥ̀͒̊͂͛
|
|
When the cursor surface gets updated, it should be damaged.
This also bumps up `wl_compositor` to version 4 to be able to use
`wl_surface_damage_buffer`.
|
|
This fixes a few issues with swaybar's cursor scaling:
1. The cursor scale is now changed when the output scale changes
2. The cursor scale is no longer bound by the max output scale when
swaybar is launched
3. Related to the previous item, the cursor is no longer tiny on low
scale outputs after the max output scale has changed
This also bumps up `wl_compositor` to version 4 to allow usage of
`wl_surface_damage_buffer`.
|
|
Fix focusing on non-visible workspace
|
|
My previous attempt was not quite right. Changing the focus stack on a
non-visible workspace should only be blocked if the focus would be set
to the workspace itself
|
|
Default output configs were generated on reload to reset an output to
its default settings. The idea was that anything that was removed from
the config or changed at runtime and not in the config should be reset
on reload. Originally, they were created using the output name. Recently,
they were changed to use the output identifier. It turns out that there
are issues of shadowing with that solution as well. This should fix
those issues.
Instead of generating the default output configs on reload and storing
them in the output config list to merge on top of, they are now only
generated when retrieving the output config for an output during a
reload. This means that the default output configs are never stored
anywhere and just used as a base to merge unaltered user configs on top
of during a reload.
Starting with a blank output config, merges get applied in the following
order:
1. Default output config (only during a reload)
2. Wildcard config (only if neither output name or output identifier
exist)
3. Output name config
4. Output identifier config
|
|
This patch moves view_execute_criteria(view) below the fullscreen code.
Previously, if a view requested to be started in fullscreen, this was
done after execution of criteria and hence it was impossible to disable
fullscreen via criteria.
Fixes #3285
|
|
When there are outputs with mixed scales, it was possible for swaybar to
alter `block->separator_block_width` for an output with a higher scale,
and use the changed value for a lower scale output. This caused there to
be larger than normal separation between blocks on the lower scale
outputs. The issue is more obvious the larger the scale difference
between the highest scale output and the lowest scale output.
This fixes the issue by using a local variable that is originally set to
`block->separator_block_width` for rendering, but if it needs to be
increased, the local variable is the only thing touched.
|
|
When `block->urgent` is set, use the urgent colors. This matches i3bar's
behavior. Previously, swaybar just ignored the property.
This also adds in rendering for right borders, which was missing.
|
|
Changing the focus stack when destroying a container's node on a
non-visible workspace (on an non-focused output) incorrectly causes
the non-visible workspace to become visible. If the workspace is empty,
it will not be destroyed since it is now visible. Additionally since
there was no workspace::focus event, swaybar still shows the previous
workspace as focus-inactive. It also makes no sense to change visible
workspaces due to a container on a non-visible workspace being
destroyed.
Since the focus will either be set when switching to the non-visible
workspace or the workspace will be destroyed due to being empty, there
is no need to change the focus stack when destroying a container on a
non-visible workspace.
|
|
When a new output is detected and it is disabled by the output config,
call `wlr_output_enable(output->wlr_output, false)` to DPMS off the
output.
|
|
list.c: Remove list_foreach
|
|
list: double list capacity when resizing instead of incrementing
|
|
|
|
|
|
Most occurrences have been replaced by `free_flat_list` which has been
moved from stringop.c to list.c. The rest have been replaced by for loops.
|
|
cmd_split: flatten when possible
|
|
This is the industry standard since it allows insertion to be amortized
O(1) time.
|
|
|
|
Determine the container/workspace a command is run on, each time when a
command of the command list will be run.
Previously the container/workspace was determined only once at the
beginning of command list execution, which led to wrong behaviour
because commands wouldn't take into account when a previous command
changed the focused container.
|
|
Add relative coordinates in JSON for i3bar click events
|
|
Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
|
|
Instead redefine the config paths to use the default $HOME/.config
|
|
Before, it was only set if it was not set, but it should also be done
when empty.
|