Commit Graph

1783 Commits

Author SHA1 Message Date
Tony Crisci 0dc3aecfd4 refactor device mapping calculation 2017-08-27 20:10:46 -04:00
Tony Crisci 5e06d61e42 implement touch up and touch down 2017-08-27 17:35:12 -04:00
Tony Crisci ed126b0881 add touch events 2017-08-27 11:34:25 -04:00
Tony Crisci ac503a47a7 intersect cursor and device regions 2017-08-26 11:55:24 -04:00
Tony Crisci 0a97b68278 implement cursor and device geometry mapping 2017-08-26 08:32:11 -04:00
Tony Crisci 98f4cdfccb implement wlr_cursor_map_input_to_output 2017-08-26 08:32:11 -04:00
Tony Crisci 13e895d943 implement wlr_cursor_map_to_output 2017-08-26 08:32:11 -04:00
Tony Crisci a4810203cc change output layout coords to double type 2017-08-26 08:32:11 -04:00
Tony Crisci f69a7afd36 assert cursor layout for move and warp functions 2017-08-26 08:32:11 -04:00
Tony Crisci 0cba06dcef implement wlr_cursor_warp 2017-08-26 08:32:11 -04:00
Tony Crisci dd68f680e4 handle cursor to output edge cases 2017-08-26 08:32:11 -04:00
Tony Crisci 431e1ddeca smooth pointer transitioning between outputs 2017-08-26 08:32:11 -04:00
Tony Crisci 9978349903 use safe for_each when freeing cursor devices 2017-08-26 08:32:11 -04:00
Tony Crisci e3d47376dc add wlr_cursor basic implementation 2017-08-26 08:32:11 -04:00
Dominique Martinet 3391e5b634 xwayland: fix style issues 2017-08-23 22:03:49 +02:00
Dominique Martinet ea906ea3e2 wlr surface/shell types: add message on creation
Not sure if we really want to keep that, would be helpful to get more
logging levels at some point
2017-08-23 22:03:49 +02:00
Dominique Martinet 3cc5b1acc6 wlr_compositor: add signal for create_surface 2017-08-23 22:03:49 +02:00
Dominique Martinet ee3c5c7fef wlr_seat: fix destroy with multiple handles
Need to use for_each_safe because wl_resource_destroy's callback will
remove the handle from the list itself
2017-08-21 07:59:08 +02:00
Dominique Martinet 1ca08dc4cb wlr_compositor: change _init/finish to _create/destroy 2017-08-19 23:17:39 +02:00
Dominique Martinet 4110788159 move wl_compositor into wlroots as wlr_compositor 2017-08-19 21:56:51 +02:00
Dominique Martinet 84c0c87a5d wlr_surface: change update_size/damage to bool 2017-08-19 14:37:57 +02:00
Dominique Martinet 4da976bfad wlr_surface: small refactoring
- split surface damage and buffer damage
 - the pending buffers are always valid, so can be 'fini'shed
 - consider opaque buffer and input buffer in commit, just to free
 - only update size if scale/transform/buffer changed
2017-08-19 09:31:06 +02:00
Dominique Martinet 03b29eb32c wlr region/surface: explicitely select interface fields 2017-08-19 09:31:06 +02:00
Dominique Martinet fc1a851415 wlr_surface: clear/fini buffers when appropriate 2017-08-19 09:31:06 +02:00
Dominique Martinet f24b3df980 wlr renderer/texture: rename init to create when it does alloc 2017-08-19 08:33:31 +02:00
Drew DeVault a1551bccc0 Merge pull request #107 from nyorain/wlr_data_device_manager
Implement wlr_data_{source,device,device_manager}
2017-08-18 14:05:51 -04:00
nyorain f2a9098691 Fix wlr_data_device_manager 2017-08-18 19:58:36 +02:00
Dominique Martinet bb3b9d0156 wlr_surface: use post_event instead of queue
This fixes not sending anything back to the client if the only event
it's waiting for is a buffer release, and nothing else is in the pipe.

Workaround for #102 - there probably is a better solution as weston and
wlc do not need to use post_event here.
2017-08-18 19:38:11 +02:00
nyorain 154d2ad941 Fix data_device destruction 2017-08-18 19:12:31 +02:00
nyorain 86314caa5b Implement wlr_data_{source,device,device_manager} 2017-08-18 18:56:21 +02:00
Tony Crisci c6631e2140 Fix wild pointer to buffer
After the buffer is released from the release event, it should no longer be
accessed.

