aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-20xwayland: remove remaining SOCK_CLOEXECemersion
2019-02-19backend/drm: fix modeset on drm fd resumeBrian Ashworth
On DRM resume, such as switching back to a TTY, the output needs to be modeset to the current mode. However, wlr_output_set_mode will return early when attempting to set the mode to the current mode. This just steps around wlr_output_set_mode and calls drm_connector_set_mode directly.
2019-02-19Merge pull request #1562 from emersion/remove-sock-cloexecDrew DeVault
xwayland: don't use SOCK_CLOEXEC
2019-02-19xwayland: don't use SOCK_CLOEXECemersion
SOCK_CLOEXEC isn't POSIX.
2019-02-19Merge pull request #1493 from emersion/primary-selection-v1Drew DeVault
primary-selection-v1: copy from gtk-primary-selection
2019-02-19Prevent NULL dereference in tablet_tool handlerMarkus Ongyerth
In case a tool was removed, but not yet destroyed by the client, the tool_client's tool can be NULL. We have to check that as well in the set_cursor handler to prevent using inert resources
2019-02-18Merge pull request #1557 from emersion/inert-offersDrew DeVault
data-device: make old offers inert before sending selection
2019-02-18Merge pull request #1556 from emersion/unmapDrew DeVault
xwayland, data-device: fix surface state on unmap
2019-02-18Merge pull request #1558 from emersion/fix-hide-cursor-mgpuDrew DeVault
backend/drm: fix NULL dereference when unsetting cursor
2019-02-18backend/drm: fix NULL dereference when unsetting cursoremersion
This segfault happens on multi-GPU systems. Fixes https://github.com/swaywm/sway/issues/3717
2019-02-18data-device: make old offers inert before sending selectionemersion
Fixes https://github.com/swaywm/wlroots/issues/1383
2019-02-18xwayland, data-device: fix surface state on unmapemersion
This commit makes sure surface->mapped is true when the unmapped event is emitted. This is necessary because listeners can only damage surfaces that are mapped. This is similar to the fact that the destroy event is emitted before any destruction is actually made. Fixes https://github.com/swaywm/sway/issues/3568
2019-02-17Merge pull request #1553 from emersion/subsurface-mapDrew DeVault
subsurface: add map/unmap events
2019-02-17subsurface: add map/unmap eventsemersion
Fixes https://github.com/swaywm/wlroots/issues/1414
2019-02-17wlr_output: do not modeset to current modeBrian Ashworth
There is no point in modesetting an output to a mode that it is already set to. Modesetting will cause the output to briefly flicker which is undesirable for a noop. This prevents modesetting any wlr_output, regardless of the backend, to it's currently set mode.
2019-02-15Merge pull request #1537 from VincentVanlaer/cursor-dmabuf-nouveauDrew DeVault
Add workaround for hardware cursors on nouveau
2019-02-15Add workaround for hardware cursors on nouveauVincent Vanlaer
2019-02-15Revert "drm: do not modeset to current mode"Drew DeVault
This reverts commit 72c76b128e562c482868b42b1945ed49cbd44353.
2019-02-15Merge pull request #1548 from emersion/error-invalid-transformDrew DeVault
surface: error out on invalid transform
2019-02-15Update data-controlIvan Molodetskikh
2019-02-15xwm: Add _NET_CLIENT_LIST supportUli Schlachter
Fixes: https://github.com/swaywm/wlroots/issues/1469 Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-15surface: error out on invalid transformemersion
2019-02-15Post protocol error on invalid wl_surface scaleSebastian Krzyszkowiak
Letting the scale be set to 0 causes division by zero errors.
2019-02-14Copy cursor surface to secondary gpu if necessaryVincent Vanlaer
2019-02-14drm: do not modeset to current modeBrian Ashworth
There is no point in modesetting an output to a mode that it is already set to. Modesetting will cause the output to briefly flicker which is undesirable for a noop. This returns early in `drm_connector_set_mode` when attempting to modeset to the current mode.
2019-02-13primary-selection-v1: copy from gtk-primary-selectionemersion
2019-02-13Add a wlr_output_set_subpixel()Geoff Greer
drmModeConnector.subpixel doesn't seem to detect subpixel order on many displays (especially laptops). Allow subpixel order to be manually set. The corresponding PR for sway adds a subpixel output option: https://github.com/swaywm/sway/pull/3645 Once both are merged, https://github.com/swaywm/sway/issues/3163 will be fixed.
2019-02-13xwm: stack below on mapBrian Ashworth
Since xwm only manipulates the stack when focusing a window, newly mapped windows should be stacked below the focused window. This prevents the newly mapped window from stealing focus due to being on the top of the stack.
2019-02-12Use freebsd/latest for FreeBSD sr.ht buildsDrew DeVault
2019-02-10data-control: add primary selection supportIvan Molodetskikh
data-control: separate out a data_offer struct This is a prerequisite to adding primary selection support. data-control: separate out data_control_source This is a prerequisite to adding primary selection support, since that doesn't use wlr_data_source, but rather wlr_primary_selection_source. Update the data-control protocol data-control: add primary selection support Merge create_offer and create_primary_offer Extract code into data_control_source_destroy() Fix pointer style Move resource neutralization to destructor Store wl_resource in the data_offer Extract data_offer destruction into a function
2019-02-09Merge pull request #1532 from emersion/deprecate-old-protocolsDrew DeVault
Mark old protocols as obsolete
2019-02-09Deprecate old protocolsemersion
2019-02-06Merge pull request #1529 from emersion/better-dnd-fixDrew DeVault
data-device: destroy previous source when starting drag
2019-02-05Merge pull request #1530 from emersion/unmap-destroy-popupsDrew DeVault
xdg-shell: destroy child popups on unmap
2019-02-05xdg-shell: destroy child popups on unmapemersion
It doesn't make sense to keep popups opened when unmapped. We also need to do so in wlr_xdg_popup_destroy so that popups are destroyed in the correct order.
2019-02-05data-device: destroy previous source when starting dragemersion
This supersedes f24e17259e49aef55b7ada54793a4cdb49ae94a1 and 04c9ca4198a729a95a6368bbbf0438d1ba3465fa. These commits were manually removing wlr_data_source destroy handlers when starting a new drag. This is error-prone. Instead, this commit destroys the previous source whenever we start a new drag.
2019-02-04Merge pull request #1526 from VincentVanlaer/cursor-dmabufScott Anderson
Allow cursor render surface to be used as fb
2019-02-04Allow cursor render surface to be used as fbVincent Vanlaer
In order for a surface to be used as a cursor plane framebuffer, it appears that requiring the buffer to be linear is sufficient. GBM_BO_USE_SCANOUT is added in case GBM_BO_USE_LINEAR isn't sufficient on untested hardware. Fixes #1323 Removed wlr_drm_plane.cursor_bo as it does not serve any purpose anymore. Relevant analysis (taken from the PR description): While trying to implement a fix for #1323, I found that when exporting the rendered surface into a DMA-BUF and reimporting it with `GBM_BO_USE_CURSOR`, the resulting object does not appear to be valid. After some digging (turning on drm-kms debugging and switching to legacy mode), I managed to extract the following error: ``` [drm:__setplane_check.isra.1 [drm]] Invalid pixel format AR24 little-endian (0x34325241), modifier 0x100000000000001 ``` The format itself refers to ARGB8888 which is the same format as `renderer->gbm_format` used in master to create the cursor bo. However, using `gbm_bo_create` with `GBM_BO_USE_CURSOR` results in a modifier of 0. A modifier of zero represents a linear buffer while the modifier of the surface that is rendered to is `I915_FORMAT_MOD_X_TILED` (see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/drm/drm_fourcc.h?h=v4.20.6#n263). In order to fix this mismatch in modifier, I added the `GBM_BO_USE_LINEAR` to the render surface and everything started to work just fine. I wondered however, whether the export and import is really necessary. I then decided to test if the back buffer of the render surface works as well, and at least on my hardware (Intel HD 530 and Intel UHD 620) it does. This is the patch in this PR and this requires no exporting and importing. I have to note that I cheated in order to import DMA_BUFs into a cursor bo when doing the first tests, since on import the Intel drivers check that the cursor is 64x64. This is strange since cursor sizes other than 64x64 have been around for quite some time now (https://lists.freedesktop.org/archives/mesa-commit/2014-June/050268.html). Removing this check made everything work fine. I later (while writing this PR) found out that `__DRI_IMAGE_USE_CURSOR` (to which `GBM_BO_USE_CURSOR` translates) has been deprecated in mesa (https://gitlab.freedesktop.org/mesa/mesa/blob/master/include/GL/internal/dri_interface.h#L1296), which makes me wonder what the usecase of `GBM_BO_USE_CURSOR` is. The reason we never encountered this is that when specifying `GBM_BO_USE_WRITE`, a dumb buffer is created trough DRM and the usage flag never reaches the Intel driver directly. The relevant code is in https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/gbm/backends/dri/gbm_dri.c#L1011-1089 . From this it seems that as long as the size, format and modifiers are right, any surface can be used as a cursor.
2019-02-04Add build-*/ to gitignore.Connor E
2019-02-04Make popup inert when destroyed.Connor E
2019-02-04Merge pull request #1524 from mnussbaum/user-unit-wipScott Anderson
Allow compositors to run as systemd user units
2019-02-03Allow compositors to run as systemd user unitsmnussbaum
When a wlroots compositor runs as a systemd user unit there is no session associated with the compositor process. Instead we need to attach to an active and graphical user session. This change first looks for an available session for the process, and if there isn't one falls back to display in the oldest available graphical session. This work was modeled after a similar change to mutter - https://gitlab.gnome.org/GNOME/mutter/merge_requests/150.
2019-02-03Bump project version to 0.3emersion
2019-02-03Merge pull request #1527 from johnchen902/fix-sway-3545-2Drew DeVault
Fix another instance of swaywm/sway#3545.
2019-02-03Fix another instance of swaywm/sway#3545.John Chen
2019-02-02Fix swaywm/sway#3545.John Chen
2019-02-01Merge pull request #1523 from emersion/set-same-selection-crashDrew DeVault
data-device: fix crash when setting the same selection twice
2019-02-01Merge pull request #1519 from emersion/dedup-source-mime-typeDrew DeVault
De-duplicate data source MIME types
2019-02-01Merge pull request #1522 from emersion/logind-no-dup-leakDrew DeVault
backend/session/logind: dup FD with CLOEXEC
2019-02-01Merge pull request #1518 from emersion/relative-pointer-usecDrew DeVault
relative-pointer-v1: time is in usec, not msec