Commit Graph

836 Commits

Author SHA1 Message Date
Las fa2e6e7d9d Implement pointer-constraints protocol in wlroots and rootston 2018-09-18 10:14:33 +02:00
Las 6367e0bc93 Add wlr_surface::input_region member
This is analogous to the opaque_region member.

In addition the code for setting the opaque region is cleaned up.
2018-09-18 10:14:33 +02:00
Las d446c53fe1 Make (wlr_)seat_client_from_pointer_resource public 2018-09-18 10:14:33 +02:00
Las 252bcce2f3 Add focus change event for seats 2018-09-18 10:14:33 +02:00
Drew DeVault df991a55ab
Merge pull request #1241 from emersion/output-enable-error-checking
output: make wlr_output_enable return a bool
2018-09-14 21:14:18 -04:00
Drew DeVault 0210905eef
Merge pull request #1243 from emersion/layer-shell-suffix
layer-shell: add _v1 suffix
2018-09-14 20:47:42 -04:00
emersion fc960e5d06 layer-shell: add _v1 suffix 2018-09-14 19:32:33 +02:00
emersion b3cb22c003 xdg-output: add _v1 suffix 2018-09-14 19:29:08 +02:00
emersion cb293f09e7 output: make wlr_output_enable return a bool 2018-09-14 18:18:07 +02:00
emersion 769a8e9917
Merge pull request #1160 from Ongy/tablet-grabs
Tablet grabs
2018-09-12 19:01:50 +02:00
nyorain f6168c2afe Fix #1129 and remove sx, sy from wlr_drag_icon
sx, sy used to store the buffer offset of the drag surface which was
then be added (by rootston) to the drag icon position.
Buffer offsets are handled already in surface_intersect_output
(output.c) so they were added twice for dnd surfaces.
2018-09-07 14:48:28 +02:00
Ilia Bozhinov 62539e265e add missing wlr_box.h include in wlr_screencopy_v1.h 2018-08-31 20:48:38 +03:00
Alexander Bakker 20db29779e Add destroy signals to types that are destroyed by wl_display_destroy 2018-08-26 23:23:12 +02:00
Brian Ashworth c6955fa89c
Merge pull request #1199 from apreiml/farthest_output
introduce wlr_output_layout_farthest_output
2018-08-25 11:00:25 -04:00
Armin Preiml 5617d2bd60 introduce wlr_output_layout_farthest_output
Similar to wlr_output_layout_adjacent_output but will return the
one that is the farthest away from the reference in given direction.
2018-08-25 09:14:55 +02:00
Scott Anderson fd3fa760d3 Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""
This reverts commit 9c886f20b9.
2018-08-24 19:35:02 +12:00
Drew DeVault 9c886f20b9 Revert "Merge pull request #1194 from ascent12/meson_feature"
This breaks wlroots when used as a meson subproject.

This reverts commit dea311992e, reversing
changes made to 6db9c4b746.
2018-08-23 21:00:58 -04:00
Scott Anderson 51892e0d74 Install headers explicitly 2018-08-22 21:16:16 +12:00
Ilia Bozhinov 88e9dbe32e remove dangling declaration of wlr_xdg_surface_popup_get_position() 2018-08-09 07:55:20 +03:00
Markus Ongyerth f64962ace8 tablet-v2 tool: Implement implicit grab
Implement the tablet-v2 tablet tool's implicit grab semantics for
buttons and tip.

This avoids losing focus (to other [sub]surfaces) when a button is held,
or the tip is down.
This should help when the device is used close to a surface's border and
would otherwise have to be very precise.
2018-08-06 08:45:41 +02:00
emersion 2ebecb6727 backend/drm: allow to pass empty gamma ramp to reset it 2018-08-02 23:33:59 +01:00
emersion e21563ec76 output: document gamma functions 2018-08-02 23:33:59 +01:00
emersion a149c2370a Implement wlr-gamma-control-unstable-v1 2018-08-02 23:33:04 +01:00
Drew DeVault 5642c5cc8f
Merge pull request #1053 from emersion/xdg-decoration
Add xdg-decoration-unstable-v1 support
2018-08-02 09:33:10 -04: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
emersion 555721f714 Add xdg-decoration-unstable-v1 support 2018-07-28 22:48:07 +01:00
Drew DeVault f1b65b34a6
Merge pull request #1127 from emersion/surface-precommit
surface: add wlr_surface_role.precommit
2018-07-27 13:21:03 -04:00
Markus Ongyerth d5950255de tablet-v2 tablet_tool grab implementation
Implement the basic logic for tablet-v2 tablet_tool's grabs. And plug in
the default grab.
2018-07-23 10:08:10 +02: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
emersion 5dbf0fe7f2 linux-dmabuf: add v1 suffix
This prevents some future conflicts with the stable version.

