Commit graph

4478 commits

Author SHA1 Message Date
sghctoma
3b2b8c1844 Merge remote-tracking branch 'upstream/master' into fix-freebsd-direct-session 2018-09-02 18:32:31 +02:00
random human
7bc2657984
Free unused pointer in x11/backend.c 2018-09-02 20:52:09 +05:30
emersion
95d05acda5 backend/drm: fix invalid VLA size in scan_drm_connectors
I failed to see this issue with Valgrind because of the +1.
2018-09-02 10:11:23 +02:00
emersion
2f0815838d Init dmabuf global in renderer 2018-09-02 08:50:43 +02:00
Ryan Dwyer
60a174eb11 xwayland: Introduce request_activate event 2018-09-02 08:50:17 +02:00
Ryan Dwyer
69a5279f79 xwayland: Add WM_STATE modal property
Adds a modal property to indicate whether the surface wants to be a
modal.
2018-09-02 08:50:04 +02:00
Drew DeVault
a0bf3f150e
Merge pull request #1220 from emersion/grouped-new-output
backend/drm: emit new_output after scanning connectors
2018-09-01 20:19:36 -04:00
emersion
ef88df2142 backend/drm: emit new_output after scanning connectors
This prevents receiving modesetting requests from the compositor
while we don't have the whole picture (ie. while we haven't yet
scanned all connectors).

This also makes connectors without CRTCs disabled (they can't be
enabled yet even if some CRTCs are free'd -- this is future work).
2018-09-02 01:03:20 +02:00
Drew DeVault
c3752aa307
Merge pull request #1219 from emersion/disable-when-needs-modeset
backend/drm: allow disabling outputs in NEEDS_MODESET state
2018-09-01 18:01:59 -04:00
emersion
e84f01168d backend/drm: allow disabling outputs in NEEDS_MODESET state
This correctly frees CRTCs when disabling outputs without setting
a mode.
2018-09-01 23:43:16 +02:00
Drew DeVault
cc3c5ebb67
Merge pull request #1215 from emersion/disabled-no-modeset
Do not modeset disabled outputs
2018-09-01 13:01:06 -04:00
emersion
472476ebcf Do not modeset disabled outputs 2018-09-01 18:30:41 +02:00
random human
e44ab5d584
Add function wlr_log_get_verbosity()
Returns the verbosity passed to wlr_log_init().
2018-09-01 21:03:52 +05:30
Ryan Dwyer
bf670b84c4
Merge pull request #1211 from aereaux/aereaux-patch-1
Fix uninitialized value in wlr_cursor.
2018-09-01 09:53:29 +10:00
Aidan Epstein
e334b46b39
Fix uninitialized value in wlr_cursor. 2018-08-31 23:36:38 +00:00
Drew DeVault
2ddabacacf
Merge pull request #1210 from ammen99/fix-include
add missing wlr_box.h include in wlr_screencopy_v1.h
2018-08-31 14:00:35 -04:00
Ilia Bozhinov
62539e265e add missing wlr_box.h include in wlr_screencopy_v1.h 2018-08-31 20:48:38 +03:00
random human
6014ee50b3 Add clang's static analyzer to build.yml 2018-08-31 19:41:18 +02: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
Drew DeVault
2f48453718
Merge pull request #1208 from arandomhuman/master
Fixes examples/dmabuf-capture being built with unmet dependencies
2018-08-30 14:29:13 -04:00
random human
660a022909
Fixes examples/dmabuf-capture being built with unmet dependencies
Even if the libav* variables were disabler objects, the build targer
dmabuf-capture was being built. Modified the script to support a generic
solution.
2018-08-30 22:23:28 +05:30
sghctoma
2bd6fbf20e Fix that major(st_rdev) have no meaning on FreeBSD
The major device number does not indicate the device type on FreeBSD,
and AFAIK the only way to differentiate between DRM, input, and other
devices is checking the fd path. This commit implements that.

The drmDropmaster and drmSetmaster calls are necessary, because the
implicit drop (that should occur when the DRM fd is closed) seems not
to be working in some scenarios (e.g. if you have a tmux session
running - maybe the fd is retained somehow by tmux?). This is a
problem, because once you exit the compositor, you can't start it (or
any other program that wants to be DRM master) again until you close
all your tmux sessions.
2018-08-30 11:15:39 +02:00
Drew DeVault
633663cdde Use legacy modesetting for gamma control
It doesn't look like there's any motion on a fix from the AMDGPU side,
and using the legacy interface for this isn't so bad.
2018-08-29 23:05:38 +02:00
Brian Ashworth
939a4ea60f
Merge pull request #1196 from dcz-purism/surface_move
rootston/surface_layers: fix clicking after surface moved
2018-08-28 22:15:50 -04:00
Drew DeVault
d11dac6a64
Merge pull request #1202 from alexbakker/destroy-signal-fix
Init the new destroy signals added by #1200
2018-08-27 12:41:10 -04:00
Alexander Bakker
221d412824 Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02:00
Drew DeVault
792f98c2f0
Merge pull request #1200 from alexbakker/destroy-signal
Add destroy signals to types that are destroyed by wl_display_destroy
2018-08-27 08:16:49 -04: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
Drew DeVault
6025fcaa09 Update required meson version to 0.47.1 2018-08-24 09:20:25 -04:00
Drew DeVault
8ecf9224f5
Merge pull request #1198 from ascent12/meson_feature
Fix meson changes
2018-08-24 08:19:10 -04:00
Scott Anderson
dc37194291 Change how glgen.sh outputs files
This fixes building wlroots as a subproject.
2018-08-24 19:35:21 +12: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
Drew DeVault
dea311992e
Merge pull request #1194 from ascent12/meson_feature
Build system changes
2018-08-23 20:41:07 -04:00
Dorota Czaplejewicz
f4ae9824f7 rootston/layer_shell: fix clicking after surface moved/resized
Layer surfaces are not notified of cursor position changes if the surface moves, only if the cursor moves. This workaround emits a cursor position event every time a cursor ends up over a newly resized layer surface to make sure the following clicks land in the right place.

