Commit graph

3616 commits

Author SHA1 Message Date
emersion
242e9e3bf0 rootston: fix Xwayland children rendering when fullscreen 2019-03-02 09:37:05 -07:00
emersion
bfaf06f04b rootston: fix rotated views rendering 2019-03-02 09:37:05 -07:00
emersion
62fd03a7be rootston: refactor rendering
This implements rootston surface iterators to ease rendering, sending
frame/presentation events and accumulating damage.
2019-03-02 09:37:05 -07:00
emersion
8efeca528f backend/session: add noop session
This is the first step towards being able to run via DRM leasing and on render
nodes.

Test with:

    export WLR_BACKENDS=drm
    export WLR_SESSION=noop
    export WLR_DRM_DEVICES=/dev/dri/renderD128
2019-03-02 08:40:27 -07:00
emersion
755a1c9138 tinywl: send pointer frame events
Fixes https://github.com/swaywm/wlroots/issues/1544
2019-03-02 08:39:41 -07:00
Ian Fan
2e1dd4ae36 seat: fix remaining wlr_button_state enum rename 2019-03-01 21:49:04 +01:00
emersion
e8f012c993 seat: only store serial if pressing a button
The grab serial can be used to start a pointer grab. A button pressed event
should be used for this purpose.

Thus, we should only save the grab serial if it's the first button pressed
event we send. This commit makes it so the serial is not saved if a button is
released while another button is still pressed.
2019-03-01 12:36:19 -07:00
emersion
2fde5c95d8 seat: use wlr_button_state enum instead of uint32_t 2019-03-01 12:36:03 -07:00
emersion
5445d8aad0 meson: enable more compiler warnings 2019-03-01 09:20:23 +01:00
emersion
4135fafecd seat: guard against button count corruption
This is still a compositor bug, and bad events will be sent to clients. We'll
need to track each button separately to handle this in wlroots.
2019-02-28 23:00:57 -05:00
Guido Günther
f8fcd7f06a Remove glEGLImageTargetTexture2DOES
It's declared via render/glapi.txt.
2019-02-28 21:24:22 +01:00
Guido Günther
cf9607f282 wlr_xdg_shell: Remove redundant declaration in the same file 2019-02-28 21:24:22 +01:00
Guido Günther
7da9af31e8 rootston/view: Remove redundant declaration in the same file 2019-02-28 21:24:22 +01:00
Guido Günther
d3b48dfcae Unbreak build with '-Wstrict-prototypes' 2019-02-28 16:41:23 +01:00
Drew DeVault
b46e097fe2 Update version to 0.4.1 2019-02-27 10:56:05 -05:00
Guido Günther
65f1ec1d5e rootston: Make add_{switch,binding}_config static 2019-02-26 15:48:59 +01:00
athrungithub
2000d52405 clang compile fix #1572
clang consider error no enum handled,
in BSD and Linux
2019-02-26 08:05:17 +01:00
emersion
0b33643175
Bump version to 0.4 2019-02-25 23:23:21 +01:00
emersion
d425206719 data-device: check if there's a source before sending dnd_finish
This could cause a segfault in data_offer_destroy if the offer has version < 3.
2019-02-24 19:40:10 -05:00
Jan Beich
421283935b Add xcb-errors to FreeBSD build
Test f8428d1063 at least somewhere to avoid build regressions.
2019-02-24 09:10:02 +01:00
Scott Anderson
d945c97926 backend/drm: Unset cursor on cleanup
This will prevent the cursor from persisting on the Linux framebuffer
terminal on exit.
2019-02-24 09:04:36 +01:00
Drew DeVault
e77e53dae5
Merge pull request #1517 from emersion/refactor-dnd
Refactor drag-and-drop
2019-02-23 13:02:28 -05:00
Drew DeVault
00b1b40b36
Merge pull request #1568 from emersion/rootston-refactor
Refactor rootston views
2019-02-23 10:49:28 -05:00
emersion
9adcbabea4
rootston: make roots_view embedded and remove unions 2019-02-23 15:24:28 +01:00
emersion
9f11bf571e
rootston: add a view child interface 2019-02-23 14:18:32 +01:00
emersion
e86c7a3dd6
rootston: move part of desktop.c to view.c, use an interface for views 2019-02-23 12:15:37 +01:00
Sebastian Krzyszkowiak
4f66565606 rootston: surface_at: check for fullscreen surfaces in between TOP and OVERLAY layers
Input order didn't match rendering order, causing pointer events to go into surfaces
that were completely obscured by others (like a LAYER_TOP panel behind a fullscreen
window).
2019-02-22 19:13:57 +01:00
Sebastian Krzyszkowiak
de56ea6b1e rootston: don't try to maximize fullscreen surfaces
It doesn't make much sense and actually breaks stuff when using layer-shell
(fullscreen window gets resized, but it's still fullscreen, leading to black
bars where the shell layers are behind).
2019-02-22 17:31:20 +01:00
Scott Anderson
132290aeb4
Merge pull request #1565 from Emantor/fix/realloc_allocation
backend/drm: fix memory leak in realloc crtcs
2019-02-21 07:23:25 +00:00
Rouven Czerwinski
e1834ace28 backend/drm: fix memory leak in realloc crtcs
If *changed_outputs is not supplied by the calling function, track the local
allocation with a bool variable and free the allocation at the end of the
function.
2019-02-21 08:19:12 +01:00
emersion
d6de640440
data-device: unbreak wl_data_source.cancel during drag-and-drop 2019-02-20 18:42:34 +01:00
emersion
7d367a9e21
data-offer: send WL_DATA_OFFER_ERROR_INVALID_FINISH 2019-02-20 18:42:34 +01:00
emersion
ae2aeb65cc
rootston: cancel drag on invalid serial 2019-02-20 18:42:34 +01:00
emersion
44ec3afb27
data-device: fix drag cleanup if not started 2019-02-20 18:42:34 +01:00
emersion
6291e84532
data-device: refactor wlr_drag 2019-02-20 18:42:29 +01:00
Drew DeVault
18600f457b
Merge pull request #1564 from emersion/remove-sock-cloexec
xwayland: remove remaining SOCK_CLOEXEC
2019-02-20 11:08:34 -05:00
emersion
cfe7e28416
xwayland: remove remaining SOCK_CLOEXEC 2019-02-20 17:04:00 +01:00
Brian Ashworth
50011e7170 backend/drm: fix modeset on drm fd resume
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-19 16:49:51 +01:00
Drew DeVault
dcd05f67ab
Merge pull request #1562 from emersion/remove-sock-cloexec
xwayland: don't use SOCK_CLOEXEC
2019-02-19 10:45:57 -05:00
emersion
cb0a91e45a
xwayland: don't use SOCK_CLOEXEC
SOCK_CLOEXEC isn't POSIX.
2019-02-19 16:38:45 +01:00
Drew DeVault
ea28887a23
Merge pull request #1493 from emersion/primary-selection-v1
primary-selection-v1: copy from gtk-primary-selection
2019-02-19 08:59:20 -05:00
Markus Ongyerth
fc9838b15e Prevent NULL dereference in tablet_tool handler
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-19 08:51:10 +01:00
Drew DeVault
b455df3b91
Merge pull request #1557 from emersion/inert-offers
data-device: make old offers inert before sending selection
2019-02-18 15:27:09 -05:00
Drew DeVault
7aa445779c
Merge pull request #1556 from emersion/unmap
xwayland, data-device: fix surface state on unmap
2019-02-18 15:24:04 -05:00
Drew DeVault
93c8b91b05
Merge pull request #1558 from emersion/fix-hide-cursor-mgpu
backend/drm: fix NULL dereference when unsetting cursor
2019-02-18 15:22:49 -05:00
emersion
2a738803b2
backend/drm: fix NULL dereference when unsetting cursor
This segfault happens on multi-GPU systems.

Fixes https://github.com/swaywm/sway/issues/3717
2019-02-18 20:15:39 +01:00
emersion
07e1bedb08
data-device: make old offers inert before sending selection
Fixes https://github.com/swaywm/wlroots/issues/1383
2019-02-18 16:36:23 +01:00
emersion
81ed1efe4f
xwayland, data-device: fix surface state on unmap
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-18 13:14:35 +01:00
Drew DeVault
fd0b625ab9
Merge pull request #1553 from emersion/subsurface-map
subsurface: add map/unmap events
2019-02-17 19:21:13 +01:00
emersion
943e918a96
subsurface: add map/unmap events
Fixes https://github.com/swaywm/wlroots/issues/1414
2019-02-17 12:01:15 +01:00