Fixes #1133
2018-07-19 21:50:05 +01:00
Markus Ongyerth 454f2a84a8 tablet-v2 tablet_pad grab implementation
Implement the basic logic for tablet-v2 tablet_pad's grabs. And plug in
the default grab.
Features like "holding" the focus should be implemented via grabs, like
they are for pointer and keyboard.
2018-07-19 11:35:00 +02: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
Markus Ongyerth 9a6f77fc2c tablet-v2: fix merge commits and test again
There were a few issues after rebase, that the merge algorithm didn't
throw at my face:

wlr_output did a check on the actual role, not a string anymore, so that
had to go to allow tablet-v2 to set cursor surfaces.
A few L_DEBUG/L_ERRORs were still around
There was a user-after-free in tablet-group free()ing, probably after
insufficient testing from a previous feedback pass
2018-07-14 10:29:22 +02:00
Markus Ongyerth 43b20bfea2 First feedback pass from acrisci 2018-07-14 09:52:05 +02:00
Markus Ongyerth d9e978e1b3 rename wlr_tablet_tool to wlr_tablet
The previous naming was based on the input-device capability names from
libinput.
With code that uses the libinput_tablet_tool and mapping into tablet-v2,
this is confusing, so the name is changed to follow the names used in
the protocol.
2018-07-14 09:49:58 +02:00
Markus Ongyerth 6b51f3b57a use previous resource versions and destroy pads 2018-07-14 09:48:57 +02:00
Markus Ongyerth 48e2cba9b6 Handle relative motion for mouse tools 2018-07-14 09:48:57 +02:00
Markus Ongyerth 5cbdd13df8 remove unused wl_listener 2018-07-14 09:48:57 +02:00
Markus Ongyerth 2bc09d91c3 Silent conversion from double to int should be illegal 2018-07-14 09:48:57 +02:00
Markus Ongyerth dc525a9c5f Clean up serial handling and automate proximity acompaning events 2018-07-14 09:48:57 +02:00
Markus Ongyerth 25c2808153 Clean up serial handling 2018-07-14 09:48:57 +02:00
Markus Ongyerth 2c12011472 Send all tablet tool axis events 2018-07-14 09:47:16 +02:00
Markus Ongyerth b79d11395c Hook up set_cursor in rootston 2018-07-14 09:47:16 +02:00
Markus Ongyerth 0c9a26828a Use wlr_list for paths, and improve inert resource handling 2018-07-14 09:43:17 +02:00
Markus Ongyerth 31cec36b74 1st feedback pass
Rename make_ functions to _create
Implement set_cursor and set_feedback
2018-07-14 09:43:16 +02:00
Markus Ongyerth 5c7a37f309 Add tool buttons 2018-07-14 09:40:39 +02:00
Markus Ongyerth 391eef6ea9 Propagate most axis events to clients 2018-07-14 09:40:39 +02:00
Markus Ongyerth f375246657 Implement basic tablet_pad handling (bound to keyboard focus) 2018-07-14 09:40:39 +02:00
Markus Ongyerth e235f7d336 Basic tablet_v2 object lifetime 2018-07-14 09:40:39 +02:00
Markus Ongyerth 77bac448cc storage commit #2 2018-07-14 09:40:39 +02:00
Markus Ongyerth 000b305ecc backend/libinput: Manage tablet tool livetimes
This adds the management code to manage tablet tools lifetimes from
libinput.
It follows the suggestion made in the tablet-unstable-v2.xml to destroy
tablet_tools once all tablets that it got into contact with were removed
from the system. This is implemented via a refcount.

If a tool is *not* unique, it will be destroyed on proximity out. This
is libinput specific and mentioned in libinput docs that tools will not
be found again, so we shouldn't keep a reference to them.
Also they can't be on other tablets as well, because they cannot be
tracked.

The naming in this commit is a bit off (to not break things).
The wlr names stay the same, tablet_tool is the libinput_device with
capaiblity LIBINPUT_DEVICE_CAP_TABLET_TOOL which is more akin to
"tablet" in the tablet-unstable-v2 protocol.
The struct that corresponds to the tablet_tool in tablet-unstable-v2 is
called tablet_tool_tool, a rename should be done at some point in the
future.
2018-07-14 09:40:39 +02:00
emersion 5bb272d7f3 surface: add wlr_surface.opaque_region 2018-07-13 10:54:51 +01: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 c19d475753
xdg-output: don't send no-op updates
To begin with, no-op updates are unnecessary, so this patch is an
improvement on its own.

