Commit Graph

468 Commits

Author SHA1 Message Date
raichoo 9f2701b8d9 Mark select focus
Make mark select lose focus. This makes sense because it is not an operation on
the focus view. Focus is regained when the mode is exited.
2020-08-26 17:51:02 +00:00
raichoo d7ad0262ab Move layout select cursor change into `mode-enter` 2020-08-26 17:45:11 +00:00
raichoo e419b26744 Prevent raising hidden floating views
When applying a layout we raise all floating views to prevent them from being
covered up by the tiles. There is currently a missing check for hidden views
which should not get raised.
2020-08-26 17:23:50 +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 06c1eaea14 Rework force logic
Evacuating forced views needs to take into account that forced visible views are
not linked to the workspace related lists. With hidden visible views it is the
other way around. This needs to be handled when evacuating views in the case of
an output getting destroyed. Hidden forced views need to be removed from lists
and added correctly and vice versa.
2020-08-26 11:20:38 +00:00
raichoo ee645ec0ad Make focus view operation more strict
We now assert being in normal mode when calling `hikari_workspace_focus_view`.
This should prevent `hikari` from exiting protected modes (e.g. lock mode) when
something forces a focus change.
2020-08-25 11:22:19 +00:00
raichoo ea7877788d Add CoC to repository
The CoC is still based on the Geekfeminism Code of Conduct, but now it is self
hosted with the community name adjusted.
2020-08-21 13:23:53 +00:00
raichoo 1d3d32ac5e Fix view evacuation
With recent changes view migration became more of an operation of its own. This
led to evacuation breaking. To fix this evacuation is no longer a special case
of view pinning but rather a separate operation.
2020-08-18 14:47:35 +00:00
raichoo 344821aa33 TAG 2.1.2
* Typo fixes in manpage
* Fix double free on configuration reload
2020-08-18 14:01:09 +00:00
raichoo 7975ec1a00 Update CHANGELOG for 2.1.2 2020-08-18 14:00:37 +00:00
raichoo 033c06b6a3 Fix double free on configuration reload
Merging output configurations with each other leads to all `background` pointers
referencing the same string which leads to multiple free operations on cleanup.
2020-08-18 13:37:46 +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 fe5b79b2e8 Allow resize for maximized views
Vertically and horizontally maximized views should be resizable along their
unmaximized axis. This resizing should also propagate to the original view
geometry.
2020-08-10 10:00:46 +00:00
raichoo 5bc55a88e7 Unify code
Using a pointer to the server is done in quite a lot of places now and makes the
code a bit more readable.
2020-08-10 08:46:17 +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 6167fd49d2 Take usable output area into account when moving maximized views
Currently we are assuming that the usable area covers the entire screen which is
only correct when there are no layers present. Once a layer with an exclusive
area has been added this changes.
2020-08-06 17:50:43 +00:00
raichoo 8e58e81e2a maximized movement
Moving vertically/horizontally maximized views should be allowed and also modify
the original view geometry.
2020-08-05 13:16:33 +00:00
raichoo ac6519f15b Do not cut off indicator frames
Vertical and horizontal maximize cut off indicator frames. This does not really
serve a purpose and can lead to disorientation.
2020-07-31 18:16:43 +00:00
raichoo 465347717f Remove redundant `enum` 2020-07-31 16:04:19 +00:00
raichoo cbf2d05315 Move `inherit` example into the view configuration example section 2020-07-31 08:59:06 +00:00
raichoo 60ba47ef50 Fix typo in manpage 2020-07-31 08:30:06 +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 2ed9b0c7e8 Fix typo in manpage 2020-07-30 16:11:38 +00:00
raichoo b454937cfd Formatting 2020-07-30 16:04:03 +00:00
raichoo 8d62b18dec Add `WITH_ALL` build option
Selecting all the options manually can be a bit tedious for packagers and
testers. `WITH_ALL` just turns on all the features.
2020-07-30 16:02:25 +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 c8b0fde37c Add child view configuration
`inherit` can be used to configure child view properties, strings are used to
indicate copied properties and objects can be used to overwrite them. Not
stating a property indicates that the default value should be used.
2020-07-29 19:20:48 +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 6abc8a9842 Move view configuration parser into `view_config` 2020-07-28 19:13:32 +00:00
raichoo 7026d31522 Move position configuration parsing into `position_config` 2020-07-28 19:13:00 +00:00
raichoo 00e13604d2 TAG 2.1.1
* Allow geometry changes to unmapped surface (fixes `mako`)
* handle `NULL` app id
* check if surface is valid on input grab cursor move (fixes `wlroots` assert)
2020-07-28 11:38:26 +00:00
raichoo c7334bec0f Update CHANGELOG for 2.1.1 2020-07-28 11:35:43 +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
raichoo 80c4d9245e formatting 2020-07-25 09:39:00 +00:00
monroef4 c5a5fb122d Allow geometry changes to unmapped surface
A surface may be resized before being mapped to a buffer.  mako can do this,
and ends up blocked waiting for the configure ack.
2020-07-23 20:47:49 +00:00
raichoo f210d6fbc1 handle `NULL` app id 2020-07-22 13:01:01 +00:00
raichoo 66c475bcbe check if surface is valid on input grab cursor move
wlroots 0.11.0 added an assertion to check if `surface` is NULL. We now check
this in `input-grab-mode` before informing the seat about new pointer
information.
2020-07-21 21:04:16 +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 329a24be6e update CHANGELOG for 2.1.0 2020-07-21 06:15:38 +00:00
raichoo 94ac5fa6be simplify `start_drag` handler
We do not need a `return` here, the conditional branch can handle this just
fine.
2020-07-21 06:12:38 +00:00
raichoo 0d736a6e75 remove redundant `break` 2020-07-21 06:12:21 +00:00