Fixes a GTK crash.
2017-08-18 12:41:42 -04:00
Drew DeVault e5fd858394 Merge pull request #101 from nyorain/texture_fix
Fix surface buffer uploading
2017-08-18 10:16:45 -04:00
Dominique Martinet 978f935947 output: default scale to 1
This prevents us from telling application our scale is 0, when it has no
reason to be.
2017-08-18 16:01:40 +02:00
Drew DeVault 3138c5ddf0 Clean up wlr_output_layout 2017-08-17 21:06:28 -04:00
Tony Crisci 5a9baf487e add helper methods for intersection 2017-08-17 21:05:13 -04:00
Tony Crisci 420bd3e422 bugfix: correctly get the output_layout 2017-08-17 21:05:13 -04:00
Tony Crisci 2e9e237f9d layout-output example: handle empty config 2017-08-17 21:05:13 -04:00
Tony Crisci 44181b57ac Add wlr_output_layout implementation
An output layout consists of a mapping of outputs to their position in a global
coordinate system that usually cooresponds to the output position in physical
space in front of the user.

Add an example that allows configuration of an output layout and demonstrates
its boundaries with a bouncing image.
2017-08-17 21:05:13 -04:00
nyorain 10eee58d2d Fix surface buffer uploading 2017-08-17 17:50:09 +02:00
nyorain 2db04c369e Fix style issues in wlr_seat 2017-08-17 14:14:31 +02:00
nyorain ad22b4874d Fix wlr_seat; add to example compositor 2017-08-17 13:06:53 +02:00
Drew DeVault af5db7a44c Initial pass on wlr_seat 2017-08-17 12:57:04 +02:00
Drew DeVault 19d6442f52 Merge pull request #91 from martinetd/move_wl_shell
Move wl_shell into wlroots
2017-08-15 17:39:18 -04:00
Drew DeVault 27c13d621d Merge pull request #88 from 4e554c4c/alloc_crashing
Prevent alloc errors from crashing
2017-08-15 12:21:58 -04:00
Dominique Martinet dca3f630dd Fix wlr_wl/xdg_shell_destroy segfault
- Implement xdg_shell_destroy and use it at the right place
(impl->destroy is never called)
- Remove wl_global_destroy for now, something is missing with the
display/registry_resource_list
2017-08-15 15:52:20 +02:00
Dominique Martinet f9b55dfa95 Make wlr_wl_shell_create work like xdg
Also:
- rename wlr_xdg_shell_v6_init to create as that is what it does
- free wlr_xdg_shell on failure to create wl_global, the struct
is not initialized enough to call destroy at that point
2017-08-15 15:36:02 +02:00
Dominique Martinet d49edc8243 wl_shell/compositor surface: do not check if it's in list before removing 2017-08-15 15:34:26 +02:00
Dominique Martinet 5dae8e1be8 example compositor: only iterate over wl_shell and xdg_shell surfaces 2017-08-15 15:34:26 +02:00
Dominique Martinet f4e6b138fb Move wl_shell into wlroots 2017-08-15 15:13:23 +02:00
Drew DeVault f60b53c6e3 Change how surface matricies are calculated 2017-08-15 08:52:30 -04:00
Tony Crisci d5f98dbf61 refactor getting surface size into a function 2017-08-15 08:22:22 -04:00
Tony Crisci 2bf2dbb2bd formatting fixup 2017-08-15 07:41:25 -04:00
Tony Crisci 5b1ce84350 implement buffer transform 2017-08-15 07:36:51 -04:00
Tony Crisci 84c6dbd58d remove unused dimension from buffer calculations 2017-08-15 07:36:51 -04:00
Tony Crisci e46ec57b43 implement surface sizing 2017-08-15 07:36:51 -04:00
Tony Crisci b49650b555 initialize buffer damage before conversion 2017-08-15 07:36:50 -04:00
Tony Crisci d87c58416b clip surface damage to surface size 2017-08-15 07:36:50 -04:00
Tony Crisci 72a33b736f implement texture get buffer size 2017-08-15 07:36:50 -04:00
Tony Crisci f0f190bfa5 implement buffer scale
Keep track of the scale of the buffer set by surface.set_buffer_scale.

Calculate the height and width of the texture from the buffer depending on the
scale when it is attached.

Use buffer damage to determine the damage of the buffer when flushing damage.