Then, this fixes hotplugging issues with xwayland. xwayland waits
for both wl_output and xdg_output to send a "done" event. However,
it doesn't handle well desynchronized "done" updates: if xdg-output
sends "done" twice, the second one will wait for the next wl_output
"done" event. This is an issue when the first is a no-op and the
second is a real update: the second isn't applied. I've considered
patching xwayland instead, but it seems pretty complicated.
2018-07-08 14:12:18 +01:00
emersion 33db4263a0
surface: replace wlr_surface_set_role_committed with wlr_surface_role 2018-07-07 22:45:16 +01:00
emersion 226306ed45
surface: rename wlr_surface_state.buffer to buffer_resource 2018-07-04 19:12:18 +01:00
emersion 012e38fbe5
surface: add wlr_surface.previous 2018-07-04 19:12:18 +01:00
emersion 78555abba3
surface: move position and scale out of wlr_surface_state 2018-07-04 19:12:17 +01:00
emersion 233bfe2f4f
surface: do not monkey-patch state damage 2018-07-04 19:12:17 +01:00
emersion adf0423f7c
surface: better buffer position handling 2018-07-04 19:12:17 +01:00
emersion e6399c61b7
surface: fix WLR_SURFACE_STATE_BUFFER_DAMAGE value 2018-07-04 19:12:17 +01:00
emersion 3c0d672ebd
surface: make pending and current embedded structs 2018-07-04 19:12:17 +01:00
emersion 64836ddfe7
surface: remove wlr_surface_state.subsurface_position 2018-07-04 19:12:17 +01:00
emersion 3ee86b6105
surface: rename invalid state 2018-07-04 19:12: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
emersion dbb01cbcd0
screencopy: listen to buffer destroy 2018-06-30 22:18:04 +01:00
emersion c421700f3d
screncopy: update protocol 2018-06-30 22:18:04 +01:00
emersion bf7560b7cd
screencopy: add capture_output_region support 2018-06-30 22:18:04 +01:00
emersion 73755ad348
screencopy-v1: add basic implementation 2018-06-30 22:17:59 +01:00
Dominique Martinet c263f7ca29 s/wlr_subsurface_from_surface/wlr_subsurface_from_wlr_surface/
This was the only x_from_wlr_surface function that lacked the wlr_ prefix,
let's have an API as uniform as possible.
2018-06-30 21:21:13 +09:00
Dominique Martinet 0ced9df350 wlr_idle_inhibit_v1: add *data pointer to wlr structs 2018-06-28 20:29:44 +09:00
Dominique Martinet d0b902b962 wlr_idle: add helper to enable/disable all timers
There was no way to tell wlr_idle to stop processing input events
and rearm timers all the time, such an API is required to have
some form of idle inhibitor.
2018-06-27 22:47:05 +09:00
Drew DeVault e459fe0ec7
Merge pull request #992 from emersion/screencontent
Implement wlr_export_dmabuf_unstable_v1 protocol
2018-06-22 05:37:07 -07:00
emersion 0e3b35c87e
Merge pull request #1072 from emersion/surface-remove-matrices
surface: remove matrices
2018-06-20 21:29:17 +01:00
emersion 831b7297a4
surface: remove matrices
These were unused.
2018-06-20 21:01:35 +01:00
emersion a6c0e25d36
surface: remove wlr_frame_callback
This removes the need to allocate a structure for frame callbacks.
wl_resource_get_link is used instead.
2018-06-20 20:00:23 +01:00
emersion 57548b557a
Merge branch 'master' into screencontent 2018-06-17 14:49:18 +01:00
emersion 0378d143d9
surface: remove wlr_surface.texture
The texture is managed by the surface's wlr_buffer now. In
particular, the buffer can destroy the texture early if it becomes
invalid.
2018-06-13 19:38:10 +01:00
emersion 38d415dd20
buffer: make wlr_buffer_ref return the buffer 2018-06-11 08:13:35 +01:00
emersion 7d24af43e5
buffer: improve docs 2018-06-08 20:28:57 +01:00
emersion e4933ab445
Introduce wlr_buffer 2018-06-08 20:06:13 +01:00
emersion 32f9699359
Merge pull request #1029 from emersion/wl-backend-keyboard-focus-keys
backend/wayland: fix keyboard keys not pressed/released when focus changes
2018-06-08 00:04:33 +01:00
emersion 6f895081e1
Merge pull request #1043 from acrisci/drag-icon-unmap
drag-icon map and unmap fixes
2018-06-07 11:18:58 +01:00
Ilia Bozhinov a989104a6b xdg-shells: add a set_parent signal to toplevel surfaces 2018-06-06 17:08:06 +03:00
Tony Crisci 319ebdf476 add back map event 2018-06-05 22:50:29 -04:00
Tony Crisci 1c75d4e54a rename drag-icon map to unmap 2018-06-05 18:17:42 -04:00
emersion 78966417f4
Merge pull request #1031 from martinetd/multibind-seat
seat: allow clients to bind to seat multiple times
2018-06-04 16:44:22 +01:00
Dominique Martinet 51b9883ea0 seat: allow clients to bind to seat multiple times
This lets clients bind to a seat multiple times by re-using the existing
wlr_seat_client whenever a duplicate request happens.
Previously, an independant wlr_seat_client would be created and only
events from one would be processed.

