Commit Graph

468 Commits

Author SHA1 Message Date
raichoo 47d788f8fe unset cycling when lowering views
If the cycling bit stays set the view the we just lowered will get raised after
releasing `mod`.
2020-06-19 08:12:29 +00:00
raichoo 87cccd4814 prevent the compositor to run as root
Makes `hikari` bail out if it accidentally gets run by root.
2020-06-17 19:00:26 +00:00
raichoo 5c1da687d0 TAG 2.0.2
* fix nested popups in layer-shell
* fix tiling state handling for unmapped views
* fix exclusive area handling for output relative positions
2020-06-16 13:18:02 +00:00
raichoo 8527d85242 update CHANGELOG for 2.0.2 2020-06-16 13:17:39 +00:00
raichoo 0388ca291d destroy tiling information on `unmap`
Unmapping a tiled view leads to the tile being in detached state. Detached tiles
are tiles that do not belong to a layout. In general we want to avoid such tiles
to exist for a longer period of time (e.g. during resetting). Also unmapping all
the views from a layout will lead to the destruction of the layout.

In general, having detached tiles presented to the user will lead to surprising
effects, like being able to reset the geometry on a view that has no apparent
overriding geometry. This should be avoided.

Currently the best approach to deal with this is to just completely destroy the
tile. This also leads to overwriting the original geometry of the view leading
to some sort of "memory loss" for views that behave like that. This makes them a
bad candidate for tiling anyway.
2020-06-15 09:40:29 +00:00
raichoo 6a2fb4791e make relative output positioning respect exclusive areas
Relative output positioning does not take the usable area x and y coordinates
into account. This leads to views positioned with an offset of that area when
using relative positioning.
2020-06-10 21:26:00 +00:00
raichoo d860523cdb fix nested popup handling for layer-shell
Nested popups are getting the wrong parent and are additionally resolving the
wrong `wl_listener`.
2020-06-10 08:16:05 +00:00
raichoo 54898e06d7 fix wrong `assert`
This should actually assert that the `focus_layer` is `NULL`.
2020-06-09 18:27:54 +00:00
raichoo 28ef1b123a add documentation for *public* view configuration 2020-06-09 16:59:17 +00:00
raichoo 812d65fff2 add `HIKARI_PI` constant for compatibility 2020-06-09 18:01:47 +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
raichoo 18e775a7f8 replace key code binding with symbol in default configuration 2020-06-09 14:21:01 +00:00
raichoo 9bad36f09e update CHANGELOG for 2.0.1 2020-06-09 10:14:06 +00:00
raichoo f9204bbf5b streamline default `PREFIX` and related operations
We should deal better with leading slashes during compilation.
2020-06-09 09:22:36 +00:00
raichoo 79ca424c86 remove `hikari.desktop` on `uninstall` 2020-06-09 09:22:08 +00:00
raichoo 8f55f9ca75 split up view configuration
Since `map` and `unmap` are now handled by views these functions now also need
to handle group assignment. An unmmapped view needs to be removed from its group
which might result in the group's deallocation. In case it's getting mapped
again we need to reload the view configuration to re-allocate the group.

This is done by factoring out the view configuration routine from the
configuration module and centralize view configuration in the view module via
`hikari_view_configure`. Configuration values are applied in this function
rather than in the resolve function for the `view_autoconf`. This also allows
for group allocation and deallocation in the `map` and `unmap` functions for
views.
2020-06-04 14:13:11 +00:00
raichoo ca512e53b3 decouple view management from mapping
It currently can happen that an unmapped view can be shown on the workspace. If
the user switches to a sheet with an unmapped view, all linked sheet views get
shown, problematically this also applies to unmmaped views. There is no
distinction between `managed` an `mapped` state here so if a view gets unmapped
but not destroyed right away, it still happens to be managed by the sheet.

This patch separates the notion of `managed` and `mapped`. `unmapped` views get
removed from all the relevant lists to prevent the situation we are describing
in the previous paragraph.

`map` and `unmap` should be separate operations.
2020-06-04 09:45:00 +00:00
raichoo 518182f911 mention precompiled manpage in README
tarballs come with a precompiled manpage to remove the need for a `pandoc`
installation.
2020-06-03 15:32:17 +00:00
raichoo d595a90aeb silence `gcc` warning
Even though there are only 3 cases `gcc` wants a `default` here.
2020-06-01 09:20:11 +00:00
raichoo 4077fc4c73 update CHANGELOG for 2.0.0 2020-06-01 09:14:45 +00:00
raichoo 4908d13ec8 convert UPDATING to markdown 2020-06-01 09:06:03 +00:00
raichoo a72b67630d check for keyboard being present on focus change
This can be `NULL` in some cases when external tooling like `ydotool` sends fake
keyboard input.
2020-05-27 16:27:27 +00:00
raichoo 2d8568eadf add hikari.desktop session file to distribution tarball 2020-05-25 08:54:32 +00:00
timothee.floure 062a5fb769 Add wayland-session desktop file for use by display managers 2020-05-24 08:13:02 +00:00
raichoo 668c4dd1fd copy split configuration on layout initialization
Currently split configurations are referenced using a pointer to that split.
Those get invalidated when a configuration gets reloaded though. This patch
creates a deep copy of the split configuration on layout creation.
2020-05-24 12:43:48 +00:00
raichoo 766c517794 TAG 1.2.1
* fix double selection manager creation
* add CHANGELOG.md to distribution tarball
2020-05-23 11:13:39 +00:00
raichoo 8185e117f1 update CHANGELOG for 1.2.1 2020-05-23 11:12:19 +00:00
raichoo 1420ca1f43 initialize selection manager only once
There has been a second redundant initialization for this manager.
2020-05-23 10:01:14 +00:00
raichoo a80e3166a1 fold migrate back into reset
Migrating a view has to happen instantly. Once a view leaves an output it needs
to be remove from all lists regarding that output and inserted into all of the
lists on the output we are migrating to. This operation should not be buffered
because otherwise the view can be somewhere in limbo between some outputs in a
state where one should not issue an operation on it. Anyway, if we are moving
the view via mouse it will never lose focus and therefore we could potentially
issue any operation violating invariants like that the focus view should never
be hidden.
By making the transition instant these "limbo states" cannot be achieved.
2020-05-19 17:03:42 +00:00
raichoo 7806c4d943 fix visual glitch during migration
During move mode we should not draw the indicator when the view is hidden for a
short amount of time during the transition to another output. Otherwise this
leads to the indicator being drawn on the wrong spot at the other monitor.
2020-05-19 14:44:56 +00:00
raichoo 88e4f96195 refactor option handling
Configuration and autostart script are checked for permissions during startup.
Also the order in which the configuration is loaded.