Convert surface damage to buffer damage and union to the surface buffer_damage
prior to flushing damage.
2017-08-15 07:36:50 -04:00
Tony Crisci e22e443717 fix formatting in surface_damage 2017-08-15 07:36:50 -04:00
Tony Crisci 0b3d56384f implement surface_damage_buffer 2017-08-15 07:36:17 -04:00
nyorain 7d0bf9a1a7 Simplify tablet pad destruction 2017-08-15 12:16:23 +02:00
Calvin Lee 5cc7342606 Prevent alloc errors from crashing
Resolves #76
2017-08-15 08:04:57 +02:00
nyorain aa20634309 Simplify input device destruction code 2017-08-14 18:23:20 +02:00
nyorain f998bb8299 Fix style issues 2017-08-14 17:09:56 +02:00
Dominique Martinet 4bbf718e7d impl->destroy cleanup:
- remove trivial destroy() function
 - make sure we check impl and impl->destroy before calling
 - always call free if not implemented
2017-08-14 16:22:31 +02:00
Dominique Martinet ba20d5b3ca Refactor out wlr_touch_state 2017-08-14 16:22:31 +02:00
Dominique Martinet bd67849c03 Refactor out wlr_tablet_tool_state 2017-08-14 16:22:31 +02:00
Dominique Martinet a289940bff Refactor out wlr_tablet_pad_state 2017-08-14 16:22:31 +02:00
Dominique Martinet 53e7bebd23 Refactor out wlr_pointer_state 2017-08-14 16:22:31 +02:00
Dominique Martinet 0a3246ad97 Refactor out wlr_keyboard_state 2017-08-14 16:22:31 +02:00
Dominique Martinet e6ad67911b Refactor out wlr_input_device_state 2017-08-14 16:22:31 +02:00
Dominique Martinet db77530a35 Fix output destory: impl->destroy must be called last + obvious double-free 2017-08-14 15:05:45 +02:00
Drew DeVault 2facf1df65 Fix software cursors 2017-08-14 08:43:17 -04:00
Drew DeVault 0de5eed048 Fix double free on wlr_outputs 2017-08-14 08:37:44 -04:00
Drew DeVault 41e735242d Remove wlr_output_state, update backends 2017-08-13 11:38:03 -04:00
Drew DeVault d4b4bfb8bc Fix #64 2017-08-13 08:26:32 -04:00
Dominique Martinet 0354aaeff2 Complete a few destroy functions
This adds missing free calls for:
 - drm outputs
 - libinput backend in general
 - final udev free
 - output mode state