Fixes #1023.
2018-06-04 22:31:36 +09:00
Tony Crisci 58d549c98a add data to wlr_drag_icon 2018-06-03 20:11:59 -04:00
emersion 551700e887
backend/wayland: fix keyboard keys not pressed/released when focus changes 2018-06-03 13:18:57 +01:00
Timidger 2eb8b240e1
Added data field to wlr_subsurface 2018-06-02 15:57:44 -07: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
emersion 21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
emersion 28020ff577
Only allow one modifier per DMA-BUF, split attributes struct in render/ 2018-05-30 09:29:12 +01:00
emersion 00e108f2fc
export-dmabuf: correctly finish wlr_linux_dmabuf_attribs 2018-05-29 18:47:18 +01:00
emersion e26f4dff98
export-dmabuf: wait for the frame to be ready, send timestamp 2018-05-29 18:47:17 +01:00
emersion 36bd4795d4
export-dmabuf: add basic and incomplete implementation 2018-05-29 18:47:17 +01:00
emersion 9e26808c28
output, backend/drm: add wlr_output_export_dmabuf 2018-05-29 18:45:45 +01:00
emersion e1f56538a8
Merge pull request #999 from dcz-purism/virtual-keyboard
Support virtual keyboard protocol
2018-05-29 18:22:44 +01: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
Dorota Czaplejewicz 5334ee8bfd virtual-keyboard: add support for the virtual-keyboard-v1 protocol 2018-05-28 10:05:55 +02:00
emersion 47f097e09b
xdg-shell: add wlr_xdg_toplevel_set_tiled 2018-05-27 13:38:06 +01:00
Tony Crisci 9971d06afb document key and modifier signals 2018-05-26 11:32:45 -04:00
emersion facc5aa359
xdg-shell-v6: split into separate files 2018-05-13 22:32:03 +01:00
emersion db84379242
Send axis source event 2018-05-12 13:53:21 +01:00
emersion 0b58579564
Add support for discrete axis values 2018-05-12 13:34:58 +01:00
emersion cf5013416d
xdg-output: redesign resource destroy 2018-05-11 22:30:26 +01:00
Markus Ongyerth 8931452e1d add wlr_layer_surface_surface_at
Adds wlr_layer_surface_surface_at, this is consistent with the other
shell implementations, and simplifies handling in compositors.
2018-05-08 16:03:10 +02:00
emersion 5087199d5d
output-damage: limit the number of damaged rectangles 2018-05-05 14:28:55 +01:00
Drew DeVault 57d03a3eda
Merge pull request #931 from emersion/redesign-resource-destroy
Redesign resource destruction
2018-05-04 11:48:41 -04:00
morganamilo 6305e6327f
Fix typos in comments and strings 2018-05-03 21:59:43 +01:00
emersion 5d37b14116
data-device: make sure resources are correctly destroyed 2018-05-03 20:22:51 +01:00
emersion ff4708d406
linux-dmabuf: correctly destroy resources 2018-05-03 18:45:30 +01:00
emersion 2cff6dbd63
seat: split into multiple files 2018-05-03 10:30:47 +01:00
emersion 2551ef8871
input-device: add output_name field, populate it from libinput 2018-04-29 14:30:09 +01:00
Drew DeVault a0f4903063
Merge pull request #926 from emersion/fix-x11-backend-memory-leaks
Fix some backend memory leaks
2018-04-29 08:00:59 -04:00
emersion f8e0a03451
backend/x11: correctly destroy input devices 2018-04-28 12:55:36 +01:00
emersion 6e7c0b57f6
cursor: use NAN for unspecified axes, refactor absolute warping code 2018-04-28 09:24:38 +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
Ryan Dwyer daa1ee35be Make WLR_DIRECTION enum powers of 2 2018-04-26 19:51:11 +10:00
Drew DeVault fecb971518
Merge pull request #902 from emersion/various-memory-leaks
Various memory leaks
2018-04-26 11:34:49 +02:00
Ryan Dwyer de97f90246 Fix WLR_DIRECTION enums.
Having 0 as an enum value causes wlr_output_layout_adjacent_output() to
never match WLR_DIRECTION_UP.
2018-04-26 19:09:55 +10: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 8e2f3056f8
layer-shell: fix small memory leak 2018-04-24 22:40:48 +01: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 177b548b15 Update layer shell with optional wl_output 2018-04-22 18:57:45 +02: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
Drew DeVault 4dbf7f8b88
Merge pull request #865 from martinetd/str_truncation
Fix gcc string truncation warnings
2018-04-13 08:31:09 -04:00
Dominique Martinet 555206cf60 Fix gcc string truncation warnings 2018-04-13 14:37:53 +09:00
emersion 8dec7036d0
Always unmap before destroying surface 2018-04-11 23:09:13 -04:00
emersion d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -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 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 da73b4f60b
Merge pull request #830 from swaywm/xdg-output
Add wlr_xdg_output_manager
2018-04-05 13:58:01 -04:00
Drew DeVault abfe7923c4 Add wlr_xdg_output_manager 2018-04-05 12:40:30 -04:00
Timidger 527cc702d9
Added userdata to wlr_output_layout
Needed for https://github.com/swaywm/wlroots-rs/issues/131
2018-04-05 11:47:12 -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
emersion 9b440edaf4
output: document wlr_output_set_custom_mode 2018-04-03 23:05:49 -04:00
Drew DeVault 2ecce27dd5
Merge pull request #807 from swaywm/input-inhibit
Input inhibit
2018-04-03 15:58:47 -04:00
Timidger 920ab9f108
Added user data field for wlr_cursor
This is required for wlroots-rs.
2018-04-03 15:23:37 -04:00
Drew DeVault 56deff41b6 Implement input inhibit in rootston 2018-04-03 15:09:53 -04:00
Drew DeVault ef4e833f13 Add wlr_input_inhibitor 2018-04-03 14:06:52 -04:00
emersion 58ac05c276
Merge branch 'master' into xwayland-dnd 2018-04-03 10:38:46 -04:00
Drew DeVault 333ab59902 Add wlr_surface_is_*_surface
And wlr_*_surface_from_wlr_surface
2018-04-02 20:42:02 -04:00
emersion 8836b4f024
Merge branch 'master' into xwayland-dnd 2018-04-02 15:57:04 -04:00
Tony Crisci 5a47da1ea6 annotate wlr-output-layout coord variables 2018-04-01 00:17:27 -04:00
Drew DeVault e19ee6d469 Add wlr_surface_point_accepts_input
Ref https://github.com/swaywm/sway/pull/1674
2018-03-30 23:02:11 -04:00
emersion 47a529a69c
output-damage: fix missing wlr_box include 2018-03-30 12:31:16 -04:00
emersion d5f46f4db4
data-device: redesign wlr_data_source 2018-03-29 17:53:13 -04:00
Drew DeVault 4137d9fc80 Destroy layer surfaces on client destroyed 2018-03-29 16:30:09 -04:00
emersion 743466d475
data-device: add seat.drag_source 2018-03-29 11:33:40 -04:00
emersion a316396eab
Merge pull request #720 from acrisci/xdg-positioner
xdg-positioner
2018-03-29 01:02:40 -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
emersion 2a34b154e6
xwayland: send DND_DROP 2018-03-28 15:33:23 -04:00
emersion 73394deb76
xwayland: send DND_POSITION 2018-03-28 14:16:14 -04:00
emersion 0d7a81ccdf
xwayland: send DND_ENTER 2018-03-28 12:59:11 -04:00
Drew DeVault 32bdcdf719 Address review feedback 2018-03-28 12:33:17 -04:00
Drew DeVault ac219cbda6 Remove width_mm from tablet events 2018-03-28 12:05:37 -04:00
Drew DeVault 324b9d910d Remove width_mm from wlr_touch events 2018-03-28 11:04:40 -04:00
Drew DeVault a35a5786b0 Remove width_mm from wlr_pointer events 2018-03-28 10:46:50 -04:00
Tony Crisci 41e54ba632 Merge branch 'master' into xdg-positioner 2018-03-28 00:20:39 -04:00
Tony Crisci 330ee08126
Merge pull request #744 from emersion/texture-redesign
Redesign wlr_texture
2018-03-28 00:14:57 -04:00
Drew DeVault 96a8df2f9a Fix ack configure/configure flow
Prevents FOUC/improves frame perfect rendering goal
2018-03-27 22:50:55 -04:00
Drew DeVault 52fe2688ea Address @emersion's feedback 2018-03-27 18:51:41 -04:00
Drew DeVault 86ca4bea6d Fix layer rendering/layout bugs 2018-03-27 18:50:32 -04:00
Drew DeVault d1c0e6fe2c Add layer_surface.close 2018-03-27 18:50:32 -04:00
Drew DeVault 4bf936360d Arrange & render layer surfaces 2018-03-27 18:50:09 -04:00
Drew DeVault 88eec637a4 Address feedback 2018-03-27 18:50:09 -04:00
Drew DeVault 1628730b09 Add wlr_layer_surface_configure 2018-03-27 18:50:09 -04:00
Drew DeVault b06105b564 Implement layer surface requests 2018-03-27 18:50:09 -04:00
Drew DeVault 3ba57fccd1 Wire up layer surface resources to stubs 2018-03-27 18:50:09 -04:00
Drew DeVault f29d8b55ae Initial scaffolding of layer shell 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
emersion 171e28eaff
xdg-shell: don't destroy role resources on unmap, move toplevel fields
Ports 5233801530 and
334bab543d to xdg-shell stable.
2018-03-27 10:25:02 -04:00
Drew DeVault ac715969ac Improve documentation of wlr_cursor 2018-03-27 09:24:23 -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 adf4fb08dd
Merge branch 'master' into texture-redesign 2018-03-26 19:13:13 -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
emersion 4555fc8a54
Fix damage tracking for rotated surfaces
It was broken because the damage extents were rotated about its
own center, not about the center of the surface.