* explicit configuration overrides all others and stops if it can not be used
* otherwise fallback to `XDG_CONFIG_HOME`
* otherwise use default configuration

Options should also be parsed and handled before the backend starts up.
2020-05-19 07:06:23 +00:00
raichoo fd32ab761f destroy display on configuration error during startup
The display needs to be destroyed otherwise we are stuck on a black screen.
2020-05-19 07:04:54 +00:00
raichoo da279618f2 exit with failure state on unknown option 2020-05-19 07:04:28 +00:00
raichoo acacd27284 set position for output using option setter
This needs to be set via the setter otherwise the position will not be merged
properly with the default configuration.
2020-05-18 06:52:17 +00:00
raichoo 2503926b03 update colorscheme to new default colors in manpage 2020-05-17 13:13:42 +00:00
raichoo 97a4089e81 reduce code running with privileges
We can reduce the amount of code running with privileges to the few calls that
are needed to initialize the `wlroots` backend. These calls are now part of
`hikari_server_prepare_privileged`. After this everything is running with the
users privileges again.
2020-05-17 12:16:48 +00:00
raichoo 91dcf7a4b6 add `WITHOUT_SUID` install option
Some systems to not require SUID to be set for the `hikari` binary.
2020-05-17 09:31:44 +00:00
raichoo 4d4b11a172 correctly damage mark conflicts
Mark conflicts should also be cleared when the target mark becomes `NULL`.
2020-05-16 17:57:04 +00:00
raichoo 92798b74e1 add default wallpaper
This adds a default wallpaper to `hikari` and uses default output configuration
to make use of it. The path to the wallpaper is spliced into the default
configuration view `sed` during installation.
2020-05-16 07:56:29 +00:00
raichoo 2666869608 remove excess `/` from PREFIX default path
Otherwise paths are going to start with `//` in case of an empty `DESTDIR`.
2020-05-16 07:55:57 +00:00
raichoo 07a3bae1fa adjust default color scheme for upcoming default background 2020-05-15 22:54:56 +00:00
raichoo ed9188fb24 add default configuration option to pointers and outputs
This patch enables to change the default configuration value for outputs and
pointer by defining a configuration for "*". Values defined in this object
override unconfigured values.
2020-05-15 22:45:42 +00:00
raichoo b305f483e7 rename `hikari_configuration_resolve` 2020-05-15 22:33:14 +00:00
raichoo 66263c0dc7 add option.h
This header adds some functionality to handle configuration options in a unified
way.
2020-05-15 20:43:20 +00:00
raichoo b465a1dfa6 specialize server migrate function to `focus_view`
This function assumes that the view we are migrating is the focus view anyway,
so passing something else would cause an error.
2020-05-16 07:01:27 +00:00
raichoo b25dbc4a2d make workspace cycling attempt to focus last `focus_view`
This patch tries to focus the last `focus_view` during cycling. If that view is
no longer visible the first sheet view gets focused. This patch also makes
`hikari` focus the `focus_view` of a workspace when entering it with the cursor.

`focus_view` is no longer set to `NULL` when leaving a workspace.
2020-05-16 07:00:37 +00:00
raichoo 9faaa109a8 move view hiding to `pin_migrate`
How a view is hidden during migration depends on the way we migrate it. When
doing it during mouse movement we do not want to lose focus that's why we only
re-organize the stack. This is why we only need the call the `hikari_view_hide`
in `pin_migrate`.
2020-05-15 15:10:09 +00:00
raichoo dd151b7969 make workspace cycle focus the first view on the sheet
Focusing the first sheet view excludes borrowed views. The idea is that views on
sheet 0 should not become a fallback when the workspace is otherwise empty.
Views on that sheet are supposed to take a background role.
2020-05-15 11:53:29 +00:00
raichoo ca37bb65c0 rework view order
This patch reworks how views are ordered. A new ordering is introduced for all
views present on all visible workspaces. This makes cycling views with multiple
workspaces less confusing because the ordering is server-wide and not just
workspace-wide. Also showing views now calls the `raise_view` function to bring
the view to the front of all relevant lists and not just the workspace.
2020-05-14 17:52:43 +00:00