Commit Graph

26 Commits

Author SHA1 Message Date
Kirill Primak 811ca199c4 xdg-shell: drop automatic surface configuration
Compositors now are expected to wait for an initial commit by checking
wlr_xdg_surface.initial_commit on every surface commit and send
(schedule) configure events manually.
2024-02-06 13:48:00 +00:00
Simon Ser 4b3553409a xdg-shell: use wlr_surface_synced for popups 2023-12-25 11:47:15 +01:00
Simon Ser 9201431c29 xdg-shell: use wlr_surface_synced for toplevel 2023-12-25 11:47:15 +01:00
Kirill Primak bd5c4f4a4a xdg-shell: rework roles 2023-08-21 16:30:29 +00:00
Kirill Primak f0cc712af1 xdg-shell: don't return anything from create_xdg_surface() 2023-08-21 16:30:29 +00:00
Kirill Primak b0437fc416 xdg-shell: use unified map logic 2023-06-02 17:26:18 +00:00
Kirill Primak a3489f2c64 xdg-shell: improve unmapping logic slightly 2023-03-12 11:09:36 +00:00
Kirill Primak acd5a64fd1 xdg-shell: use role object destroy handler 2022-11-06 17:00:00 +03:00
Kirill Primak 4a968576e4 xdg-popup: add proper configure flow 2022-05-27 13:31:30 +00:00
Kirill Primak 5879e77d68 xdg-positioner: rename structs
To be consistent with other wlr_xdg_* structs,
wlr_xdg_positioner_resource is renamed to wlr_xdg_positioner and made
public, and wlr_xdg_positioner is renamed to wlr_xdg_positioner_rules.
Functions which operated on wlr_xdg_positioner were renamed and updated
accordingly.
2022-02-21 17:26:51 +00:00
Kirill Primak b5b15b2625 xdg-{toplevel,popup}: extract destructors 2022-02-21 17:26:51 +00:00
Kirill Primak 88f3040438 xdg-popup: destroy popup-less grab
This also fixes a seat destruction segfaulting if xdg-shell was
destroyed first.
2022-02-02 21:06:12 +03:00
Kirill Primak c35d14ecfa xdg-shell: extract role-specific unmap logic 2022-02-02 21:06:12 +03:00
Kirill Primak 27c8865a4d xdg-shell: unify function arguments' names
`wlr_xdg_surface`s are now named "surface" everywhere, and
`wlr_surface`s are called "wlr_surface".
2022-02-02 21:06:12 +03:00
Kirill Primak 41412cadbe xdg-popup: fix functions' main argument type
With this commit, `wlr_xdg_popup_*()` functions now expect
a `wlr_xdg_popup` instead of a `wlr_xdg_surface`.
2022-02-02 21:06:12 +03:00
Kirill Primak affe0d8713 xdg-toplevel: fix functions' main argument type
With this commit, `wlr_xdg_toplevel_*()` functions now expect
a `wlr_xdg_toplevel` instead of a `wlr_xdg_surface`.
2022-02-02 21:06:11 +03:00
Kirill Primak ee52c32915 xdg-shell: fix create_xdg_popup() param type 2022-02-02 21:04:59 +03:00
Kirill Primak 05dd990e43 xdg-shell: rename surface role handlers 2022-02-02 21:04:59 +03:00
Kirill Primak 50827ed7f5 surface: improve role precommit hook
Now the role precommit hook is called before the commit, not on
wl_surface.commit request, and takes a state which is to be applied.
2022-01-13 15:15:54 +03:00
Kirill Primak 0e2d369106 xdg-surface: simplify configure mechanism
This commit removes any checks whether a configure will change anything
and makes configures be sent unconditionally. Additionally, configures
are scheduled on xdg_toplevel.{un,}set_{maximized,fullscreen} events.
2021-09-21 10:09:09 +02:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
emersion 7f5967234c
xdg-shell: destroy child popups on unmap
It doesn't make sense to keep popups opened when unmapped. We also need to do
so in wlr_xdg_popup_destroy so that popups are destroyed in the correct order.
2019-02-05 19:29:00 +01:00
emersion 5515faa197
xdg-shell: emit xdg_surface destroy when role object is destroyed
Fixes https://github.com/swaywm/wlroots/issues/1407
2018-12-04 13:42:29 +01:00
emersion 16d7e09d99 surface: add wlr_surface_role.precommit
This allows to emit the unmap event before the surface becomes
actually unmapped for most shells.
2018-07-15 19:30:19 +01:00
emersion 33db4263a0
surface: replace wlr_surface_set_role_committed with wlr_surface_role 2018-07-07 22:45:16 +01:00
emersion 3036507463
xdg-shell: split into multiple files 2018-05-14 22:28:45 +01:00