Commit graph

4902 commits

Author SHA1 Message Date
Drew DeVault
b1731134e2
Merge pull request #1494 from emersion/wayland-protocols-text-input
text-input-v3: use protocol from wayland-protocols
2019-01-24 09:38:11 -05:00
Drew DeVault
5941148d45
Merge pull request #1495 from Hjdskes/safe_set_title
backend/x11 & backend/wayland: make set_title NULL-safe
2019-01-24 09:37:17 -05:00
Jente Hidskes
85d84a1a04
backend/x11 & backend/wayland: make set_title NULL-safe
Set the default "wlroots - " title when the title argument to the
set_title functions is NULL. Otherwise, for at least the Wayland
backend, we'd crash because xdg_toplevel_set_title doesn't handle a NULL
pointer.
2019-01-24 15:18:28 +01:00
emersion
a1f9d7ad9e
data-device: keep track of wlr_data_offer in wlr_seat lists 2019-01-24 12:18:41 +01:00
emersion
909b3b16f3
data-device: add wlr_data_offer.type 2019-01-24 12:18:40 +01:00
emersion
3f82eb1853
data-device: make device inert when seat is destroyed 2019-01-24 12:18:39 +01:00
emersion
9d6cb85b2d
seat: simplify data source destroy 2019-01-24 12:18:00 +01:00
emersion
c20d413f8a
data-device: fix missing listener removal 2019-01-24 12:18:00 +01:00
emersion
703a160078
data-control-v1: use new wlr_data_source API 2019-01-24 12:15:18 +01:00
emersion
0040f7089f
data-device: unexport wlr_seat_client_send_selection 2019-01-24 12:15:18 +01:00
emersion
1a2727cc38
data-device: send offer on get_data_device 2019-01-24 12:12:55 +01:00
emersion
84f278eca1
data-device: remove data_source_send_offer 2019-01-24 12:12:55 +01:00
emersion
1150ff13ce
data-device: make sources inert, rename cancel to destroy 2019-01-24 12:12:55 +01:00
emersion
af3de7ea68
text-input-v3: use protocol from wayland-protocols 2019-01-24 12:08:26 +01:00
emersion
4cb0697e57 data-device, primary-selection: add request_set_selection
This makes compositors able to block and/or customize set_selection requests
coming from clients. For instance, it's possible for a compositor to disable
rich selection content (by removing all MIME types except text/plain). This
commit implements the design proposed in [1].

Two new events are added to wlr_seat: request_set_selection and
request_set_primary_selection. Compositors need to listen to these events and
either destroy the source or effectively set the selection.

Fixes https://github.com/swaywm/wlroots/issues/1138