This change doesn't address sending leave events when a cursor previously present over the surface becomes away.

There are 2 separate mechanisms in play, because a layer surface gets resized in 2 steps:

1. Layer surface resize & rearrange.
2. Underlying surface resize.

The first step may affect all layer surfaces. The cursor events are sent to cursors placed over all layer surfaces which have moved (not been resized). The second step affects any layer surface whose surface changed size. The cursor event is sent only to that surface.

Together, these events cover all surfaces: those which moves, and those which changed size, as long as each layer surface resize is accompanied by an immediate surface resize.
2018-08-23 11:29:03 +02:00
Scott Anderson
39ac21401f Replace generator with custom_target
This stops the protocol header constantly being regenerated for every
target using them.
2018-08-23 14:21:41 +12:00
Scott Anderson
f41c411980 Use input file for configure_file
This is so we can potentially add comments to it, and so if a user looks
at the installed header, they can see the /* #undef WLR_HAS_FEATURE */
line to see every option, even if not available.
2018-08-23 14:19:59 +12:00
Scott Anderson
653ea512c2 Use current_source_dir instead of source_root
This is so that log messages are printed properly when wlroots is build
as a subproject.
2018-08-23 14:19:59 +12:00
Scott Anderson
b1ed61b649 Use pkg-config to find wayland-scanner 2018-08-23 14:19:56 +12: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
Scott Anderson
51892e0d74 Install headers explicitly 2018-08-22 21:16:16 +12:00
Scott Anderson
a2bbf2c1f7 Make style more consistent 2018-08-22 21:16:16 +12:00
Scott Anderson
869dca1bce Remove unnecessary project arguments
Meson handles rpath properly, and we don't need to use -I ourselves by
using include_directories with '.'.
2018-08-22 21:16:16 +12:00
Scott Anderson
1358d80ab9 Add link dependency on symbols file
So the library is rebuilt properly when it's updated.
2018-08-22 21:16:16 +12:00
Scott Anderson
584a3f8b6e Update examples to use new option
We use a dictionary to remove some code duplication.
2018-08-22 21:15:34 +12:00
Scott Anderson
560e96aa57 Update rootston to use new option 2018-08-22 20:41:25 +12:00
Scott Anderson
784c20c82f Use new options for X11 backend and Xwayland 2018-08-22 20:27:37 +12:00