This adds a new wlr_region_rotated_bounds that rotates regions.
This allows us to have only one code path (for both non-rotated
views and rotated views) and optimizes rendering for rotated
views.
2018-03-26 15:31:08 -04:00
Tony Crisci 4da18f7fc3 xdg-positioner attrs 2018-03-26 12:46:04 -04:00
emersion c63d94483b
Redesign wlr_texture
- Textures are now immutable (apart from those created from raw
  pixels), no more invalid textures
- Move all wl_drm stuff in wlr_renderer
- Most of wlr_texture fields are now private
- Remove some duplicated DMA-BUF code in the DRM backend
- Add more assertions
- Stride is now always given as bytes rather than pixels
- Drop wl_shm functions

Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-24 23:48:32 -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
emersion c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
emersion 6ecb0eefcb
render/gles2: transpose matrices before binding them
Setting glUniformMatrix3fv's transpose parameter to GL_TRUE is
not allowed for OpenGL ES 2.

This adds a wlr_matrix_transpose function.
2018-03-19 20:21:02 +01:00
Drew DeVault 1956d3cedb
Merge pull request #722 from emersion/matrix-redesign
Matrix redesign
2018-03-17 15:22:00 -04:00
Tony Crisci 09413aa7f1
Merge pull request #711 from emersion/map-unmap
Add map/unmap to xdg-shell
2018-03-17 10:00:54 -04:00
emersion 7894fca224
matrix: rename wlr_matrix_texture to wlr_matrix_projection 2018-03-15 21:26:45 +01:00
emersion e607d0f7ee
xdg-shell: add map/unmap support 2018-03-15 20:15:09 +01:00
emersion 1914a1aa2b
surface: drop wlr_surface_get_matrix 2018-03-15 18:35:22 +01:00
emersion 8b58e1a3ad
Merge branch 'master' into matrix-redesign 2018-03-15 15:48:09 +01:00
emersion 824a95ad19
matrix: use 2D matrices 2018-03-15 15:33:58 +01:00
emersion de0e40d621
Merge pull request #698 from agx/linux-dmabuf
Add initial linux_dmabuf protocol support
2018-03-15 12:45:07 +01:00
Guido Günther 14cdb6153f Add initial linux_dmabuf protocol support
Tested with

    ./weston-simple-dmabuf-drm
    ./weston-simple-dmabuf-drm --import-immediate=1
    ./weston-simple-dmabuf-drm --y-inverted=1
    (and combinations)

