Commit graph

1020 commits

Author SHA1 Message Date
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
emersion
017cfb0b86 backend/drm: log when de-allocating CRTC 2018-09-04 19:44:44 +02:00
emersion
d22431d969
Merge pull request #1228 from arandomhuman/misc-mem
Miscellaneous memory leak fixes
2018-09-03 08:26:59 +02:00
random human
9f511ae942
Remove listener link after tablet_manager destroy 2018-09-03 05:05:18 +05:30
random human
568b0ffe2c
Call wl_global_create first in case of failure 2018-09-03 02:43:55 +05:30
cnt0
6946134883 fix incorrect NULL check 2018-09-02 20:48:18 +02:00
Aidan Epstein
e334b46b39
Fix uninitialized value in wlr_cursor. 2018-08-31 23:36:38 +00:00
random human
8589ae19de Fix bugs listed by clang's static analyzer
A few pedantic changes and unused variables (1-4), and genuine bugs (5,
6).

The reports with the corresponding files and lines numbers are as
follows.

1. backend/libinput/tablet_pad.c@31,44,57
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'unsigned int',
which is incompatible with sizeof operand type 'int'"

2. types/tablet_v2/wlr_tablet_v2_pad.c@371
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'uint32_t', which
is incompatible with sizeof operand type 'int'"

3. types/wlr_cursor.c@335
"Dead initialization"
"Value stored to 'dx'/'dy' during its initialization is never read"

4. rootston/xdg_shell.c@510
"Dead initialization"
"Value stored to 'desktop' during its initialization is never read"

5. types/tablet_v2/wlr_tablet_v2_pad.c@475
"Dereference of null pointer"
"Access to field 'strips' results in a dereference of a null pointer
(loaded from field 'current_client')"

The boolean logic was incorrect (c.f. the check in the following
function).

6. examples/idle.c@163,174,182
"Uninitialized argument value"
"1st function call argument is an uninitialized value"

If close_timeout != 0, but simulate_activity_timeout >= close_timeout,
the program would segfault at pthread_cancel(t1).
2018-08-31 19:41:18 +02:00
Alexander Bakker
221d412824 Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02: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
Dorota Czaplejewicz
6db9c4b746 wlr_virtual_keyboard: use wlr_input_device_destroy 2018-08-22 14:43:29 +01:00
Dorota Czaplejewicz
2929f0f8dd wlr_input_device: fix keyboard destruction
After destroying a keyboard input device, seat's listeners could still be pointing to destroyed wlr_input_device signals. This patch makes sure the references are removed while the input device is being destroyed.
2018-08-22 14:43:29 +01:00
emersion
f86f1daf9a Fix build on FreeBSD 2018-08-16 10:54:45 +01:00
emersion
c4522062f6 xdg-output: fix segfault in handle_layout_destroy 2018-08-03 14:03:53 +01:00
Scott Anderson
eb9c9d8852
Merge pull request #1173 from sdilts/add-missing-libinput
Add missing dependency libinput to types/meson.build
2018-08-03 14:58:22 +12:00
sdilts
c95078320c Add missing dependency libinput to types/meson.build
The file `types/tablet_v2/wlr_tablet_v2.c` includes <libinput.h>.
Without this change, libinput.h  may not be found on
some systems.
2018-08-02 20:13:48 -06:00
emersion
c3afe4f42e gamma-control-v1: improve error handling 2018-08-02 23:33:59 +01:00
emersion
bbd0fbe573 gamma-control-v1: fix fds not closed 2018-08-02 23:33:59 +01:00
emersion
1705316fa7 gamma-control-v1: set O_NONBLOCK, improve error handling style 2018-08-02 23:33:59 +01:00
emersion
73b7111846 gamma-control-v1: reset gamma table when control is destroyed 2018-08-02 23:33:59 +01:00
emersion
6e8892d4d7 gamma-control-v1: don't insert control in the list before checking unicity 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
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
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
4b096fc114 Revert "Merge pull request #1153 from emersion/include-config"
This reverts commit ef0a6ea4d2, reversing
changes made to 8d03bc9178.
2018-07-21 09:44:20 -04:00
emersion
41094a7df5 Always include config.h 2018-07-21 13:08:23 +01: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
emersion
4afd69bbe7 Remove unused types/wlr_tablet_v2.c 2018-07-17 11:14:43 +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
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
74ca2f8fcf Another round of feedback from acrisci 2018-07-14 09:52:34 +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
101080a382 Another feedback pass 2018-07-14 09:48:57 +02:00
Markus Ongyerth
6b51f3b57a use previous resource versions and destroy pads 2018-07-14 09:48:57 +02:00
Markus Ongyerth
503f9d6e52 emersion feedback
Introduce TABLET_MANAGER_VERSION and remove the wlr_tablet_tool_tool.c
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
88a4b908d1 Hide pad auxiliary data in .c file 2018-07-14 09:48:57 +02:00
Markus Ongyerth
fa39fd178d Split tablet_v2 implementation for easier maintainance 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
6a40561e4c Fix clang build errors 2018-07-14 09:47:16 +02:00
Markus Ongyerth
2155c976f6 Improve inert resource handling 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