Commit graph

285 commits

Author SHA1 Message Date
tiosgz
67c41f189a view: allow imove/iresize with subsurfaces 2022-07-30 21:30:45 +00:00
Niclas
17814972ab
Merge pull request #50 from tiosgz/wlr-scene 2022-07-30 20:49:54 +00:00
tiosgz
37312b908d (Un)focus logic improvements 2022-07-30 19:22:58 +00:00
tiosgz
8dcfffbdaa Support protocols made easy by wlr_scene 2022-07-30 19:22:58 +00:00
tiosgz
ac0f6b7e8b Cleanup unneeded code after switching to wlr_scene 2022-07-30 19:22:58 +00:00
tiosgz
a8a82826c3 Move popup unconstraining logic 2022-07-30 19:22:58 +00:00
tiosgz
b82e6121c6 Prefer wlr_scene as the source of truth
Use it for getting the surface under cursor, position of surfaces, etc.
2022-07-30 19:22:58 +00:00
tiosgz
670b63b64a Render using wlr_scene
Apart from removing a lot of code, this commit also introduces (thanks
to wlr_scene) fine-grained damage tracking.

The lack of our own rendering code will only be an issue if the need for
custom effects (such as blur) arises; however, that's very unlikely and
it would probably require a lot of changes anyway.
2022-07-30 19:22:58 +00:00
tiosgz
f144eb1438 Keep an up-to-date wlr scene-graph
At the moment it isn't used at all and a lot of data is duplicated. This
is a temporary state introduced for nicer diff separation into several
commits.
2022-07-30 19:22:51 +00:00
tiosgz
8c191d2d41 Introduce kiwmi_strata
With the migration to wlr_scene, some objects (desktop, output etc)
will no longer have any reason to care about individual shells and
similar; handling each one on its own would introduce code that is,
from their perspective, over-complicated.

Strata (sg. stratum; this name was chosen to avoid confusion with the
over-used 'layer') represent logical layers of surfaces on the desktop,
such as every layer shell layer, one for xdg shell, another for popups.
2022-07-30 19:06:25 +00:00
tiosgz
7c98b5e5dc Remove API that relies on our rendering
This is a preparation for switching to the wlroots scene-graph. There is
no replacement planned for output:redraw() because it will no longer be
necessary (as far as i can tell), while scene-compatible replacements
for the view pre_render/post_render events are planned.
2022-07-30 19:06:25 +00:00
tiosgz
398e0f150f output: While destroying, destroy layers
Also handle NULL output in output_damage().

Co-authored-by: Uks2 <tom@tomg.xyz>
2022-07-30 19:06:25 +00:00
Niclas
1e30855dfb
Merge pull request #65 from tiosgz/map-pointer-output 2022-07-25 14:53:41 +00:00
Niclas
08b8f27590
Merge pull request #66 from tiosgz/fix-render 2022-07-25 14:49:44 +00:00
Niclas
1fa0887d3e
Merge pull request #58 from tiosgz/run_command-nocheck 2022-07-25 13:38:47 +00:00
tiosgz
b0ccd088de output: wlr_renderer_begin with physical size
The rendered region size is independent on the output transform and
scale. Until now, an output with scale > 1 would render only its
(1 / scale) part; so with a scale of 2, only the top-left quarter (ie.
the left 1/2 of the top 1/2) would be visible.

Similarly, a portrait output (constructed as landscape, rotated by 90
degrees) would have an empty area at its bottom.

