Commit Graph

327 Commits

Author SHA1 Message Date
yosh 7080b1d60d xwayland: restack on window activation
restack on window activation. not doing so causes popups for apps to
not accept mouse input.

patch taken from:
de3817572a
2024-03-08 02:37:12 -05:00
yosh 15790d4c46 chore: convert spaces to tabs 2024-02-24 02:00:11 -05:00
raichoo 827c630a50 Apply formatting 2022-01-13 09:16:10 +00: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 8bcb1c358c Handle subsurfaces of subsurfaces correctly
Damage is not handled properly when subsurfaces have subsurfaces. Of course
`firefox` is doing this because, why not. Anyway, those need to know their
parent as well to figure out the right location for the damage.
2021-07-20 19:06:37 +00:00
raichoo 4d354adbf9 Change init sequence to handle premature input
Initialize the current workspace with the `noop` workspace right away, that way
we can prevent hitting a NULL pointer when typing during startup.
2021-07-20 18:25:46 +00:00
raichoo 2b98d5ddc9 Fix subsurface iteration
Subsurfaces are handled differently in `wlroots` 0.14.0. We now need to interate
over all the subsurfaces above and below the parent.
2021-06-26 21:32:16 +00:00
raichoo 44be0b6f58 Drop gtk-primary-selection support
This has been removed from `wlroots` 0.14.0.
2021-06-26 21:17:12 +00:00
raichoo 5b2662e700 Use DRM format constant for lock screen indicator
The WL constants yields an unsupported format after switching to `wlroots`
0.13.0.
2021-04-10 11:33:33 +00:00
raichoo 398c844329 Use DRM format constant for indicator bars
The WL constants yields an unsupported format after switching to `wlroots`
0.13.0.
2021-04-10 08:25:32 +00:00
raichoo 5b004c46f8 Check for view visibility on damage
This is not always the case so we better check.
2021-04-09 17:29:53 +00:00
raichoo 48fc9656ca Make `hikari` build with `wlroots` 0.13.0 2021-04-09 17:15:35 +00:00
raichoo 4c32368fe1 Fix crash on shutdown with `wlroots` 0.13.0
We should not need to clean up the noop display explicitly anymore.
2021-04-09 16:45:52 +00:00
raichoo c106b4e989 Fix background loading
This uses the DRM constants for background loading. Otherwise backgrounds will
fail to load on newer versions of `wlroots`.
2021-04-09 16:44:31 +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 e09aa1f73c Refactor operation logic
There is an issue with sending a resize event to surfaces which would not
require them to actually resize. In that case the serial of these operations
would be `0`. This way the commit logic would not recognize a surface update and
handle it wrongly.

This can be reproduced when trying to `fullscreen` a surface that already has
its maximum size.
2020-12-09 17:28:07 +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 57bdd0dc24 Declare helper function as `static` 2020-10-22 15:12:32 +00:00
raichoo a0a985a9ef Remove check for pressed LOGO modifier
This prevents non-LOGO MOD keys from exiting `input-grab-mode`.
2020-10-21 07:48:14 +00:00
raichoo 37b1085d72 Configurable `input-grab-mode` exit
Currently this mode could only be quit using the default bindings. We now
respect what has been specified in `hikari.conf`.
2020-10-20 10:24:37 +00:00
andy c0c15f3f93 Set environment variables as configuration variables
Allows to refer env vars inside the configuration, as follows:

   background = "$XDG_CONFIG_HOME/wallpapers/file.png"
2020-09-14 19:13:42 +00:00
raichoo 74f5249c33 Check for `NULL` on `keyboard_config` merge
We should not attempt to `strdup` `NULL`.
2020-09-14 12:39:18 +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 28dc6cb88a Recompute focus on view pinning
When sending a view to a different sheet we need to compute the focus, otherwise
an obscured view would not gain focus if it is revealed after the pinning.
2020-09-10 08:14:57 +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 fd7d3c7fbb Remove code duplication
Recalculating unmanaged view geometry is has been moved into a helper function
which should be used across the implementation for unmanaged Xwayland views.
2020-08-31 09:12:07 +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 dfd72dea7d Move `output->enabled` guard into output functions
This simplifies the API for output disabling and enabling. We do not need to
check beforehand if the invariants hold but can bail out if we happen to find
out during enable/disable of a monitor (e.g. double disable/enable).
2020-08-29 07:50:20 +00:00
raichoo 7da20bc57e Indicate focus view on layout select
This makes it more clear that we are inside of a mode. Ultimately indicating the
views that are going to get tiled would be the best solution but for now this is
good enough.
2020-08-29 08:21:02 +00:00
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 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 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 b454937cfd Formatting 2020-07-30 16:04:03 +00:00