Supports only single plane XRGB dmabufs for now.
2018-03-15 12:40:18 +01:00
emersion d26b67cb06
matrix: unify API, don't use array pointers 2018-03-15 11:10:56 +01:00
emersion b6a3f240c7
matrix: move to types/ 2018-03-15 09:11:27 +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
Drew DeVault bfc0e95d2c Add mode support to libinput backend
And extend tablet example with tilt and ring support
2018-03-07 20:57:55 -05:00
Scott Anderson 3c9fc7c68e Add const to x11 and input interfaces 2018-03-06 21:16:18 +13:00
Tony Crisci b7b86a9591
Merge pull request #641 from Ongy/idle-inhibit
Add idle-inhibit implementation
2018-02-24 10:15:18 -05:00
Markus Ongyerth 67285c1d57 idle-inhibit: style adjustments and motivation 2018-02-23 13:18:05 +01:00
emersion b1e2718dd7
xwayland: fix some use-after-free in xwm 2018-02-23 10:20:53 +01:00
Markus Ongyerth a715826751 move activity_notify into events in wlr_idle
This moves the `struct wl_signal activity_notify` in `struct wlr_idle`
into a local `struct {} events` to keep consistency with other modules
in the library.
2018-02-22 21:14:28 +01:00
Markus Ongyerth 87a7afb641 idle-inhibit: second feedback pass 2018-02-21 16:22:04 +01:00
Markus Ongyerth 3016133f91 idle-inhibit: feedback pass 2018-02-20 13:41:10 +01:00
Tony Crisci 9a8808f8cf move direction to wlr_output_layout.h 2018-02-17 18:48:50 -05:00
Tony Crisci d2c7defa10 Merge branch 'master' into output-layout-adjacent 2018-02-17 16:34:32 -05:00
Markus Ongyerth 50d573b2ca implements the idle_inhibit protocol type
This adds the types/wlr_idle_inhibit_v1 implementation.
2018-02-17 12:37:12 +01:00
emersion 717bdccb6e
Merge remote-tracking branch 'upstream/master' into martinetd/xdg_shell 2018-02-16 18:25:58 +01:00
Tony Crisci 85871cb666 add wlr_output_layout_adjacent_output 2018-02-14 14:10:31 -05:00
Dominique Martinet 7d26a6debd xdg-shell stable: copy-pasta implementation 2018-02-14 12:52:30 +01:00
emersion 392d54a35d
Wrap wl_resource_get_user_data into safer helper functions
This ensures we're not incorrectly casting a resource.

