Commit Graph

162 Commits

Author SHA1 Message Date
yosh 15790d4c46 chore: convert spaces to tabs 2024-02-24 02:00:11 -05:00
alex d958a0cfaf Update to wlroots 0.15.0
This patch was source from the FreeBSD ports collection and created by 
Jan Beich <jbeich@FreeBSD.org> in commit 2af7805da5c5fc73eb28fba4065cead63c4bb5ab

https://cgit.freebsd.org/ports/commit/x11-wm/hikari/files/patch-wlroots-0.15?id=2af7805da5c5fc73eb28fba4065cead63c4bb5ab
2021-12-22 16:00:43 +00:00
raichoo 48fc9656ca Make `hikari` build with `wlroots` 0.13.0 2021-04-09 17:15:35 +00:00
raichoo 337400b7c9 Factor out partial view damage
The code for apply effective surface damage has been duplicated in several
places.
2021-03-28 15:09:13 +00:00
raichoo 0e0ccfbffc Restructure subsurface handling
Subsurfaces have been handled somewhat incorrectly. With the release of Firefox
87 this happens to trigger a couple of rendering bugs. Damage is not tracked
properly for those subsurfaces.
2021-03-28 15:05:08 +00:00
raichoo e5cba7b8ce Move frame schedule into output module 2020-12-04 15:32:07 +00:00
Maxim Tarasov e967148e54 Add `accel-profile` configuration
Pointer devices should be able to configure *flat*, *adaptive* and *none* as
acceleration profiles.
2020-11-26 09:23:21 +00:00
raichoo b084a678fb Fix group operations for multi monitor
Group operations tend to break with multiple outputs and some frankly do not
make a lot of sense.

* `raise` and `lower` group may and up looping
* `group-only` should clear all workspaces
2020-09-14 12:35:09 +00:00
raichoo e8fb5f3b28 Correct list naming
Unmanaged Xwayland views are not tracked by the server for a while now anymore,
this should be reflected in the naming of the list.
2020-08-31 09:19:16 +00:00
raichoo b345399d7d Evacuate unmanaged Xwayland views properly
Unmanaged views currently do not get evacuated at all. This means they are still
referring to a deallocated output if they happen to be have been there during
deallocation. We now evacuate them alongside regular views on workspace merging.
2020-08-31 09:09:53 +00:00
raichoo 28bf7f4b32 Remove unused function prototypes
These functions have been removed some time ago.
2020-08-29 08:00:31 +00:00
raichoo c9859d47b3 Rearrange Xwayland views on layout change
Xwayland views need to know their layout coordinates communicated to them via a
configure. Detaching an output changes the layout coordinate system and we
therefore need to re-configure all Xwayland views once the layout has changed.

Not doing this can lead to Xwayland views being placed outside the viewport
since they assume the wrong layout coordinates.
2020-08-26 12:33:40 +00:00
raichoo 51e394f07b Split up view pinning and view migration
Sheet pinning could also function as view migration. This is now removed since
it leads to two possible code paths for migration. We now decide at the call
site if we are doing a migration or a different operation (e.g. pinning,
moving).
2020-08-13 14:17:28 +00:00
raichoo 8d9f092ba6 Conditionally compile Xwayland methods
We do not need `move` and `move_resize` view methods if we compile without
XWayland support.
2020-08-13 13:28:43 +00:00
raichoo 367d3bc2c3 Graceful shutdown
Shutting down `hikari` now sends a `quit` action to each active view. And waits
for all of them to quit before exiting. Sending a quit again during shutdown
will terminate `hikari` right away.
2020-08-09 10:49:45 +00:00
raichoo 474d652b57 Move xcursor management to cursor module
We are also going to fall back to "Adwaita" as a cursor theme now because it
seems to cause the least issues.
2020-08-07 11:39:57 +00:00
raichoo 465347717f Remove redundant `enum` 2020-07-31 16:04:19 +00:00
raichoo 82f5829893 Clean up Makefile
Prevents from generating header files that are not used for a specific build as
well as excluding unnecessary object files. The `clean` target automatically
assumes all features being enabled to clean up all potential files.
2020-07-30 16:35:26 +00:00
raichoo 9cfa1b2d58 Add relative position view movement
* `view-move-bottom-left`
* `view-move-bottom-middle`
* `view-move-bottom-right`
* `view-move-center-left`
* `view-move-center`
* `view-move-center-right`
* `view-move-top-left`
* `view-move-top-middle`
* `view-move-top-right`
2020-07-29 20:33:18 +00:00
raichoo 97adae8529 Extend `view_config` to handle child view properties
This lays the foundation for separate view properties for child views. Currently
`hikari` treats all views with the same app id the same. This can lead to
unwanted behavior for e.g. dialogs.
2020-07-29 19:20:25 +00:00
raichoo 1f90303d12 Add child view detection
XDG views that are pointing to a parent are considered children. Xwayland views
are currently not treated as children.
2020-07-28 19:55:32 +00:00
raichoo 81fec32a80 Factor out view properties
This way we can configure different view properties for child views more easily.
2020-07-28 19:47:18 +00:00
raichoo 7026d31522 Move position configuration parsing into `position_config` 2020-07-28 19:13:00 +00:00
raichoo c62e1ca438 Add default layouts
This patch adds layout registers `0` to `9` which correspond to default layout.
These are currently only useful when restacking a sheet that does not have a
layout applied. If this is the case the default layout will be used to arrange
the current sheet.
2020-07-27 15:00:02 +00:00
raichoo a5d0375532 rename `view_interface` to `node` 2020-07-22 11:44:33 +00:00
raichoo 37bf6f1c0d refactor indicator bar color handling
Indicator bars now store their current color. This fixes issues where bars get
updated and need to figure out which mode `hikari` is in so they can color
themselves correctly. This way the bar just "knows" the right color.
2020-07-22 10:43:36 +00:00
raichoo 859ea8d7ac move bar rendering code into render module 2020-07-22 08:20:30 +00:00
raichoo d665f3e405 Add middle click emulation for pointers
Adds a boolean flag "middle-emulation" for pointer configuration.
2020-07-27 11:01:12 +00:00
Andri Yngvason 1e6e9ad38a add virtual pointer 2020-07-21 19:07:26 +00:00
Andri Yngvason 6ec8e14592 add virtual keyboard 2020-07-21 18:58:49 +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 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 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 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 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 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 09037ab936 rename `view_autconf` to `view_config`
Unifies naming with other configuration objects.
2020-06-20 14:20:40 +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 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 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
raichoo 847640dc31 add `public` flag
Public views are used to populate the lock screen to display additional
information, they should never display sensitive information.

Even hidden are displayed. This uses a `force` flag that overrides visibility
that is set in mode enter and reset on mode exit.
2020-06-09 15:40:18 +00:00
raichoo 515499e8da add lock mode
Introducing `lock` mode. This turns the screen locker into a mode which
adds some more modularity to the code.

Visible views on sheet 0 are also displayed on the lock screen allowing
for a customizable setup without the needs for extra plugins.

An indicator adds feedback for typing and verification.
2020-06-09 15:37:41 +00:00