Commit Graph

3042 Commits

Author SHA1 Message Date
emersion 085142ba34
Merge pull request #1232 from nyorain/fix/dnd-offset
Fix #1129
2018-09-07 15:22:16 +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
Drew DeVault 8898f3199a
Merge pull request #1229 from emersion/drm-hotplug-fixes
backend/drm: better hotplug handling
2018-09-05 09:35:20 -04:00
Drew DeVault 04c39a0719
Merge pull request #1231 from ascent12/editorconfig
Remove indent_size from .editorconfig
2018-09-05 09:34:44 -04:00
Scott Anderson 2d29cebe5f Remove indent_size from .editorconfig
Some of us like to use different indent sizes.
2018-09-05 11:59:38 +12:00
emersion 8a6bdc193d backend/drm: damage outputs when switching CRTCs 2018-09-04 23:10:37 +02:00
emersion 1342393632 backend/drm: cosmetic enhancements 2018-09-04 23:08:45 +02:00
emersion 5b13b8a12c backend/drm: consider continue not using resources
Fixes #1230
2018-09-04 22:57:09 +02:00
emersion fb94f03b43 backend/drm: prevent use of uninitialized data 2018-09-04 22:50:59 +02:00
emersion d605b2ea07 backend/drm: remove unused if 2018-09-04 22:49:54 +02:00
emersion 017cfb0b86 backend/drm: log when de-allocating CRTC 2018-09-04 19:44:44 +02:00
emersion b877daded1 backend/drm: better hotplug handling
This commit handles better situations in which the number of
connected outputs is greater than the number of available CRTCs.
It'll enable as many outputs as possible, and transfer CRTCs to
outputs that need one on unplug.

This changes CRTC and plane reallocation to happen after scanning
DRM connectors instead of on modeset.

This cleanups CRTCs and planes on unplug to allow them to be
re-used for other outputs.

On modeset, if an output doesn't have a CRTC, the desired mode is
saved and used later when the output gains a CRTC.

Future work includes giving priority to enabled outputs over
disabled ones for CRTC allocation. This requires the compositor to
know about all outputs (even outputs without CRTCs) to properly
modeset outputs enabled in the compositor config file and disable
outputs disabled in the config file.
2018-09-04 15:09:07 +02:00
Drew DeVault 73423c988c
Merge pull request #1213 from arandomhuman/wlr_log_get_verbosity
Add wlr_log_get_verbosity method
2018-09-03 11:15:12 -04:00
random human 6daa69fbf5
Update wlr_log_init docs 2018-09-03 17:34:08 +05:30
random human cdf41fa627
Add support for setting log verbosity in rootston 2018-09-03 17:34:07 +05:30
random human 93382dc445
Close stdout/stderr for Xwayland
Depending on the log verbosity, close the stdout/stderr streams.
2018-09-03 17:33:48 +05:30
emersion d31a267f36
Merge pull request #1226 from RyanDwyer/xwayland-set-role
xwayland: Introduce set_role event
2018-09-03 09:23:47 +02:00
Ryan Dwyer b8cc4a4152 xwayland: Introduce set_role event 2018-09-03 17:07:14 +10: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 6af77e3d9e
Release pointers in examples/multi-pointer 2018-09-03 04:00:53 +05:30
random human de16defb21
Release registry pointer in examples/idle 2018-09-03 03:27:56 +05:30
random human ef5df78a27
Destroy layout after display in examples/output-layout 2018-09-03 03:27:28 +05:30
random human 568b0ffe2c
Call wl_global_create first in case of failure 2018-09-03 02:43:55 +05:30
random human 7105864e13
Handle setting keymap in examples more securely 2018-09-03 02:43:44 +05:30
cnt0 6946134883 fix incorrect NULL check 2018-09-02 20:48:18 +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
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