Commit Graph

468 Commits

Author SHA1 Message Date
raichoo b9c6db207e rearrange shutdown sequence to avoid double free
This bug appeared after updating to `wlroots`. We also explicitly shut down
XWayland now.
2020-07-20 09:39:29 +00:00
raichoo 274e50d196 check public flag on lock screen renderer
This prevents views that are opened during the lockscreen from being displayed.
2020-07-09 17:25:24 +00:00
raichoo cc618483cc add documentation for `view-toggle-public` to manpage 2020-07-09 11:27:21 +00:00
raichoo 4f013c3cbd remove unused `glib` dependency 2020-07-08 13:29:23 +00:00
raichoo 030f72013e refactor mode interface
Make the devices resolve listeners and properly cast events so the modes do not
have to do this themselves.
2020-07-08 12:32:23 +00:00
raichoo 97a5ca45b2 handle mouse movement correctly when mouse button is pressed
When a mouse button is held down we need to communicate the change of mouse
position to the currently focused surface rather than handling it just as normal
mouse movement.
2020-07-07 18:35:40 +00:00
raichoo e92a0ef30f remove redundant focus change check in `cursor_move` 2020-07-07 15:01:32 +00:00
raichoo 14d111718a TAG 2.0.5
* fix unmap/map handling for layers
* resolve workspace on NULL output
2020-07-07 07:32:38 +00:00
raichoo f6d2e25e6b update CHANGELOG for 2.0.5 2020-07-07 07:32:15 +00:00
raichoo 7267d6593e add noop output
This dummy output keeps all the views when every physical output has been
destroyed.
2020-07-07 07:23:32 +00:00
raichoo 89d7d0f972 remove redundant file 2020-07-07 07:20:35 +00:00
raichoo 48d5668bfc remove linked list for server workspaces
The server already manages outputs and each output references its workspace.
Outputs are more frequently used so the workspace list is basically redundant.
2020-06-30 12:19:35 +00:00
raichoo a5eb6837b6 resolve workspace on NULL output 2020-06-15 15:19:04 +00:00
raichoo e5e9163736 fix unmap/map handling for layers
Disable/enable the unmap and map handlers in the different states so that we
cannot double map/unmap a layer. Also properly handle destroying unmapped
layers.
2020-07-04 13:39:10 +00:00
raichoo 79b2b07745 short circuit earlier on inhabited sheet cycle 2020-07-04 13:21:04 +00:00
raichoo 59d1ea16ff make inhabited sheet cycling wrapping 2020-07-03 10:07:45 +00:00
raichoo 05e598a724 move actions and layout parsing out of the parsing loop
This allows us to use actions in more than just the `bindings` section e.g.
`switches`.
2020-07-01 17:37:53 +00:00
raichoo f96b2f218a use option init consistently
This helper was added later on and forces one to pick a default value. It is a
good idea to use it everywhere.
2020-07-01 08:17:32 +00:00
raichoo 0e14c0e3a7 move repeat default values into config module
This is the better place for those since this is where one would expect default
configuration values for the keyboard to be.
2020-07-01 07:38:53 +00:00
raichoo eb0841caee add switch configuration
This patch adds configuration fir switch devices like "lid switches" and "sleep
buttons". They are configured like any other input device and bind to an action.
2020-06-30 17:05:16 +00:00
raichoo 9128aca566 TAG 2.0.4
* fix focus issue on cycling
* factor in bottom layer for usable area calculations
* fix minor typo in manpage
2020-06-30 09:15:03 +00:00
raichoo 52aae8fc61 update CHANGELOG for 2.0.4 2020-06-30 09:03:04 +00:00
raichoo e26a07b557 add key repeat rate and delay configuration
Allows to specify key repeat rate and key repeat delay individually for each
keyboard.
2020-06-30 08:31:13 +00:00
raichoo b2c2d750b2 fix focus issue on cycling
Cycling does not reset pointer focus properly so it can leave the pointer focus
on a different surface than the once we actually cycled to.

We now completely clear the focus on `hikari_workspace_focus_view` no matter
what and use the cursor to determine the new focus after cycling.
2020-06-29 12:16:35 +00:00
Evilham 9f2f755752 fix minor typo in manpage 2020-06-29 09:16:34 +00:00
raichoo 4918dbe9d1 add some documentation on how different view states are indicated
This was currently only the case for *borrowed* views but should be extended to
include *public*, *floating* and *invisible* state.
2020-06-26 14:56:15 +00:00
raichoo 03cf2eb177 add some more context for pointer configuration
This is also done for the keyboard section and it turned out to be quite
helpful.
2020-06-26 14:38:30 +00:00
raichoo 46ae0e8929 add `keyboards` configuration section to `inputs`
Allows keyboard configuration on a device basis.

