Commit Graph

84 Commits

Author SHA1 Message Date
Simon Ser 5cde35923c Simplify globals implementation by removing destructors
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
2019-11-25 09:01:46 -05:00
Sebastian Krzyszkowiak 78d96009e4 wlr_xdg_popup: grab touch events alongside pointer and keyboard
Fixes #933
2019-08-12 09:31:49 +09: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
Brian Ashworth 17f688735f wlr_xdg_toplevel_v6: store pending fullscreen output
Since the fullscreen request may be made before the toplevel's surface
is mapped, the requested fullscreen output needs to be stored so it
can be retrieved on map (along with the existing fullscreen property).

This commit makes the required changes for wlr_xdg_toplevel_v6.
2019-03-27 10:04:10 +02:00
emersion 6c8eaaef2d
Deprecate old protocols 2019-02-09 19:57:10 +01:00
Alexander Bakker 20db29779e Add destroy signals to types that are destroyed by wl_display_destroy 2018-08-26 23:23:12 +02:00
Drew DeVault 211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Ilia Bozhinov 8b7c85d765 xdg-shell(-v6): add set_title and set_app_id toplevel signals
This is useful for example when rendering decorations
2018-07-22 22:42:37 +03:00
Drew DeVault c0b4217fce
Merge pull request #1116 from emersion/surface-role
surface: replace wlr_surface_set_role_committed with wlr_surface_role
2018-07-11 15:27:42 -07:00
emersion deeca53e33
Rename wl_resources to resource, wl_global to global 2018-07-08 19:21:31 +01:00
emersion 33db4263a0
surface: replace wlr_surface_set_role_committed with wlr_surface_role 2018-07-07 22:45:16 +01:00
Ryan Dwyer 86f401e827 Introduce wlr_xdg_surface_for_each_popup
It is common to want to iterate an xdg-surface's popups separately from
the toplevel and subsurfaces. For example, popups are typically rendered
on top of most other surfaces.

wlr_xdg_surface_for_each_surface continues to iterate both surfaces and
popups to maintain backwards compatibility.
2018-07-01 23:24:39 +10:00
Ilia Bozhinov a989104a6b xdg-shells: add a set_parent signal to toplevel surfaces 2018-06-06 17:08:06 +03:00
Markus Ongyerth 3994762ae0 Add wlr_surface_get_geometry
This function defaults and clips the xdg-surface geometry to the
bounding box of the surface + its subsurfaces, as specified by the
protocol spec.
2018-06-01 15:21:18 +02:00
Tony Crisci 044fa52be4 reword new_surface docs 2018-05-28 13:12:53 -04:00
Tony Crisci c27cd5f065 document the map/unmap xdg-shell events 2018-05-28 11:16:33 -04:00
emersion facc5aa359
xdg-shell-v6: split into separate files 2018-05-13 22:32:03 +01:00
morganamilo 6305e6327f
Fix typos in comments and strings 2018-05-03 21:59:43 +01:00
emersion 8dec7036d0
Always unmap before destroying surface 2018-04-11 23:09:13 -04:00
emersion 4a9a9eae9a
Add surface iterators 2018-04-05 14:18:17 -04:00
emersion c9d21106b4
Add wlr_xdg_surface_v6_surface_at and wlr_wl_shell_surface_surface_at 2018-04-04 17:42:16 -04:00
Drew DeVault 333ab59902 Add wlr_surface_is_*_surface
And wlr_*_surface_from_wlr_surface
2018-04-02 20:42:02 -04:00
Tony Crisci 2e63d1a0ca toplevel_box to toplevel_sx_box 2018-03-28 23:24:39 -04:00
Tony Crisci 967bccffcd remove xdg-positioner wlr wrappers 2018-03-28 19:42:17 -04:00
Tony Crisci 376d1cc0da rename xdg-positioner structs 2018-03-28 18:30:38 -04:00
Tony Crisci dbffda7549 xdg-positioner wlr abstractions 2018-03-28 16:27:08 -04:00
Tony Crisci 41e54ba632 Merge branch 'master' into xdg-positioner 2018-03-28 00:20:39 -04:00
Drew DeVault 88eec637a4 Address feedback 2018-03-27 18:50:09 -04:00
Tony Crisci 8371e2f41d implement flip_x 2018-03-27 14:49:31 -04:00
Drew DeVault 1ed90541f9
Merge pull request #753 from emersion/xdg-shell-unmap-destroy
xdg-shell-v6: don't destroy role resources on unmap
2018-03-27 13:15:32 -04:00
Tony Crisci bbd0e23fa7 xdg-positioner constraint detection 2018-03-26 23:48:32 -04:00
emersion a918ec877e
xdg-shell-v6, xdg-shell: explain what popup geometry is 2018-03-26 22:11:41 -04:00
emersion 334bab543d
xdg-shell-v6: move toplevel specific fields in wlr_xdg_toplevel_v6 2018-03-26 19:32:21 -04:00
emersion 5233801530
xdg-shell-v6: don't destroy role resources on unmap
The motivation for this is:
- `get_popup` and `get_toplevel` allocate role-specific resources.
- On the first non-null commit, the surface gets mapped.
- On a null commit, the surface gets unmapped. It can be mapped
  again with a non-null commit.
- When the role object (xdg-toplevel or xdg-popup) is
  destroyed, the surface is unmapped and role-specific resources
  are destroyed. The client can call `get_popup` or `get_toplevel`
  again on that surface.
- When the xdg-surface object is destroyed, the surface is
  unmapped, role-specific resources are destroyed and the surface
  itself is destroyed.
2018-03-26 18:35:45 -04:00
Tony Crisci 4da18f7fc3 xdg-positioner attrs 2018-03-26 12:46:04 -04:00
Tony Crisci f53575e3a3 unified xdg-surface close 2018-03-24 15:11:26 -04:00
Tony Crisci 30b8fb5572 Merge branch 'master' into xdg-positioner 2018-03-22 20:06:53 -04:00
Dominique Martinet de955a0f63 xdg_popup_grab: add listener on seat destroy 2018-03-22 21:25:41 +01:00
Tony Crisci 8836b167bf store xdg-positioner properties on the popup 2018-03-13 19:21:08 -04:00
emersion ace738dbca
xdg-shell-v6: next_geometry and geometry fields are not longer pointers in wlr_xdg_surface_v6 2018-03-13 22:17:25 +01:00
emersion 149209b72e
xdg-shell-v6: rename toplevel and popup fields in wlr_xdg_surface_v6 for consistency 2018-03-13 22:09:44 +01:00
emersion 657e5c8c0d
xdg-shell-v6: changed wlr_xdg_surface_v6_configure.toplevel_state to be NULL if surface isn't a toplevel 2018-03-13 22:05:35 +01:00
emersion e74ddaaf10
xdg-shell-v6: redesign the configure/ack_configure workflow 2018-03-13 19:57:21 +01:00
emersion 3f072bedd9
xdg-shell-v6: add map signal 2018-03-10 11:18:50 +01:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion 66ae4071a7
rootston: damage tracking for xdg popups 2018-01-21 21:06:37 +01:00
Tony Crisci d5ffa26564 xdg-shell: role-committed func 2017-12-27 06:15:25 -05:00
emersion cbf5763c22
Listen to display destroy in xdg-shell-v6 2017-12-07 01:08:35 +01:00
emersion dcb168914e
Merge branch 'master' into fullscreen 2017-11-21 18:34:12 +01:00
emersion 17d9e2ce35
Unify view events naming, remove client from event structs 2017-11-21 09:50:00 +01:00