Commit graph

812 commits

Author SHA1 Message Date
emersion
126f12e428
xdg-shell: fix invalid xdg-positioner cast 2018-04-26 18:53:59 +01:00
emersion
43012f3740
compositor: redesign how resources are managed
All public resource creators now take a new ID for the resource
and an optional list where the resource link is added. When the
resource is destroyed it is its own responsibility to remove
itself from the list. This removes the need for the caller to add
a destroy listener.

This commit fixes a few segfaults with resources not removed from
the list when destroyed.
2018-04-26 17:51:06 +01:00
Drew DeVault
979b1b22d5
Merge pull request #914 from emersion/misc-segfault-fixes
Misc segfault fixes
2018-04-26 17:37:27 +02:00
emersion
874909dca6
xdg-shell: fix invalid wlr_xdg_positioner alloc 2018-04-26 15:59:23 +01:00
emersion
fcb7ad925d
layer-shell: fix use-after-free when client requests an invalid layer 2018-04-26 15:58:41 +01:00
Drew DeVault
93ebd33aa8
Merge pull request #890 from agx/layer-shell-empty-output-crash
layer-shell: Fix crash when cursor is intially outside any output
2018-04-26 14:31:35 +02:00
Guido Günther
d81f0170a3 layer-shell: Don't crash when the compositor didn't find a suitable output
In that case it must have closed the surface.
2018-04-26 14:08:30 +02:00
Drew DeVault
fecb971518
Merge pull request #902 from emersion/various-memory-leaks
Various memory leaks
2018-04-26 11:34:49 +02:00
emersion
449f06556a
Destroy wlr_surface with wlr_renderer 2018-04-26 00:11:36 +01:00
emersion
d47713ac0f
compositor: destroy subsurface resources with wlr_subcompositor 2018-04-25 23:53:44 +01:00
emersion
89a9c96fab
compositor: make wlr_compositor_destroy destroy resources 2018-04-25 23:53:44 +01:00
emersion
625a7a48dc
Don't use the wlr_ prefix for static functions 2018-04-25 23:51:00 +01:00
emersion
b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
emersion
8e2f3056f8
layer-shell: fix small memory leak 2018-04-24 22:40:48 +01:00
emersion
bc0bfde5ee
cursor: allow to call wlr_cursor_wrap_absolute with zero 2018-04-24 19:46:29 +01:00
emersion
38064f1d18
Fix protocol error when a client destroys and re-creates a subsurface 2018-04-23 21:50:15 +01:00
Drew DeVault
941f88ce23 Fix popup positioning & double popups 2018-04-23 11:24:06 +02:00
Drew DeVault
52baf3dd8a Move get_geometry call back to xdg-shell 2018-04-23 11:24:06 +02:00
Drew DeVault
0a0627f5d0 Finish forward-porting @acrisci's positioner work 2018-04-23 11:24:06 +02:00
Drew DeVault
2e3d901ac5 Forward-port xdg-shell-v6 positioner improvements 2018-04-23 11:24:06 +02:00
Drew DeVault
278aa84619 Basic layer popup rendering 2018-04-23 11:24:06 +02:00
Drew DeVault
d3cdb00208 Add (shitty) support for popups to layer example 2018-04-23 11:24:06 +02:00
Drew DeVault
6b7b64ec1e Generalize xdg-shell popups and add to layer-shell 2018-04-23 11:22:23 +02:00
Drew DeVault
625bc7b8b3 assert(surface->output); after new_surface emit 2018-04-23 10:45:48 +02:00
Drew DeVault
177b548b15 Update layer shell with optional wl_output 2018-04-22 18:57:45 +02:00
emersion
3bce5dfc9f
Fix segfaults in wlr_surface_is_* 2018-04-21 19:04:48 +01:00
emersion
bfcd3f3707
Add wlr_subcompositor 2018-04-21 19:02:39 +01:00
emersion
fa84b267e0
Remove wlr_surface::subsurface 2018-04-21 18:40:25 +01:00
Markus Ongyerth
c8ccb1bef3 reorder xkb state handling in wlr_keyboard
wlr_keyboard manages the xkb-common state of the compositor.
It used to update the state, update the modifiers, then notify the
compositor.
When [Shift_L] was pressed and released, this resulted in an event chain:
  Modifiers: Shift
  Key: Shift_L (Pressed)

  Modifiers:
  Key: Shift_L (Release)

The xkb-docs state that the state should be updated *after* the key was
handled [1], to prevent the new state from influencing the actual key
generated.

To achieve this, the event to the compositor is emitted, *before*
wlroots handles the xkb and internal keyboard state.

With this patch applied, the emitted events ill be:
  Modifiers:
  Key: Shift_L (Pressed)

  Modifiers: Shift
  Key: Shift_L (Release)

[1] https://xkbcommon.org/doc/current/group__state.html#gac554aa20743a621692c1a744a05e06ce
2018-04-18 11:54:59 +02:00
emersion
94fa6c88f4
output: don't emit the mode event if it hasn't changed
This also fixes #535.
2018-04-18 00:15:25 +01:00
emersion
1b802d9251
Make wlr_renderer_scissor take normal coords instead of upside-down ones 2018-04-12 19:38:33 -04:00
Drew DeVault
8f4039d799
Merge pull request #861 from emersion/fix-output-transform-compose
Fix wlr_output_transform_compose
2018-04-12 19:27:57 -04:00
emersion
31c8bdc277
Fix wlr_output_transform_compose 2018-04-12 19:05:05 -04:00
emersion
fa0be972bb
Fix wlr_xdg_surface_surface_at for popups 2018-04-12 17:17:32 -04:00
Drew DeVault
bef5c1fd56
Merge pull request #850 from emersion/remove-backend-egl
backend: remove wlr_backend_get_egl
2018-04-08 11:21:21 -04:00
emersion
d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
Drew DeVault
bf68854a38 Fix destruction of popups without grabs
Fixes #846
2018-04-07 12:21:21 -04:00
Drew DeVault
ae4cef9e41
Merge pull request #825 from emersion/surface-iterators
Add surface iterators
2018-04-05 23:06:29 -04:00
Drew DeVault
ec0ce8ae1c Fix sending updates to xdg-output resources
Fixes #836
2018-04-05 18:22:48 -04:00
Drew DeVault
6710de9878 Merge branch 'master' into xwayland-dnd 2018-04-05 15:04:49 -04:00
emersion
4a9a9eae9a
Add surface iterators 2018-04-05 14:18:17 -04:00
emersion
19b576734e
Merge pull request #834 from emersion/surface-is-subsurface
Add wlr_surface_is_subsurface and wlr_subsurface_from_surface
2018-04-05 14:16:45 -04:00
emersion
aced024819
Add wlr_surface_is_subsurface and wlr_subsurface_from_surface 2018-04-05 14:00:53 -04:00
Drew DeVault
abfe7923c4 Add wlr_xdg_output_manager 2018-04-05 12:40:30 -04:00
emersion
3ea425d4e2
Fix xdg-shell popups, add wlr_xdg_surface_surface_at 2018-04-04 17:45:24 -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
emersion
1a8b24bdd2
rootston: fix view_at 2018-04-04 17:16:35 -04:00
emersion
d16127b3cb
Fix wlr_surface_subsurface_at, change it to be wlr_surface_surface_at 2018-04-04 16:48:23 -04:00
Drew DeVault
36e94b2a8e Actually fix input inhibitor destructor 2018-04-03 16:58:06 -04:00
Drew DeVault
1fa3ca3152 Revert "Add destructor to inhibitor"
This breaks shit

This reverts commit 657d2c9a69.
2018-04-03 16:41:01 -04:00