Age | Commit message (Collapse) | Author |
|
|
|
The cursor's image would be removed or set when the seat's capabilities
were updated, but there was nothing to prevent the image from being set
at other times.
|
|
This makes it a bit more obvious what the expected number of arguments is.
|
|
Consolidates logic and fixes mistake that used argc instead of val for
determining plural.
|
|
Its uses have been replaced with EXPECTED_AT_LEAST.
|
|
|
|
The custom swaynag_command was being stored as config->swaybg_command
instead of config->swaynag_command.
|
|
Add references to sway-output(5) in sway(5)
|
|
- update ref in the swaybg_command description
- add ref to sway-output(5) in See Also
- add an `output` command description
|
|
The peeked and expanded line log entries were useful during the switch
to generic code blocks and subcommands. However, it has been a while
since those were introduced and the log entries are no longer helpful
for any remaining issues with config parsing. Instead of keeping them
as clutter in the log, they can just be removed.
|
|
|
|
Fix xwayland wants_floating logic
|
|
Firstly, the container was wrongly identifying as a tiling container
because it had no workspace.
Secondly, when calculating the maximum possible size we can't use the
workspace if it's not there, so we'll allow unlimited size in this case.
|
|
Fix crash when quitting a QT app on the wayland backend using menu
|
|
Fix crash when moving a container to a fullscreen workspace
|
|
|
|
QT unmaps the view before destroying the popup. We destroyed the popup
in response to the view unmapping, but then we'd attempt to destroy it a
second time which caused a crash.
The patch removes the listener.
I tested it with GTK as well, and can confirm the popup is still being
destroyed.
|
|
Setting normal focus to the fullscreen view causes the old workspace to
start destroying. We then set focus to the old workspace which is no
longer attached in the tree.
As we are only setting focus_inactive on the fullscreen container, the
fix uses seat_set_raw_focus to avoid all the additional behaviour that
comes with it such as destroying the old workspace.
|
|
When the config gets reloaded, the font height and baseline get reset to
0. If the config does not have a font command in it, the variables will
remain at 0 causing a transparent area where the title would be
rendered.
This makes it so the font height and baseline are recalculated. Additionally,
since the font height and baseline may have changed due to the reload, the
title and marks textures are rebuilt.
|
|
fixes the parsing part of #2906
|
|
* When using multiple seats, each seat has its own prev_workspace_name
for the purpose of workspace back_and_forth.
* Removes prev_workspace_name global variable.
* Removes unused next_name_map function in tree/workspace.c.
* Fixes memory leak in seat_destroy (seat was not freed).
|
|
The idea here is we don't want users to be blissfully unaware that they
are running unsupported drivers. So we abort on startup, and force the
user to add a specific argument to bypass the check.
|
|
Fix popup damage issues when toplevel and/or popup uses geometry
|
|
Remove raise_floating directive
|
|
The wlr_xdg_popup_get_toplevel_coords function has the following quirks:
* It does not do anything with the coordinates of the passed popup.
Instead, we are required to add them ourselves, which we do by passing
them to the function as the surface local values.
* It adds the geometry (shadows etc) of the toplevel itself, so the
coordinates are surface local rather than content local. For this
reason, we have to negate the toplevel's geometry
(child->view->geometry).
* I may be wrong, but the popup positions appear to be stored in surface
local coordinates rather than content local coordinates. The geometry
(shadows etc) of the popup itself must be negated (surface->geometry).
|
|
Function input_manager_get_default_seat should always return a seat.
|
|
The directive controlled whether floating views should raise to the top
when the cursor is moved over it while using focus_follows_mouse. The
default was enabled, which is undesirable. For example, if you have two
floating views where one completely covers the other, the smaller one
would be inaccessible because moving the mouse over the bigger one would
raise it above the smaller one.
There is no known use case for having raise_floating enabled, so this
patch removes the directive and implements the raise_floating disabled
behaviour instead.
|
|
Minor refactor of input manager
|
|
Fix crash when view unmaps while no outputs connected
|
|
swaybar: disallow left and right position and print error on default
|
|
"left" and "right" are not allowed positions for swaybar, remove them.
|
|
The input manager is a singleton object. Passing the sway_input_manager
argument to each of its functions is unnecessary, while removing the
argument makes it obvious to the caller that it's a singleton. This
patch removes the argument and makes the input manager use server.input
instead.
On a similar note:
* sway_input_manager.server is removed in favour of using the server
global.
* seat.input is removed because it can get it from server.input.
Due to a circular dependency, creating seat0 is now done directly in
server_init rather than in input_manager_create. This is because
creating seats must be done after server.input is set.
Lastly, it now stores the default seat name using a constant and removes
a second reference to seat0 (in input_manager_get_default_seat).
|
|
When a view unmaps, we call workspace_consider_destroy. This function
assumed the workspace would always have an output, but this is not the
case when hotplugged down to zero. The function now handles this and
allows itself to be destroyed when there is no output.
This means that workspace_begin_destroy must remove the workspace from
the root->saved_workspaces list to avoid an eventual dangling pointer,
so it does that now.
Lastly, when an output is plugged in again and it has to create a new
initial workspace for it, we must emit the workspace::init IPC event
otherwise swaybar shows no workspaces at all. I guess when you start
sway, swaybar is started after the workspace has been created which is
why this hasn't been needed earlier.
|
|
Introduce cursor_rebase
|
|
If the container being dragged has a parent that needs to be reaped, it
must be reaped after we've reinserted the dragging container into the
tree. During reaping, handle_seat_node_destroy tries to refocus the
dragging container which isn't possible while it's detached.
|
|
This function "rebases" the cursor on top of whatever is underneath it,
without triggering any focus changes.
|
|
Turns out we don't need to store the previous focus, and it should be
based on which output the cursor was in.
|
|
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.
|
|
These can be used by toolkits (currently Qt, libxcursor, glfw) to
choose a default cursor theme and size.
This backports this rootston commit:
https://github.com/swaywm/wlroots/pull/1294/commits/3a181ab430997aaf03a75cbe3b79b0fc56ec96c3
|
|
Fix moving tiled containers to workspaces which only have floating views
|
|
Fix crashes when running certain commands on an empty workspace
|
|
Fix mouse warping container
|
|
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.
|
|
If the cursor is warped during the destruction of the workspace, we end up in
the wrong position. Warp the cursor after arrange_workspace() so we end up in
the correct position.
|
|
|
|
The new functions allow a cursor to be warped without changing the focus.
This is a preparation commit to handle cursor warping not only in
seat_set_focus_warp.
|