Fixes #628
2018-02-13 23:48:46 +01:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion a9632341bf
output_damage: listen to transform and scale output events 2018-02-11 13:07:00 +01:00
emersion 5a8f098eea
output, output_damage: add docs 2018-02-11 13:04:00 +01:00
emersion ec837e3c9e
Introduce wlr_output_damage 2018-02-11 12:49:30 +01:00
emersion faa57341ca
output: replace raw GL calls by wlr_renderer_* calls 2018-02-03 10:01:42 +01:00
emersion 3d3ea32137
Merge remote-tracking branch 'upstream/master' into output-damage 2018-02-03 00:15:44 +01:00
Drew DeVault 8cf622f074 Improve xcursor docs 2018-02-01 20:30:32 -05:00
emersion 8eed857292
output: add destroy signal for wlr_output_cursor 2018-02-01 12:08:35 +01:00
emersion edb4c8d858
output: damage whole output when fullscreen surface size changes 2018-01-30 22:06:10 +01:00
emersion 704130cc11
output: fix performance issues with wlr_output_schedule_frame 2018-01-30 14:45:02 +01:00
emersion d498855b9d
backend/drm: fix hw cursor position on rotated and scaled outputs
output: add wlr_output_transformed_resolution
2018-01-30 10:23:35 +01:00
emersion 51c22d39a4
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-29 23:24:09 +01:00
Tony Crisci ed5b1fdedd
Merge pull request #580 from emersion/screenshooter-renderer-backport
Backport screenshooter fixes from the renderer redesign v1
2018-01-29 17:13:23 -05:00
emersion 7111dd79ef
rootston: damage tracking for rotated views 2018-01-27 10:43:17 +01:00
emersion 8d58ed502b
output: add wlr_output_schedule_frame 2018-01-26 22:39:23 +01:00
emersion ece2c1e4e2
Damage tracking for transformed outputs 2018-01-26 22:11:09 +01:00
emersion 6281deb90f
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-24 14:48:01 +01:00
Markus Ongyerth f946c10cb1 re-adds wlr_output_update_enabled
Re-add the wlr_output_update_enabled to make sure
wlr_output::events.enable is called when the output enabled state
changes.
2018-01-24 10:23:48 +01:00
emersion 4fa90b0511
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
2018-01-23 22:06:54 +01:00
Markus Ongyerth 3cf7225cec decouples outputenable state and wl_output global
This decouples wlr_output_enable and the wl_global.
The previously internal functions wlr_output_(destroy/create)_global are
exposed and used automatically in the wlr_output_layout to create/tear
down the global.
The compositor can handle them itself if it wants to, but I think this
is the right moment to create/destroy the wl_output when the
wlr_output_layout is used.
2018-01-23 17:40:12 +01:00
emersion 4d282c8590
rootston: damage tracking for drag icons 2018-01-23 13:37:58 +01:00
emersion 3f1c4f5be7
rootston: damage tracking for wl_shell 2018-01-22 16:01:32 +01:00
emersion 59c53e8333
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-21 22:18:06 +01:00
emersion 66ae4071a7
rootston: damage tracking for xdg popups 2018-01-21 21:06:37 +01:00
emersion eeffe11337
surface: add wlr_surface new_subsurface and wlr_subsurface destroy events 2018-01-21 14:22:33 +01:00
emersion c6aab6f56c
Add docs and comments 2018-01-21 11:11:25 +01:00
emersion 0365b587f0
output: add damage tracking via buffer age 2018-01-21 00:06:35 +01:00
emersion 4ca38b84ed
backend/drm: fix hardware cursors not moving
This adds back `wlr_output::needs_swap`. This allows a backend to
request buffer swaps even if the output isn't damaged. This is
needed by the DRM backend to trigger pageflips when the cursor
moves.
2018-01-20 16:43:14 +01:00
emersion e29a0df8c1
output: fix software cursors damage tracking 2018-01-19 14:08:47 +01:00
emersion a0f24b809e
output: add damage event 2018-01-19 13:13:46 +01:00
emersion 443bd4cd89
output: fullscreen surface damage tracking 2018-01-19 11:20:27 +01:00
emersion bde255933e
output: add wlr_output::damage, fixes #572 2018-01-18 19:47:21 +01:00
Tony Crisci b6f29e87e8 dont use pointer for modifiers 2018-01-17 08:31:15 -05:00
Tony Crisci 43896af90f Merge branch 'master' into modifier-fixes 2018-01-17 08:27:47 -05:00
Drew DeVault b331c5c2c5
Merge pull request #549 from emersion/output-enabled
Add wlr_output::enabled
2018-01-15 20:53:13 -05:00
Heghedus Razvan 21cc5e6fef Add idle protocol
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-01-10 14:32:41 +02:00
Tony Crisci b40a5f084a keyboard grab enter with modifiers 2018-01-06 11:06:09 -05:00
emersion 8ebd7d4dbe
output: rename resolution event to mode 2018-01-06 12:42:32 +01:00
Tony Crisci 0ef2df21f2 compositor modifier hook 2018-01-05 07:00:50 -05:00
emersion d9ecfbaf32
Add wlr_output enable event 2018-01-04 14:51:36 +01:00
emersion 771263380c
Add wlr_output::enabled 2018-01-04 12:46:15 +01:00
Tony Crisci ce3a48c316
Merge pull request #542 from emersion/abstract-data-source
Abstract data sources
2018-01-04 06:15:17 -05:00
Drew DeVault b23bd8ea28
Merge pull request #544 from emersion/fix-views-outside-output-layout
Fix views outside output layout
2018-01-01 11:45:08 -05:00
emersion 9ac9ba861f
Free fullscreen surface and cursors when destroying output 2017-12-31 13:00:35 +01:00
emersion 1fe1d64042
Fix views outside output layout 2017-12-31 12:49:06 +01:00
emersion 38ed3b4245
seat: rename selection_source to selection_data_source, remove unused data_device 2017-12-30 09:58:04 +01:00
emersion b20aed66d6
Abstract wlr_primary_selection_source 2017-12-29 23:23:00 +01:00
emersion f237b5c7a7
Make wlr_data_source abstract.
This removes some fields specific to sources coming from clients.