[1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2019-01-24 11:38:23 +01:00
Ian Fan
c41d01306d wlr_xdg_output_v1: move where name & description are sent 2019-01-22 22:58:52 +01:00
Brian Ashworth
f3ff40a0eb wlr_xdg_output_v1: only send name/description once
The xdg-output protocol states that name and description should only be
sent once per output since they do not change.
2019-01-22 21:53:33 +01:00
Brian Ashworth
88ee102992 backend/wayland: fix resizing
Before resizing the egl window, the buffers must be swapped
2019-01-22 21:19:34 +01:00
emersion
365a75139c
Merge pull request #1485 from emersion/data-device-serial
primary-selection: add a serial argument
2019-01-22 20:13:01 +01:00
Drew DeVault
62658a318d
Merge pull request #1488 from Lahvuun/relative-constraints_fixes
Relative pointer/pointer constraints fixes
2019-01-22 13:51:10 -05:00
Ilya Trukhanov
c4ce3d0a49 Check if client understands wl_pointer::frame
Fixes a crash in SDL2 applications when using locked pointer.

SDL2 expects a wl_pointer v1 interface and doesn't provide a handler for
the wl_pointer::frame event. This results in a "listener function for
opcode 5 of wl_pointer is NULL" abort in wayland-client.

Tested on Xonotic v0.8.2 with libSDL2 v2.0.9. Xonotic needs to be ran
with "SDL_VIDEODRIVER=wayland xonotic-sdl" for SDL2 to use the wayland
backend.
2019-01-22 19:50:01 +02:00
emersion
06467d2e12
primary-selection: add a serial argument
The serial needs to be bumped when X11 clients set the selection, otherwise
some Wayland clients (e.g. GTK) will overwrite it when they gain focus.
2019-01-21 19:23:40 +01:00
Drew DeVault
b619ab4d34
Merge pull request #1484 from emersion/fix-indent
Fix indentation in various files
2019-01-21 12:01:37 -05:00
emersion
a4eb90315e
Fix indentation in various files 2019-01-21 17:56:19 +01:00
Drew DeVault
f3ef1f907c
Merge pull request #1482 from Hjdskes/x11_output_set_title
Add wlr_x11_output_set_title
2019-01-20 10:35:08 -05:00
Jente Hidskes
edf0e49195
Add wlr_x11_output_set_title 2019-01-20 16:21:04 +01:00
Jente Hidskes
5b07e20f2a
wlr/backend/x11.h: add documentation
Copied from wlr/backend/wayland.h and modified accordingly.
2019-01-20 16:14:43 +01:00
Drew DeVault
d4de2bd708
Merge pull request #1476 from emersion/fullscreen-shell
fullscreen-shell-v1: initial protocol implementation
2019-01-20 09:30:52 -05:00
Drew DeVault
0db2a687b7
Merge pull request #1479 from emersion/lost-crtc-state
backend/drm: fix state for outputs loosing their CRTC
2019-01-20 09:02:00 -05:00
emersion
f04a725925
Merge pull request #1480 from RyanDwyer/noop-header
Add noop.h to include/wlr/backend/meson.build
2019-01-19 12:55:52 +01:00
Ryan Dwyer
53b29e5443 Add noop.h to include/wlr/backend/meson.build 2019-01-19 21:31:24 +10:00
emersion
d4ffa5b7a6
backend/drm: fix state for outputs loosing their CRTC
When there aren't enough CRTCs for all outputs, we try to move a CRTC from a
disabled output to an enabled one. When this happens, the old output's state
wasn't changed, so the compositor thought it was still enabled and rendering.

This commit marks the old output as WLR_DRM_CONN_NEEDS_MODESET and sets its
current mode to NULL.
2019-01-19 10:18:03 +01:00
emersion
5dde2e794d
Merge pull request #1478 from Lahvuun/relative_pointer
Fix segfault in get_relative_pointer
2019-01-18 22:52:38 +01:00
Ilya Trukhanov
268cc450b6 Fix segfault in get_relative_pointer
Occurs on subsequent calls to
relative_pointer_manager_v1_handle_get_relative_pointer()

Steps to reproduce:
- run rootston
- run examples/relative-pointer
- switch to relative pointer more than once

Note: if done fast enough it may take more than two switches to crash.
2019-01-18 22:53:32 +02:00
Drew DeVault
3e21d0bd48
Merge pull request #1474 from emersion/meson-yield
meson: yield xwayland option
2019-01-18 08:05:23 -05:00
Drew DeVault
268c7e5cb6
Merge pull request #1475 from emersion/xwayland-shutdown
rootston: document why Xwayland is disconnected before clients
2019-01-18 08:04:37 -05:00
emersion
461360aff1
rootston: document why Xwayland is disconnected before clients 2019-01-18 12:20:04 +01:00
emersion
bd5516d4ec
meson: yield xwayland option 2019-01-18 09:07:22 +01:00
Drew DeVault
0e0ba65bc0
Merge pull request #1473 from RyanDwyer/noop-backend
Introduce noop backend
2019-01-17 08:02:27 -05:00
Ryan Dwyer
9b4be5a595 Introduce noop backend
The noop backend is similar to headless, but it doesn't contain a
renderer. It can be used as a place to stash views for when there's no
physical outputs connected.
2019-01-17 20:13:55 +10:00
emersion
10b1de6e71
Merge pull request #1471 from SimulaVR/tinywl-lib-order
Fix tinywl linking order (#1463)
2019-01-16 16:44:46 +01:00
David Kraeutmann
4b3414e065 Fix tinywl linking order (#1463) 2019-01-16 16:39:14 +01:00
emersion
dc9c91b0a4
Merge pull request #1461 from c-edw/feature/WLRToplevelAndPopup
Remove wlr_xdg_surface_send_close.
2019-01-15 09:09:08 +01:00
Connor E
b1cdd2b4b3 Use assertions instead of guard. 2019-01-14 16:05:24 +00:00
Drew DeVault
10a2c4edec
Merge pull request #1462 from alexbakker/fix-soft-cursors
Fix software cursor rendering for tinywl and some examples
2019-01-13 15:45:08 -05:00
Alexander Bakker
776b6ce395 Fix software cursor rendering for tinywl and some examples 2019-01-13 21:39:56 +01:00
Connor E
e7fff4f560 Remove wlr_xdg_surface_send_close. 2019-01-13 14:22:49 +00:00
emersion
8134d5b1e0
Merge pull request #1459 from swaywm/wl-output-title
Add wlr_wl_output_set_title
2019-01-12 00:13:54 +01:00
Drew DeVault
d3d1437bc4 Add wlr_wl_output_set_title 2019-01-10 21:53:32 -05:00
Drew DeVault
9921f9b28d Remove unused struct from tinywl 2019-01-10 21:18:52 -05:00