This bug was found while testing the output-management PR (#62).
2022-07-14 14:21:14 +00:00
tiosgz
a12e670657 input: map pointer to output if possible
This is needed in order for wlroots to interpret some values (mostly
coords of absolute input events) correctly. It for example fixes how the
pointer behaves with WLR_WL_OUTPUTS=2.

In order to also map the pointer/output pair when the pointer is created
before the output, a list of pointers has to be managed, which wasn't
needed until now.
2022-07-14 14:15:51 +00:00
buffet
822e5b5063 Improve iresize docs
Fixes #59
2022-05-03 18:25:45 +00:00
tiosgz
0cf1253062 meson.build: check git exit status
The default value for the `check` argument on `run_command` will soon
change from false to true. Set it explicitly to false in order to
silence the warning, and check the exit status ourselves for a nicer
error message.
2022-04-04 14:26:32 +00:00
Niclas
d9f4f51959
Merge pull request #44 from tiosgz/wlr-0.15 2022-03-15 18:29:20 +00:00
tiosgz
460c30f997 Fix link to wlroots repository
It has been quite some time since wlroots migrated to the FDO gitlab
instance.
2022-01-13 20:35:40 +00:00
tiosgz
fe3236d948 Partly revert "Only render mapped surfaces"
This reverts most of commit d69ccc7bdd,
because it is now handled by wlroots.
The iterator -> callback renames have been kept in place.
2021-12-20 19:07:58 +00:00
tiosgz
a5ea9e98f7 Catch up with wlroots 0.15 breaking changes 2021-12-20 19:07:56 +00:00
Niclas
86e0f5b3fa
Merge pull request #55 from tiosgz/contrib-formatting 2021-12-10 15:15:47 +00:00
tiosgz
14754f53be Contributing: add a note about code formatting
Wanted to share that pre-commit hook :)
2021-12-09 14:32:36 +00:00
tiosgz
4f39a54e69
Attempt to exit cleanly, without crash (#51) 2021-12-04 17:25:31 +00:00
Niclas
68085d94e3
Merge pull request #46 from tiosgz/view-get-size
view_get_size: access view::geom directly
2021-10-18 16:29:24 +00:00
Niclas
468c385e85
Merge pull request #48 from tiosgz/fix-docs
Update docs with output:redraw()
2021-10-14 19:16:47 +00:00
tiosgz
e9ace66162 Update docs with output:redraw()
Also fix ordering
2021-10-14 19:11:05 +00:00
Niclas
f66cdeeab3
Merge pull request #47 from willeccles/output-redraw
output: add redraw function
2021-10-14 18:56:56 +00:00
Will Eccles
e71e88f861
output: add redraw function 2021-10-14 14:40:09 -04:00
tiosgz
a69dd030b8 view_get_size: access view::geom directly 2021-10-09 17:33:59 +00:00
Niclas
2fb053eaaf
Merge pull request #43 from tiosgz/use-buffer-age
Use buffer age when rendering
2021-10-08 17:18:08 +00:00
Niclas
c8d7c7d547
Merge pull request #42 from tiosgz/view-geom
Various view geometry-related fixes
2021-10-08 17:07:50 +00:00
Niclas
40c5cd662a
Merge pull request #45 from 6gk/master
fix logic error
2021-10-06 20:29:10 +00:00
gk
53779b8e8e fix logic error 2021-10-07 06:26:47 +10:00
tiosgz
58d701087e Use buffer age when rendering 2021-09-19 13:02:15 +00:00
tiosgz
b9078f543b Allow interactive move and resize at once
There is no technical reason not to allow resizing on opposite edges,
effectively getting single-directional interactive move (which can be
combined with another edge for resizing in the other direction).
2021-09-15 17:15:45 +00:00
tiosgz
b364634a9c Fix top edge interactive resize
The view jumped to the cursor position vertically.

While making this change, I also put some consistency into how position
and size are set (first the original ones are considered, and then only
updated as needed). It doesn't change the functionality, but is easier
to understand IMO.
2021-09-15 17:05:05 +00:00
tiosgz
ff762668a6 Fix xdg_shell_view_get_size
If the view doesn't set its size explicitly (e.g. imv), it returned 0
2021-09-15 17:05:05 +00:00
tiosgz
dc3b6a9303 Fix getting view position
view->geom.{x,y} tell the compositor where to place the buffer
relatively to the view, view->{x,y} is the view's absolute position.
2021-09-15 17:05:05 +00:00
buffet
84c09bbc01 Add check to adjust_package_path 2021-09-14 12:16:22 +00:00
Niclas
537a7d7f9c
Merge pull request #41 from tiosgz/pointer-focus
Pointer focus improvements
2021-09-13 19:06:18 +00:00
buffet
d9b66e6f46 Add note about the IRC channel 2021-09-13 11:24:20 +00:00
buffet
65d8d37b70 Add $XDG_CONFIG_HOME/kiwmi to package path 2021-09-13 10:25:41 +00:00
tiosgz
beccbcc56a Give pointer focus to layer shell surfaces as well 2021-09-10 21:06:41 +00:00
buffet
1189d74927 Use view_set_pos in process_cursor_motion 2021-09-05 18:35:07 +00:00
tiosgz
d5352862bb Update pointer focus more often
Until now, focusing a different view didn't move pointer focus to it,
even though it was under the cursor. The pointer had to move in order
to switch its focus. Similar situations should be handled after this
commit.
2021-09-05 10:51:58 +00:00
buffet
23f479fdbb Use unistd.h instead of getopt.h 2021-09-03 20:22:49 +00:00
Niclas
26efebbc8c
Merge pull request #39 from tiosgz/handle-popups
Handle xdg popups and subsurfaces
2021-08-27 16:42:19 +00:00