This adds some drag'n'drop-related callbacks.
2017-12-29 22:51:33 +01:00
Dominique Martinet 58488ec5ce wlr_seat: add destroy signal 2017-12-29 17:55:03 +01:00
Tony Crisci e8b810ce3e keep track of number of keycodes pressed 2017-12-27 18:58:43 -05:00
Tony Crisci 815d71a3aa validate grab serial for shell events 2017-12-27 08:04:01 -05:00
emersion a79dc7df51
Merge pull request #524 from acrisci/role-committed
[wip] Role committed
2017-12-27 13:02:49 +01:00
Tony Crisci e42d762a88 drag-icon: surface committed 2017-12-27 06:41:14 -05:00
Tony Crisci 68328700c7 wl-shell: role committed 2017-12-27 06:32:54 -05:00
Tony Crisci e809250171
Merge pull request #519 from emersion/xwayland-primary-selection
Implement xwayland primary selection sync
2017-12-27 06:23:04 -05:00
Tony Crisci d5ffa26564 xdg-shell: role-committed func 2017-12-27 06:15:25 -05:00
Tony Crisci 5a18f62fee add role-committed hook 2017-12-27 06:06:29 -05:00
emersion 43435d4915
Add output transform helpers docs 2017-12-27 11:17:25 +01:00
emersion e737f65e38
Fix cursor on transformed output with DRM backend 2017-12-26 18:16:37 +01:00
emersion 4a11609b76
Fix use-after-free when destroying selection sources 2017-12-25 18:18:26 +01:00
emersion 6dffaa7bb7
Implement xwayland primary selection sync 2017-12-25 16:10:16 +01:00