Available options are:

* `rules`
* `model`
* `layout`
* `variant`
* `options`

All `xkb` settings are configured in the `xbk` section. Rules can be given as an
object and an `xkb` file is specified as a string.
2020-06-26 13:54:30 +00:00
raichoo ce6f9ee35b add return value to `option.h` `merge`
`merge` should return `true` when a value has been merged. That way we can react
to the fact (e.g. cleaning up or creating copies).
2020-06-25 12:05:02 +00:00
raichoo 244ac95037 add `init` helper to `option.h`
This helper allows to set a default value without setting the `configured` flag.
2020-06-25 12:03:27 +00:00
raichoo 8ca5233f55 refactor binding configuration code
Bindings should get configured when devices are attached. Not when the
configuration is loaded. This patch lays the groundwork for more flexible
keyboard configuration.
2020-06-23 14:23:15 +00:00
raichoo a17ba737f4 factor in bottom layer for usable area calculations
`swaybar` tends to use the bottom layer so it does properly work with menu
applications. We currently do not factor in the bottom layer for computing
usable output areas which causes some issues with tiling. This patch makes
`hikari` compute the usable area by taking the `top` and `bottom` layer
exclusive areas into account.

Source: https://github.com/Alexays/Waybar/issues/11
2020-06-26 09:48:09 +00:00
raichoo 09037ab936 rename `view_autconf` to `view_config`
Unifies naming with other configuration objects.
2020-06-20 14:20:40 +00:00
raichoo 5d9b329db6 mention Xwayland runtime dependency in `README.md` 2020-06-24 18:41:29 +00:00
raichoo dfb9f5a1bd TAG 2.0.3
* disallow running `hikari` as root
* unset cycling bit when lowering a view
2020-06-23 09:18:09 +00:00
raichoo d2c1c55915 update CHANGELOG for 2.0.3 2020-06-23 09:17:42 +00:00
raichoo 551e30f6b2 add `assert` to check pending tile attachment 2020-06-20 14:01:15 +00:00
raichoo 6d09febfb7 show view on completed operation
This unifies showing a view after a pending operation has been completed.
2020-06-20 13:38:05 +00:00
raichoo 533490c50c clear focus on lock mode for layers 2020-06-20 13:37:28 +00:00
raichoo e716c12742 only schedule new frames when views are dirty
This prevents clean views to schedule new frames when they are not visible
anymore and don't need to advance their state through pending operations.
2020-06-20 11:13:47 +00:00
raichoo 2e30dd0806 schedule new frame on every commit
Pending operations need to be advanced even when a view is not visible. To make
this happen we need to schedule a new frame on every commit which communicates
to the clients that frames are getting processed.
2020-06-17 15:31:29 +00:00
raichoo d6e372d100 make lock indicator visible on all outputs
When typing the lock indicator should be visible on all outputs. This patch also
moves the rendering code for the lock indicator into the render module.
2020-06-19 14:57:13 +00:00
raichoo 12ee11ff5d fix cycle preview on multi monitor setups
The preview should only be rendered on the output containing the focus view.
2020-06-19 14:04:31 +00:00
raichoo 1d7d62bdf3 preview views during cycling
Since every mode now has full control over the rendering process the currently
selected view during cycling can be drawn as the topmost view without changing
its actual stacking order.
2020-06-19 07:51:54 +00:00
raichoo f7b4a6c03c move rendering code into renderer module
Border and indicator drawing including its primitives are moved into the
rendering module this way we can benefit from inlining.
2020-06-18 22:25:43 +00:00
raichoo 86f6813ae0 remove redundant `output` parameter
The output that is currently rendered is contained in the renderer already.
2020-06-18 22:06:35 +00:00
raichoo d5547a07bc add `hikari_renderer`
Remove `hikari_render_data` in favor of `hikari_renderer`.
2020-06-18 22:00:45 +00:00
raichoo a9640fff19 specialize mode rendering code
Instead of having different damage frame handlers for outputs every mode now has
full control over the renderer. This allows for more optimization and add more
flexibility to designing modes.
2020-06-18 22:00:45 +00:00
raichoo 05dd2bac85 move mode rendering code into render module
By doing this all the relevant rendering code is now in one compilation unit. We
can also make very mode take complete control of its rendering while maintaining
efficient code.
2020-06-18 21:58:54 +00:00
raichoo 164a93c3cb factor out rendering code
Move all rendering code to one compilation unit to make the inliner happy. This
also unclutters the output code.
2020-06-18 14:46:57 +00:00