Commit graph

93 commits

Author SHA1 Message Date
tiosgz
ac0f6b7e8b Cleanup unneeded code after switching to wlr_scene 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
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
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
tiosgz
4f39a54e69
Attempt to exit cleanly, without crash (#51) 2021-12-04 17:25:31 +00:00
tiosgz
a69dd030b8 view_get_size: access view::geom directly 2021-10-09 17:33:59 +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
tiosgz
d69ccc7bdd Only render mapped surfaces
This targets only surfaces under kiwmi_view, thus only XDG shell. Other
surfaces to be fixed later.

The new code here is copied over from wlroots, with only small
modifications.
2021-08-27 13:13:37 +00:00
tiosgz
ed1ff6a1d3 Handle XDG popups and subsurfaces
This commit ensures that they also cause output damage to happen and
that popups are moved into the visible area.

I browsed the source code of Sway while writing this and took a lot of
inspiration and help from there.
2021-08-27 13:06:55 +00:00
buffet
cf228a0819 Move stuff into output_damage() function 2021-08-15 17:07:54 +00:00
buffet
99743e7e2b Redraw twice on damage (even more hacky) 2021-08-14 20:25:15 +00:00
buffet
70376c9762 Damage on move and resize 2021-08-14 20:06:00 +00:00
buffet
b832975c6d Add hacky lazy damage tracking implementation 2021-08-14 19:44:20 +00:00
buffet
9c7d848ce5 Add scoll event 2021-08-14 18:42:35 +00:00
tiosgz
f5ee33d887 kiwmi:bg_color() 2021-08-13 08:36:00 +00:00
tiosgz
ea13f7d7c5 kiwmi_output:usable_area() and :on("usable_area_change") 2021-08-11 20:30:14 +00:00
Niclas
724923e5ff
Merge pull request #31 from tiosgz/clipboard
Add clipboard (& other stuff) support
2021-08-02 20:44:19 +00:00
buffet
37b6ff399d Add request_active_output event 2021-08-01 21:58:07 +00:00
tiosgz
ecbc88c643 Add clipboard and clipboard management support 2021-08-01 16:01:57 +00:00
buffet
4026cd0ef0 Add kiwmi:output_at, cursor:output_at_pos, use lx, ly more consistenty 2021-07-30 20:36:26 +00:00
tiosgz
d59c7e6b0c Avoid unnecessary layer arrangement
Plus restore alphabetical order
2021-06-19 10:20:35 +00:00
tiosgz
aa22efcfe8 Fix incompatibilities with wlroots 0.13 2021-04-24 11:53:05 +00:00
buffet
cd7cfae770 Differentiate between raw and translated keysyms 2020-08-27 20:48:15 +00:00
buffet
ba5ae54e06 Fix lua5.1 compat (for luajit) 2020-07-30 21:34:34 +00:00
buffet
3b5135fa40 Add kiwmi:schedule 2020-02-08 15:08:37 +00:00
buffet
194ce34c20 Add object lifetimes (invalidate references, free listeners) 2020-02-06 17:55:05 +00:00
buffet
2064b580fa Allow layer-shell surfaces to change their layer 2020-01-28 17:13:53 +00:00
buffet
feae18cf72 Make positions integers 2020-01-26 19:28:00 +00:00
buffet
a72528ea68 Add renderer 2020-01-26 19:18:52 +00:00
buffet
c18afb4e26 Only calculate output coords once per render 2020-01-22 23:16:09 +00:00
buffet
0c6435c42e Add view:csd 2020-01-21 19:48:50 +00:00
buffet
e298ad6f44 Add imove and iresize events, and view:imove, view:iresize 2020-01-20 23:21:17 +00:00
buffet
43f5de3d7c Add view:title, view:app_id, view:pid 2020-01-19 23:36:12 +00:00
buffet
06efda3a03 Respect layers for cursor motion 2020-01-19 19:45:13 +00:00
buffet
da1b0d2bea Fix geometry 2020-01-19 18:10:18 +00:00
buffet
e4e88df667 Focus layer-shell 2020-01-18 19:38:47 +00:00
buffet
9732952cc4 Move seat into extra file 2020-01-18 15:56:12 +00:00
buffet
89e9046ccc Add interactive move and rudamentary resize 2020-01-17 19:51:56 +00:00
buffet
94ba184fd3 Add keboard:on_destroy 2020-01-15 22:48:15 +00:00
buffet
b740e7f2d0 Fix memleaks 2020-01-15 20:52:26 +00:00
buffet
4262e81962 Start layer-shell 2020-01-15 20:30:37 +00:00
buffet
5d9ebb43d0 Add view:size 2020-01-08 22:26:17 +00:00
buffet
2631b77fb1 Add output:on_resize, fix missing output:on 2020-01-08 21:46:36 +00:00
buffet
4d66181506 Add equality for Lua types 2020-01-08 17:33:01 +00:00
buffet
e75b462fc1 Make view:tiled user configurable 2020-01-08 17:24:13 +00:00