2017-08-11 19:17:03 +02:00
Drew DeVault 62d8b252c0 Refactor meson and move xdg-shell into wlroots 2017-08-11 09:37:09 -04:00
Drew DeVault 6569c2b626 Merge pull request #53 from nyorain/drm_buffer
Implement drm (egl) buffer attaching
2017-08-10 22:20:21 -04:00
Drew DeVault c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04:00
Scott Anderson 5465621d0a Update rotation matrix correctly. Fixes #60. 2017-08-11 09:29:28 +12:00
Drew DeVault 7095274a9e Merge branch 'master' into drm_buffer 2017-08-10 13:19:39 -04:00
Tony Crisci 73adb49f15 release buffer on surface flush when no damage 2017-08-10 11:12:33 -04:00
Drew DeVault 888986b038 Remove excess logging 2017-08-10 08:36:45 -04:00
Drew DeVault 7da43ff8b0 Implement wlr_surface_flush_damage 2017-08-10 08:26:16 -04:00
nyorain 31d78ff497 Fix wlr_surface destruction bug 2017-08-10 12:42:35 +02:00
Tony Crisci 14654ecb77 implement compositor create region
Complete the implementation of wlr_region_create and put it in the compositor.
2017-08-10 05:59:43 -04:00
nyorain 67369173aa Implement drm (egl) buffer attaching 2017-08-10 10:59:58 +02:00
Drew DeVault 750d0ad458 Flesh out wlr_surface state lifecycle a bit
Sprinked some TODOs around for future work
2017-08-09 23:34:50 -04:00
Drew DeVault 4de930542f Implement partial texture uploads 2017-08-09 22:17:40 -04:00
Drew DeVault 4dfc6460f3 Style fixes 2017-08-09 17:52:02 -04:00
Tony Crisci 8306f46dfb implement surface frame
The surface frame callback lets a window know when it is a good time to show the
next frame if it is animating. In particular, this callback is used by
weston-simple-shm to throttle drawing.
2017-08-09 17:31:38 -04:00
Tony Crisci 87fe13a9fa release shm buffer after uploading 2017-08-09 17:31:38 -04:00
nyorain fb58307a50 Fix surface destruction 2017-08-09 17:27:12 +02:00
nyorain cf9ee6ce3f Move wlr_surface into wlr 2017-08-09 17:27:12 +02:00
nyorain 1bea754521 Implement wlr_region using pixman 2017-08-09 17:05:55 +02:00
nyorain e167f41fde Rename wlr_surface -> wlr_texture; attach -> upload 2017-08-08 18:25:16 +02:00
Scott Anderson afd058b754 Fix software cursor. Fixes #45 2017-08-08 20:22:26 +12:00
Scott Anderson 1db97a9af9 Updated DRM cursor rendering 2017-08-06 21:38:40 +12:00
Scott Anderson aedfa27d3a Clean up resources when plane is reassigned 2017-08-06 15:54:38 +12:00
nyorain fdab81e1c9 Use meson build system 2017-08-05 22:34:24 +02:00
Tony Crisci a43016b8e2 bugfix: fix cursor software rendering fallback
wlr_surface_attach_pixels() expects a wl_shm_format but a GL format was
given. This caused a bug where software rendering of the cursor would
fail when no pixel format can be found.
2017-07-24 16:34:40 -04:00
Drew DeVault b08aa9fd35 Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021, reversing
changes made to 8189c64d7f.
2017-07-11 22:16:56 -04:00
Scott Anderson a2ba226ba3 Use subdir 2017-07-11 09:56:54 +12:00
Scott Anderson 924bf0f669 Changed build system to meson 2017-07-11 00:28:56 +12:00
Drew DeVault 8920b5d607 Merge branch 'wlcore' 2017-06-29 16:00:24 -04:00
Drew DeVault f5b7bc033e Add wlr_wl_compositor and remove wlr_wl_shm 2017-06-26 10:26:55 -04:00
Scott Anderson 0cd94f0cf0 Added software cursor fallback 2017-06-26 17:34:15 +12:00
Drew DeVault 168f0955ab Add wl_output globals for wlr_outputs 2017-06-22 14:27:35 -04:00
Drew DeVault bb16025318 Fix issues with projection on drm backend 2017-06-22 11:19:46 -04:00
Drew DeVault f4453d104d Reorganize wlr-common 2017-06-21 12:10:07 -04:00
Drew DeVault fd91244e83 Update everyone to use new headers 2017-06-21 10:27:45 -04:00
Drew DeVault b9d36c8149 Add dynamic output resizing for Wayland backend
This allows outputs to:
- Not support modesetting
- Resize themselves
2017-06-20 17:51:45 -04:00
Drew DeVault 632a04f1b7 Implement keyboard LEDs 2017-06-19 15:15:37 -04:00
Drew DeVault ecb04afcad Implement tablet pads 2017-06-19 14:49:07 -04:00
Drew DeVault 7e038a6110 Add (broken) DRM hardware cursors 2017-06-16 15:38:34 -04:00
Drew DeVault 4a9966b1a4 Implement wlr_tablet_tool 2017-06-15 14:32:53 -04:00
Drew DeVault 3f24f8a1be Flesh out touch events and add demo 2017-06-14 14:50:09 -04:00
Drew DeVault d6905f86cb Allocate wlr_touch devices 2017-06-14 11:40:03 -04:00
Drew DeVault a63230e59c Implement libinput wlr_pointer 2017-06-13 11:05:45 -04:00
Drew DeVault 5dd96c0772 Incorporate XKBCommon into example 2017-06-13 08:10:36 -04:00
Drew DeVault 7a5f35b5bb Reassign ownership of libinput handle 2017-06-13 08:10:36 -04:00
Drew DeVault 0e75d157f5 Initialize keyboards from libinput 2017-06-13 08:10:36 -04:00
Drew DeVault fc1dc1b5b0 Use constant VBO for quad, add matrix stuff 2017-06-07 21:35:07 -04:00
Drew DeVault cda12a3eda Add texture, use index buffer, tweak matricies 2017-06-07 11:06:14 -04:00
Scott Anderson 382f712792 Merge remote-tracking branch 'upstream/master' into rotation 2017-06-08 00:52:33 +12:00
Scott Anderson 632a7acb03 Filled out more wlr_output fields. 2017-06-08 00:39:40 +12:00
Scott Anderson 53dd622263 Provide user with transformation matrix 2017-06-07 16:43:57 +12:00
Drew DeVault 6f5c70ac69 Let backend track transform state
This will be necessary to provide it to clients via wl_output.
2017-06-06 11:48:30 -04:00
Drew DeVault e2ee67125e s/wayland.h/types.h/g 2017-05-31 16:24:32 -04:00
Drew DeVault c7f6981d9c Clean up outputs on exit 2017-05-31 16:17:04 -04:00
Drew DeVault 579909a368 Promote types to a standalone subproject 2017-05-31 15:43:13 -04:00