Commit graph

2864 commits

Author SHA1 Message Date
Ilia Bozhinov
d6615e0e84 idle: enable the compositors to add custom idle timeouts (#1655)
* idle: enable the compositors to add custom idle timeouts

* idle: add a private constructor which also creates the resource

* idle: move resource creation to the idle implementation callback
2019-04-17 08:48:43 +03:00
emersion
1515c56cae output: remove lx, ly
Fixes https://github.com/swaywm/wlroots/issues/1610
2019-04-13 08:31:30 -06:00
emersion
930e37eae9 output-management-v1: add more docs 2019-04-11 09:19:57 -06:00
emersion
fc0ba3ea22 output-management-v1: support outputs without modes 2019-04-11 09:19:57 -06:00
emersion
8136605cfb output-management-v1: support applying configuration 2019-04-11 09:19:57 -06:00
emersion
d71ebde545 output-management-v1: add support for position, transform and scale 2019-04-11 09:19:57 -06:00
emersion
ee77a65fe3 rootston: update output-management-v1 state when output is modeset 2019-04-11 09:19:57 -06:00
emersion
ef68d7d4d1 output-management-v1: add support for modes 2019-04-11 09:19:57 -06:00
emersion
54d6ba78c3 rootston: add output-management-v1 support 2019-04-11 09:19:57 -06:00
emersion
d695003498 Add apply and test events to manager 2019-04-11 09:19:57 -06:00
emersion
0b64ecc162 Split wlr_output_configuration_head_v1 2019-04-11 09:19:57 -06:00
emersion
3a233b3fcc Add support for wlr-output-management-unstable-v1 2019-04-11 09:19:57 -06:00
Drew DeVault
fd0d7d0907 Add FreeRDP backend for remote desktop support 2019-04-08 08:09:07 -06:00
emersion
e42178d03f
render: switch wlr_renderer to wlr_drm_format_set 2019-04-01 19:18:04 +03:00
Scott Anderson
c01b81c99c
render: introduce wlr_drm_format_set
This types adds a container for formats + modifiers.

A list that is of [format [modifier]] was chosen instead of
[format modifer] because that is how GBM accepts them.

Co-Authored-By: emersion <contact@emersion.fr>
2019-04-01 19:15:56 +03:00
Brian Ashworth
17f688735f wlr_xdg_toplevel_v6: store pending fullscreen output
Since the fullscreen request may be made before the toplevel's surface
is mapped, the requested fullscreen output needs to be stored so it
can be retrieved on map (along with the existing fullscreen property).

This commit makes the required changes for wlr_xdg_toplevel_v6.
2019-03-27 10:04:10 +02:00
Brian Ashworth
4e614683b7 wlr_xdg_toplevel: store pending fullscreen output
Since the fullscreen request may be made before the toplevel's surface
is mapped, the requested fullscreen output needs to be stored so it
can be retrieved on map (along with the existing fullscreen property).

This commit makes the required changes for wlr_xdg_toplevel.
2019-03-27 10:04:10 +02:00
Guido Günther
cd60f40bbb wlr_output: Add preferred property (#1625)
* wlr_output: Indicate modes link

* wlr_output: Introduce preferred flag

This indicates an outputs preferred mode.

* drm: Set preferred flag for an outputs preferred mode
2019-03-21 22:12:43 +02:00
Ryan Walklin
4453757fc9 s/lid_switch/switch_device
Rename lid_switch to switch_device to disambiguate lid and tablet mode switches.
2019-03-19 22:45:58 -04:00
Brian Ashworth
6b7f5e4010 backend/noop: improve output number handling
This improves the way the output numbers are handled for the noop
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
NOOP-2, which causes an issue since the identifier will also be
identical. With this, the last output is NOOP-3 and the outputs can be
distinguished.
2019-03-15 18:38:12 +02:00
Brian Ashworth
c97f0eb0f2 backend/headless: improve output number handling
This improves the way the output numbers are handled for the headless
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
HEADLESS-2, which causes an issue since the identifier will also be
identical. With this, the last output is HEADLESS-3 and the outputs can
be distinguished.
2019-03-15 18:37:56 +02:00
Brian Ashworth
b135599e5a backend/x11: improve output number handling
This improves the way the output numbers are handled for the x11
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
X11-2, which causes an issue since the identifier will also be
identical. With this, the last output is X11-3 and the outputs can be
distinguished.
2019-03-15 18:37:35 +02:00
Brian Ashworth
67523fb228 backend/wayland: improve output number handling
This improves the way the output numbers are handled for the wayland
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
`WL-2`, which causes an issue since the identifier will also be
identical. With this, the last output is `WL-3` and the outputs can be
distinguished.
2019-03-15 09:43:40 +02:00
emersion
9601019192 xwayland: don't set DISPLAY
Let the compositor set it. This allows for multiple Xwayland instances to run
at the same time.

Fixes https://github.com/swaywm/wlroots/issues/1442
2019-03-04 12:54:06 -07:00
emersion
c2178d51a8 rootston: split rendering code into render.c 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
2fde5c95d8 seat: use wlr_button_state enum instead of uint32_t 2019-03-01 12:36:03 -07: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
e77e53dae5
Merge pull request #1517 from emersion/refactor-dnd
Refactor drag-and-drop
2019-02-23 13:02: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
emersion
d6de640440
data-device: unbreak wl_data_source.cancel during drag-and-drop 2019-02-20 18:42:34 +01:00
emersion
6291e84532
data-device: refactor wlr_drag 2019-02-20 18:42:29 +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
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
emersion
943e918a96
subsurface: add map/unmap events
Fixes https://github.com/swaywm/wlroots/issues/1414
2019-02-17 12:01:15 +01:00
Uli Schlachter
e7d9cf5815 xwm: Add _NET_CLIENT_LIST support
Fixes: https://github.com/swaywm/wlroots/issues/1469
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-15 11:08:54 +01:00
emersion
8163f7e1e2
primary-selection-v1: copy from gtk-primary-selection 2019-02-13 19:28:25 +01:00
Geoff Greer
5c8d2da0a1 Add a wlr_output_set_subpixel()
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-13 19:20:29 +01:00
Ivan Molodetskikh
9e49ceb129 data-control: add primary selection support
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-10 17:12:05 +01:00
emersion
6c8eaaef2d
Deprecate old protocols 2019-02-09 19:57:10 +01:00
emersion
7f5967234c
xdg-shell: destroy child popups on unmap
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-05 19:29:00 +01:00
Vincent Vanlaer
7bc43413ed Allow cursor render surface to be used as fb
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-04 20:47:07 +01:00
emersion
7defb30781
relative-pointer-v1: time is in usec, not msec 2019-01-30 21:25:42 +01:00
emersion
faa00a4a33
rootston: only allow one drag icon per seat 2019-01-30 15:24:18 +01:00
emersion
d6de329d98
seat: don't send motion if pointer hasn't moved 2019-01-30 15:24:17 +01:00
emersion
75371d2c88
Require libdrm >= 2.4.95 2019-01-29 19:33:38 +01:00
Drew DeVault
feb1b9b1cb
Merge pull request #1509 from emersion/gbm-fmt-mismatch
backend/drm: fix GBM format mismatch
2019-01-29 10:39:54 -05:00
emersion
ee293fab58
backend/drm: fix GBM format mismatch
We create the EGL config with GBM_FORMAT_ARGB8888, but then initialize GBM BOs
with GBM_FORMAT_XRGB8888. This mismatch confuses Mesa.

Instead, we can always use GBM_FORMAT_ARGB8888, and use DRM_FORMAT_XRGB8888
when calling drmModeAddFB2.

Fixes https://github.com/swaywm/wlroots/issues/1438
2019-01-29 12:04:12 +01:00
Greg V
9fe8e37961 Implement the pointer-gestures-unstable-v1 protocol
This protocol relays touchpad gesture events produced by libinput to
supporting clients (e.g. Evince, Eye of GNOME).
2019-01-28 22:06:36 +01:00
emersion
5de26ad8ed
pointer: add a frame event
Frame events group logically connected pointer events. It makes sense to make
the backend responsible for sending frame events, since once the events are
split (ie. once the frame events are stripped) it's not easy to figure out
which events belongs to which frame again.

This is also how Weston handles frame events.

Fixes https://github.com/swaywm/wlroots/issues/1468
2019-01-26 11:04:05 +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
0040f7089f
data-device: unexport wlr_seat_client_send_selection 2019-01-24 12:15:18 +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
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
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
emersion
a4eb90315e
Fix indentation in various files 2019-01-21 17:56:19 +01: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
Ryan Dwyer
53b29e5443 Add noop.h to include/wlr/backend/meson.build 2019-01-19 21:31:24 +10: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
Connor E
e7fff4f560 Remove wlr_xdg_surface_send_close. 2019-01-13 14:22:49 +00:00
Drew DeVault
d3d1437bc4 Add wlr_wl_output_set_title 2019-01-10 21:53:32 -05:00
Drew DeVault
97af2464b7 Update Wayland backend to xdg-shell stable 2019-01-10 09:17:14 -05:00
Drew DeVault
e61ea7706b
Merge pull request #1423 from emersion/data-control
Implement data-control-unstable-v1
2019-01-06 22:41:35 -05:00
emersion
f71cf15aad
relative-pointer-v1: move pointer iteration in wlroots
This makes sure we always send events to the right client.
2019-01-06 12:17:31 +01:00
emersion
86f263a0b8
fullscreen-shell-v1: initial protocol implementation 2019-01-06 12:12:06 +01:00
emersion
610f5bfc77
Merge pull request #1432 from ForTheReallys/relative-pointers
Relative pointers
2019-01-04 13:42:53 +01:00
Alex Maese
8b97c20d01 Finish addressing @emersion's comments 2019-01-02 11:46:13 -06:00
emersion
69e7fd61b7
data-control-v1: update to latest protocol proposal 2018-12-30 02:52:03 +01:00
emersion
99d879c887
data-control-v1: initial protocol implementation 2018-12-30 02:48:03 +01:00
Jente Hidskes
ed5296c6cf Protect against redefining MESA_EGL_NO_X11_HEADERS 2018-12-22 19:05:19 +01:00
Timidger
9af0c5338f
Standardize the wlr_box input paramaters
Fixes #1094
2018-12-21 13:56:10 -05:00
Alex Maese
5999d0322b Add a listener for when the pointer gets destroyed 2018-12-21 12:20:48 -06:00
Alex Maese
12d9edc0c9 Address more of @emersion's comments 2018-12-21 12:20:48 -06:00
Alex Maese
e276d310e8 Add unaccelerated pointer values to wlr_event_pointer_motion events 2018-12-21 12:20:48 -06:00
Alex Maese
a803a007fb Address @emersion's comments 2018-12-21 12:20:48 -06:00
Alex Maese
f5ea393bca Remove pointer resource from relative pointer 2018-12-21 12:20:48 -06:00
Alex Maese
09bdbf24f4 Removed relative pointers from wlr_seat 2018-12-21 12:20:48 -06:00
Alex Maese
f4cf3c0886 Remove wl_client from wlr_relative_pointer_v1 2018-12-21 12:20:48 -06:00
Alex Maese
a2964a640b Add wlr_relative_pointer_v1.h to meson.build 2018-12-21 12:20:48 -06:00
random human
68137dca3f relative_pointer: implementation and code fixes
In particular, modified public creator and destructor function names,
added a display destroy listener, safely extract user data from
resources, send correct time (in usecs) in rootston, etc.
2018-12-21 12:20:48 -06:00
random human
fb44ce9fa8 relative_pointer: send frame event to pointer for Xwayland 2018-12-21 12:20:48 -06:00
random human
6fa1777f94 relative_pointer: code formatting fixes 2018-12-21 12:20:48 -06:00
random human
d020344675 relative_pointer: implement protocol events
Implement zwp_relative_pointer_v1.relative_motion event, along with some
glue code in wlr_seat_pointer and rootston.
2018-12-21 12:20:48 -06:00
random human
ba5b1676df relative_pointer: implement protocol requests
Flesh out the details of the structs, signals, callback functions, and
so on. weston-resizer silently works at this point (no events sent).
2018-12-21 12:20:48 -06:00
random human
3a3d1b6617 relative_pointer: create skeleton and build
Add protocol, header and type files to build. Create skeleton structs,
creator and destroyer, and define implementations.
2018-12-21 12:20:47 -06:00
emersion
ff6c4f80b2
backend/drm: don't insert duplicate custom modes, fix refresh rate 2018-12-16 11:06:46 +01:00
Ryan Walklin
8f5ec5e2bb Fix style nits 2018-12-15 14:57:12 +11:00
Ryan Walklin
810c7b700c Working switches in rootston:
Factor out switch handling to separate file
Add formal enum for toggle action
Implement binding actions
2018-12-15 14:42:35 +11:00
Ryan Walklin
cd7a6daf48 Update config struct, reduce complexity and correctly parse config.ini 2018-12-15 14:42:35 +11:00
Ryan Walklin
2a7edfa24c Factor out binding command execution to separate file 2018-12-15 14:42:35 +11:00
Ryan Walklin
2a3c62b4d2 [WIP][DONTMERGE]Add support for libinput_switch input devices
These are used primarily by laptops to signal
the state of the lid (open/closed) and tablet
mode if supported, based on ACPI events.
2018-12-15 14:42:35 +11:00
Drew DeVault
6161a153c8
Merge pull request #1426 from emersion/drm-disappear-index
backend/drm: fix disappeared output indices
2018-12-09 12:54:52 -05:00
emersion
8c573bc7c6
gtk-primary-selection: basic serial validation 2018-12-09 12:38:35 +01:00
Scott Anderson
efdd4d6ea2 backend/drm: Improve encoder logic
This fixes an issue that can occur with DP MST connectors not reporting
any encoders.
2018-12-09 22:48:00 +13:00
Ilia Bozhinov
8cce2d75a9 rootston: add support for wlr_foreign_toplevel_management_v1 2018-12-08 14:09:51 +01:00
Ilia Bozhinov
f387a840d8 rootston: add title/app_id/class listeners 2018-12-08 14:09:30 +01:00
Ilia Bozhinov
5b1b9657bf types: implement wlr_foreign_toplevel_management_v1 2018-12-08 14:09:30 +01:00
emersion
1256314afe
export-dmabuf-v1: add missing destroy request handler
Also document lists in the header file.
2018-12-06 19:08:28 +01:00
Louis Taylor
0f3a061f60
rootston: use box for views position 2018-12-05 19:20:50 +00:00
Louis Taylor
d703ae45dd
rootston: use int for width, height 2018-12-05 09:02:49 +00:00
emersion
5515faa197
xdg-shell: emit xdg_surface destroy when role object is destroyed
Fixes https://github.com/swaywm/wlroots/issues/1407
2018-12-04 13:42:29 +01:00
Duncaen
e584857fa9 Install wlr_pointer_constraints_v1.h 2018-12-03 18:44:16 +01:00
Drew DeVault
273e110b74
Merge pull request #1403 from emersion/swap-buffers-damage-coords
output: switch swap_buffers damage to output-buffer-local coords
2018-12-02 13:17:24 -05:00
emersion
6aaefad40d
output: switch swap_buffers damage to output-buffer-local coords
This is one more step towards [1]. This gives more freedom to the compositor
wrt. how it handles damage.

[1]: https://github.com/swaywm/wlroots/issues/1363
2018-12-01 10:56:35 +01:00
emersion
9f0720c03a
primary-selection: introduce wlr_primary_selection_source
This is a common interface that can be used for all primary selection
protocols, as discussed in [1]. A new function wlr_seat_set_primary_selection
is added to set the primary selection for all protocols.

The seat now owns again the source, and resets the selection to NULL when
destroyed.

[1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2018-11-29 19:40:28 +01:00
emersion
bfa7f4ee0d
gtk-primary-selection: use impl pattern for sources 2018-11-27 20:16:55 +01:00
emersion
cbe42d1006
gtk-primary-selection: remove offer struct
We don't need it, we can use the device instead.
2018-11-27 19:45:39 +01:00
emersion
f001f98cef
gtk-primary-selection: refactor everything, untie from seat
This commits completely refactors wlr_gtk_primary_selection. The goal is to
remove gtk-primary-selection state from the seat and better handle inert
resources where it makes sense.

wlr_seat_client.primary_selection_devices has been removed and replaced by
wlr_gtk_primary_selection_device. This allows us to make offers inert when the
current selection is replaced.

wlr_seat_set_primary_selection has been removed because it relied on wlr_seat
instead of wlr_gtk_primary_selection_device_manager. A new function,
wlr_gtk_primary_selection_device_manager_set_selection (candidate for the
longest function name in wlroots) has been added. It doesn't take a serial
anymore as serial checking only makes sense for set_selection requests coming
from Wayland clients (serial checking is now done in the Wayland interface
implementation).

Since wlr_gtk_primary_selection_device_manager is now required to set the
selection, a new function wlr_xwayland_set_gtk_primary_selection_device_manager
(candidate number two for longest function name) has been added.

Devices are now made inert when the seat goes away.

Future work includes removing the last primary selection bits from the seat,
mainly wlr_seat.primary_selection_source and wlr_seat.events.primary_selection,
replacing those with new fields in wlr_gtk_primary_selection_device. Or maybe
we could keep those in the seat and replace them with a re-usable interface
(for future zwp_primary_selection_v1 support). We need to think how we'll sync
these three protocols (GTK, X11 and wayland-protocols).

See https://github.com/swaywm/wlroots/issues/1388
2018-11-27 18:57:26 +01:00
Drew DeVault
05bb440786
Merge pull request #1387 from emersion/rename-gtk-primary-selection
Rename wlr_primary_selection to wlr_gtk_primary_selection
2018-11-26 18:36:23 -05:00
Drew DeVault
a2b8d47ff2
Merge pull request #1384 from emersion/data-multiple-devices
data-device: allow multiple devices for the same seat
2018-11-26 18:25:59 -05:00
emersion
a5b8ea90d2
surface: fix destroyed subsurfaces handling
wlr_subsurface_from_wlr_surface can return NULL if the wl_surface is still
alive and if the wl_subsurface has been destroyed. Make sure we check for NULL.

Fixes https://github.com/swaywm/sway/issues/3195
2018-11-26 23:17:52 +01:00
emersion
5d26da9d15
data-device: allow multiple devices for the same seat
This commit makes it possible for a single client to have multiple data devices
for the same seat. This fixes issues with Firefox.

This mainly removes wlr_data_source.offer. We make sure we create one data
offer per device. We now make the offer inert when the source is destroyed.

Fixes the second half of https://github.com/swaywm/wlroots/issues/1041
2018-11-26 12:35:48 +01:00
Drew DeVault
90f1a34d2c
Merge pull request #1375 from emersion/tablet-segfault
tablet-v2: fix segfault on display destroy
2018-11-25 17:30:31 -05:00
Ilia Bozhinov
fb5691b6cc output: add wlr_output_preferred_read_format()
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
2018-11-24 10:54:25 +01:00
emersion
811a4d997b
Rename wlr_primary_selection to wlr_gtk_primary_selection 2018-11-23 11:58:56 +01:00
emersion
eaafd65a12
gtk-primary-selection: track resources 2018-11-21 11:16:31 +01:00
emersion
b9a2e4ba4c
gtk-primary-selection: support multiple devices
When a client was creating multiple data devices for the same seat, we were
only creating one resource. This is a protocol error.

Instead, create one offer per data device.

This commit also makes offers inert when their source is destroyed.

Fixes part of https://github.com/swaywm/wlroots/issues/1041
Supersedes https://github.com/swaywm/wlroots/pull/1113
2018-11-21 11:16:25 +01:00
emersion
ca770995cc
output: add wlr_output_render_software_cursors
Rendering in wlr_output_swap_buffers has unfortunate side-effects.
2018-11-13 16:55:33 +01:00
emersion
57307b7aa7
output: remove wlr_output_set_fullscreen_surface
This wasn't using direct scan-out. Direct scan-out will probably
work differently with @ascent12's work anyway.
2018-11-13 16:55:33 +01:00
Scott Anderson
d3ee69f76b backend/x11: Hide cursor with Xfixes 2018-11-13 10:55:03 +13:00
Scott Anderson
70ae76304e backend/x11: Remove old input functions
This also allows us to remove xcb-xkb, since Xinput will now give us the
appropriate XKB modifiers with each event.
2018-11-13 10:55:03 +13:00
Scott Anderson
d89e868cc9 backend/x11: Add new Xinput events 2018-11-13 10:42:02 +13:00
Scott Anderson
88b2d6fe25 backend/x11: Check for xinput extension 2018-11-13 10:41:37 +13:00
Scott Anderson
ab2c57984b backend/x11: Make header order consistent 2018-11-13 10:40:52 +13:00
Scott Anderson
51a283cbe4 backend/x11: Rename xcb_conn to xcb
When the Xlib connection is removed, this _conn suffix is going to be
pointless. I'm removing this preemtively for that.
2018-11-13 10:39:24 +13:00
Drew DeVault
77dfac4fa4
Merge pull request #1372 from emersion/config10
Use #if instead of #ifdef for wlroots config data
2018-11-12 16:14:18 -05:00
emersion
89ec624f81
tablet-v2: fix segfault on display destroy 2018-11-12 20:05:13 +01:00
emersion
51bfdd620e
Use #if instead of #ifdef for wlroots config data
This prevents some annoying issues when e.g. not including wlr/config.h or
making a typo in the guard name.
2018-11-12 10:12:46 +01:00
Scott Anderson
aaff4b8c00 backend/wayland: Make header order consistent 2018-11-11 22:29:35 +13:00
Scott Anderson
bbce92a923 backend/wayland: Move initilisation code earlier
The renderer redesign is going to need the render fd before the backend
is fully started, so we have to move the wl registry code to when the
backend is created instead of when it is started.

We also need to stash the wl_keyboard and emit it to library users
later, once they've added their listeners and started the backend.
2018-11-11 18:11:56 +13:00
Scott Anderson
4e03802057 backend/wayland: Move registry into backend
Registry was a very small file, and is heavily related to the backend,
so there is not point in keeping them separate.
2018-11-11 18:11:56 +13:00
Cedric Sodhi
beefec3326 Tell Mesa not to attempt X11 headers
If no X11 related things are being built, tell Mesa's eglplatform.h not to attempt inclusion of associated X11 header.
2018-11-09 21:25:23 +01:00
sghctoma
753540335b Remove WLR_HAS_POSIX_FALLOCATE from build system 2018-11-09 18:48:10 +01:00
Drew DeVault
d7b010024a
Merge pull request #1261 from arandomhuman/damage-control
Fix damage tracking for surfaces with transforms
2018-11-04 14:31:17 +01:00
emersion
dec303bea6
surface: fix wlr_surface_get_effective_damage to give surface coords
Transforms were applied, but scale wasn't.
2018-11-04 11:13:10 +01:00
emersion
d592dcdedd
render/gles2: check for GL_OES_EGL_image_external 2018-11-04 09:00:55 +01:00
emersion
62d646f2b8
render/gles2: remove assumptions about supported formats
We were assuming GL_BGRA_EXT was always supported.

We now check that it's supported for rendering. We fail if it isn't because
this format is specified as "always supported" by the Wayland protocol.

We also check if it's supported for reading pixels. A new preferred_read_format
function returns the preferred format that can be used to read pixels. This is
used by the screencopy protocol.
2018-11-04 09:00:51 +01:00
emersion
68362b37a8
backend/drm: fix frame scheduling on secondary GPUs
There was a missing copy_drm_surface_mgpu call in drm_connector_schedule_frame
so we asked for a pageflip with an unknown BO, resulting in ENOENT.

Additionally, this commit makes schedule_frame return a bool indicating
failures. This allows schedule_frame_handle_idle_timer to only set
frame_pending to true if a frame has been successfully scheduled. Thus, if a
pageflip fails, rendering won't be blocked forever anymore.

In case a pageflip is already pending, true is returned because a frame has
already been scheduled and will be sent sometime soon.
2018-10-29 20:38:57 +01:00
emersion
346ec21c4c
util: use shm_open for in-memory files
shm_open is a POSIX function creating an in-memory file. Using it simplifies
the code and removes the dependency on XDG_RUNTIME_DIR. The only downside is
that we need to generate a random name for the shm file.
2018-10-28 22:39:54 +01:00
emersion
b42fc4f2b1
render: on Wayland, make eglSwapBuffers non-blocking 2018-10-28 09:58:20 +01:00
emersion
f745befc06
xwayland: fix typo to enable transparency
We spent literally hours trying to debug this. Turns out it's a typo.

Kill me.
2018-10-27 11:59:27 +02:00
Drew DeVault
ac26d23711
Merge pull request #1287 from emersion/source-seat-client
data-device: remove wlr_data_source.seat_client
2018-10-19 14:18:05 +02:00
nyorain
cb03a41a3b Use enum wl_shm_format for gles2 texture formats
Also rephrase the write_pixels comment.
2018-10-16 09:35:28 +02:00
nyorain
cd28637187 Remove fmt parameter from wlr_texture_write_pixels
It's not allowed to change the format of a texture so remove
the confusing parameter.
2018-10-15 23:56:56 +02:00
nyorain
affbfb6a28 Support older wlr_linux_dmabuf_v1 clients
If a client uses an older version of the dmabuf protocol, use the
`formats` event instead of `modifiers` (since that didn't exist in older
versions).
With a bit of necessary guessing, support dmabuf importing even when
EGL_EXT_image_dma_buf_import_modifiers isn't present instead of
failing up front.
2018-10-12 23:07:45 +02:00
emersion
4897267bd6 input-method-v2: fix include guard name 2018-10-12 19:58:12 +02:00
Drew DeVault
66e8908e9a
Merge pull request #1203 from dcz-purism/input
Support input method and text input
2018-10-12 13:44:46 +02:00
Scott Anderson
93a496f3a8 Include wlr/config.h in x11.h
This fixes a warning from the linker when using LTO, due to mismatched
types.
2018-10-12 09:46:35 +13:00
Dorota Czaplejewicz
585757d6e6 rootston: add support for text input and the basic of input method
The compositor acts as a relay between applications using the text-input protocol and input methods using the input-method protocol.

This change implements the basic but useful support for input-method, leaving out grabs as well as popups.
2018-10-09 09:56:46 +00:00
Dorota Czaplejewicz
cec7471119 wlroots: add basic support for zwp_input_method_v2
Implemented basic input method functionality. Not included: popups, grabbing.
2018-10-09 09:56:46 +00:00
Dorota Czaplejewicz
427735fcd9 wlroots: add support for zwp_text_input_unstable_v3 2018-10-09 09:56:11 +00:00
Scott Anderson
885586a831
Merge pull request #1280 from emersion/drm-link-status
backend/drm: add support for the link-status property
2018-10-08 21:01:30 +02:00
emersion
f44003f04b data-device: remove wlr_data_source.seat_client
Since the source doesn't always come from a client, this field
doesn't make sense. It is replaced by a new "finalized" field in
wlr_client_data_source. This is used to make sure set_actions is
not sent after start_drag has been sent.

A check in data_offer_choose_action has been removed: if an offer
has been sent then start_drag has been called, no need to check.

I also wanted to add a check for wl_data_source.offer, but it
turns out (1) this isn't in the spec (2) it breaks GTK+.

This is some preliminary work for Firefox on Wayland compatibility.
2018-10-07 16:01:57 +02:00
emersion
ba91422747 output: don't trigger a frame immediately in schedule_frame
This desynchronizes our rendering loop with the vblank cycle.

In case a compositor doesn't swap buffers but schedules a frame,
emitting a frame event immediately enters a busy-loop.

Instead, ask the backend to send a frame when appropriate. On
Wayland we can just register a frame callback on our surface. On
DRM we can do a no-op pageflip.

Fixes #617
Fixes swaywm/sway#2748
2018-10-05 16:18:37 +02:00
emersion
eac7c2ad2f output: add presentation refresh prediction 2018-10-04 22:00:24 +02:00
emersion
abd3e995ab rootston: send presentation events 2018-10-04 22:00:23 +02:00
emersion
b0635bf3e7 Rename get_present_clock to get_presentation clock, use it 2018-10-04 22:00:22 +02:00
emersion
54e1287f30 backend: add get_present_clock 2018-10-04 21:58:17 +02:00
emersion
9203bfdd4f output: document signals 2018-10-04 21:56:38 +02:00
emersion
78389fe722 output: add present event 2018-10-04 21:56:38 +02:00
emersion
3aad9fd6a9 presentation-time: add protocol implementation 2018-10-04 21:55:31 +02:00
emersion
f5a147b739 backend/drm: add support for the link-status property 2018-10-04 21:54:27 +02:00
emersion
c67ce71fdd
Merge pull request #1281 from aereaux/edid-sizes
Update sizes for new EDID database.
2018-10-04 18:13:58 +02:00
Drew DeVault
841d04db99
Merge pull request #1262 from nyorain/session_fix
Improve session handling
2018-10-04 17:36:39 +02:00
Aidan Epstein
0036161867 Update sizes for new EDID database. 2018-10-04 08:11:09 -07:00
nyorain
b4d46aa9c2 Use sd_bus_get_property_trivial & remove numbering 2018-10-04 14:04:06 +02:00
random human
3e0a0f3c3a
wlr_surface: add wlr_surface_get_effective_damage
This calculates and returns the effective damage of the surface in
surface coordinates, including the client damage (in buffer
coordinates), and damage induced by resize or move events.
2018-10-04 02:19:09 +05:30
emersion
e88db9a3fb backend/drm: reset gamma table on VT switch 2018-10-03 10:53:35 +02:00
emersion
2beb68007e output: make gamma size a size_t and gamma table const 2018-10-03 10:36:33 +02:00
emersion
79dd9ba151 backend/drm: don't free connector immediately
When a pageflip is pending, we'll get a DRM event for the connector
in the future. We don't want to free the connector immediately
otherwise we'll use-after-free in the pageflip handler.

This commit adds a new state, "DISAPPEARED". This asks the pageflip
handler to destroy the output after it's done pageflipping.
2018-09-28 10:00:40 +02:00
Drew DeVault
19f3804548
Merge pull request #1266 from Ongy/xdc_tablet_fix
Fix tablet_tool tilt and send proximity_out
2018-09-27 16:24:35 -05:00
Markus Ongyerth
3e494efc5c Fix tablet_tool tilt and send proximity_out
Originally I asumed tilt_x and tilt_y are very unlikely to change
independent, I was proven wrong.
And while investigating Krita not using the Erasor tool, I found a bug,
which is unrelated though.
2018-09-27 18:31:50 +02:00
Drew DeVault
5e9959daaa
Merge pull request #852 from Laaas/master
Implement pointer-constraints-unstable-v1 protocol
2018-09-27 05:57:43 -05:00
emersion
1b598f67ca pointer-constraints: add unstable header 2018-09-27 12:39:29 +02:00
emersion
fadbdcd13c seat: remove unused keyboard focus_change event 2018-09-27 12:21:30 +02:00
emersion
d98181dab8 pointer-constraints: use proper wayland-scanner functions 2018-09-27 10:53:11 +02:00
emersion
dac4f8e19f pointer-constraints: refactoring
* Rename the constraint_create signal to new_constraint for
  consistency
* Move the constraint_destroy signal to the constraint itself
* Use rotate_child_position instead of duplicating logic
* Fix inert constraint resource handling
* Style fixes
2018-09-27 10:25:59 +02:00
emersion
31cc2fa4f9 pointer-constraints: make region not a pointer, add committed bitfield 2018-09-26 23:08:52 +02:00
emersion
c89cd4945b pointer-constraints: rename wl_{global,resources} 2018-09-26 17:38:41 +02:00
nyorain
7b52388424 Rework session handling
Sessions can now be retrieved from a backend in a more general manner.
Multi-backend gets back its `session` field that contains the session
if one was created, removing the interfacing from multi backend with the
drm backend directly. This adds the possibility to use sessions even
without the drm backend.

It additionally fixes the bug that 2 session objects got created when
WLR_BACKENDS were set to "libinput,drm".

To allow vt switching without drm backend (and drm fd) on logind, start
listening to PropertiesChanged signals from dbus and parse the session
"Active" property when no master fd was created (this does not change
current drm backend behaviour in any way).
2018-09-24 23:35:09 +02:00
Ryan Dwyer
44613c0fa6 xwayland: Introduce set_decorations event 2018-09-24 20:14:02 +10:00
emersion
842368ec98
Merge pull request #1253 from RyanDwyer/multi-for-each-backend
Introduce wlr_multi_for_each_backend
2018-09-19 14:15:16 +02:00
Drew DeVault
adbf21eb83
Merge pull request #1245 from emersion/capture-disable-hw-cursors
Disable hardware cursors when capturing output
2018-09-19 08:01:38 -04:00
Ryan Dwyer
691a63d66b Introduce wlr_multi_for_each_backend 2018-09-19 21:53:51 +10:00
emersion
3df602a62d export-dmabuf: disable hardware cursors if desired
Also make the frame resource inert when sending "ready".
2018-09-18 11:48:04 +02:00
emersion
928572c14d output: add wlr_output_set_hardware_cursors_enabled
And use it in screencopy.
2018-09-18 11:37:37 +02:00
emersion
139a905924 backend/drm: add assertions 2018-09-18 11:06:01 +02:00
emersion
02231554c8 backend/x11: add assertions 2018-09-18 11:06:01 +02:00
emersion
e98cb7c5ab backend/wayland: add assertions 2018-09-18 11:06:01 +02:00
emersion
7bcf0d9599 backend/libinput: add assertions 2018-09-18 11:05:55 +02:00
emersion
bc34486c04 backend/headless: add assertions 2018-09-18 11:01:53 +02:00
random human
40a43003a1
Send unique keymap file descriptors
To prevent wl_keyboard keymap being written to by clients, use a unique
file descriptor for each wl_keyboard resource.

Reference: weston, commit 76829fc4eaea329d2a525c3978271e13bd76c078
2018-09-18 13:58:36 +05:30
Las
fa2e6e7d9d Implement pointer-constraints protocol in wlroots and rootston 2018-09-18 10:14:33 +02:00
Las
6367e0bc93 Add wlr_surface::input_region member
This is analogous to the opaque_region member.

In addition the code for setting the opaque region is cleaned up.
2018-09-18 10:14:33 +02:00
Las
57690594f4 Remove extraneous indentation and conform to coding style 2018-09-18 10:14:33 +02:00
Las
59dd1dddba Update pointer focus when cycling focus 2018-09-18 10:14:33 +02:00
Las
d446c53fe1 Make (wlr_)seat_client_from_pointer_resource public 2018-09-18 10:14:33 +02:00
Las
cf9debf82e Make roots_cursor::pointer_view available even if there is a surface
To find out whether there was a surface or not before a movement, the member
roots_cursor::wlr_surface has been added.
2018-09-18 10:14:33 +02:00
Las
252bcce2f3 Add focus change event for seats 2018-09-18 10:14:33 +02:00
emersion
f8a50e4fe7 backend/drm: steal CRTCs from disabled outputs
This commit allows outputs that need a CRTC to steal it from
user-disabled outputs. Note that in the case there are enough
CRTCs, disabled outputs don't loose it (so there's no modeset
and plane initialization needed after DPMS). CRTC allocation
still prefers to keep the old configuration, even if that means
allocating an extra CRTC to a disabled output.

CRTC reallocation now happen when enabling/disabling an output as
well as when trying to modeset. When enabling an output without a
CRTC, we realloc to try to steal a CRTC from a disabled output
(that doesn't really need the CRTC). When disabling an output, we
try to give our CRTC to an output that needs one. Modesetting is
similar to enabling.

A new DRM connector field has been added: `desired_enabled`.
Outputs without CRTCs get automatically disabled. This field keeps
track of the state desired by the user, allowing to automatically
re-enable outputs when a CRTC becomes free.

This required some changes to the allocation algorithm. Previously,
the algorithm tried to keep the previous configuration even if a
new configuration with a better score was possible (it only changed
configuration when the old one didn't work anymore). This is now
changed and the old configuration (still preferred) is only
retained without considering new possibilities when it's perfect
(all outputs have CRTCs).

User-disabled outputs now have `possible_crtcs` set to 0, meaning
they can only retain a previous CRTC (not acquire a new one). The
allocation algorithm has been updated to do not bump the score
when assigning a CRTC to a disabled output.
2018-09-15 08:37:33 +02:00
Drew DeVault
df991a55ab
Merge pull request #1241 from emersion/output-enable-error-checking
output: make wlr_output_enable return a bool
2018-09-14 21:14:18 -04:00
Drew DeVault
0210905eef
Merge pull request #1243 from emersion/layer-shell-suffix
layer-shell: add _v1 suffix
2018-09-14 20:47:42 -04:00
emersion
fc960e5d06 layer-shell: add _v1 suffix 2018-09-14 19:32:33 +02:00
emersion
b3cb22c003 xdg-output: add _v1 suffix 2018-09-14 19:29:08 +02:00
emersion
cb293f09e7 output: make wlr_output_enable return a bool 2018-09-14 18:18:07 +02:00
emersion
769a8e9917
Merge pull request #1160 from Ongy/tablet-grabs
Tablet grabs
2018-09-12 19:01:50 +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
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
Ryan Dwyer
b8cc4a4152 xwayland: Introduce set_role event 2018-09-03 17:07:14 +10: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
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
Ilia Bozhinov
62539e265e add missing wlr_box.h include in wlr_screencopy_v1.h 2018-08-31 20:48:38 +03: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
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
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
51892e0d74 Install headers explicitly 2018-08-22 21:16:16 +12:00
Ilia Bozhinov
4486b52aa8 move wlr_drm_connector_add_mode to wlr/backend/drm.h 2018-08-13 10:55:42 +03:00
Ilia Bozhinov
88e9dbe32e remove dangling declaration of wlr_xdg_surface_popup_get_position() 2018-08-09 07:55:20 +03:00
Drew DeVault
28b0a4065b
Merge pull request #1179 from emersion/rootston-toggle-decoration-mode
rootston: add keybinding to toggle decoration mode
2018-08-06 08:11:06 -04:00
emersion
9d0e37f768 rootston: add keybinding to toggle decoration mode 2018-08-06 08:35:14 +01:00
Markus Ongyerth
f64962ace8 tablet-v2 tool: Implement implicit grab
Implement the tablet-v2 tablet tool's implicit grab semantics for
buttons and tip.

This avoids losing focus (to other [sub]surfaces) when a button is held,
or the tip is down.
This should help when the device is used close to a surface's border and
would otherwise have to be very precise.
2018-08-06 08:45:41 +02:00
Mariusz Bialonczyk
ad406db21c gles2: change context when it is not current
Texture functions, that create and manipulate textures should switch
the current context if necessary.

thanks to: @emersion

Fixes #934
2018-08-03 07:43:22 +02:00
Drew DeVault
1654fc80eb
Merge pull request #1157 from emersion/wlr-gamma-control
Implement wlr-gamma-control-unstable-v1
2018-08-02 18:48:09 -04:00
emersion
2ebecb6727 backend/drm: allow to pass empty gamma ramp to reset it 2018-08-02 23:33:59 +01:00
emersion
e21563ec76 output: document gamma functions 2018-08-02 23:33:59 +01:00
emersion
a5cab82a0f rootston: fire up wlr-gamma-control-unstable-v1 2018-08-02 23:33:59 +01:00
emersion
a149c2370a Implement wlr-gamma-control-unstable-v1 2018-08-02 23:33:04 +01:00
emersion
9dd4388ed9 xwayland: document SIGUSR1 handler 2018-08-02 23:29:34 +01:00
Drew DeVault
5642c5cc8f
Merge pull request #1053 from emersion/xdg-decoration
Add xdg-decoration-unstable-v1 support
2018-08-02 09:33:10 -04:00
Brian Ashworth
a3c33e93b8
Merge pull request #1167 from ammen99/master
rootston: focus newly-created surfaces
2018-07-29 22:03:53 -04:00
Drew DeVault
211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Ilia Bozhinov
2e6eb097b6 rootston: focus newly-created surfaces
Whenever a new surface is created, we have to update the cursor focus,
even if there's no input event. So, we generate one motion event, and
reuse the code to update the proper cursor focus. We need to do this
for all surface roles - toplevels, popups, subsurfaces.

Fixes #1162
2018-07-29 21:58:33 +03:00
Markus Ongyerth
81cc842f8f reintroduce xwayland is_unmanaged
153f37bdf5 (#1145) removed the
wlr_xwayland_is_unamanged function while fixing OR, because it was
belieived that it's supposed to work around the broken OR handling.

This was a misunderstanding. is_unmanaged is (while sort of a hack)
intended to work around inherent differences between "real" X sessions
and our Xwayland/wayland situation.

The main reason it exists is to support applications like rofi and dzen,
while not handing focus to other OR windows (which should *not* be
required).
Traditionally, these applications just grabbed input from X and didn't
need to be focused by any logic in the WM. Which of course doesn't work
in wayland compositors. So we have to give them focus in some way.
Giving *every* OR window focus, breaks other applications that don't
expect focus to change.

A testcase that was pointed out to me where wlr_xwayland_is_unamanged was
breaking things is https://github.com/swaywm/sway/issues/2128 (syncplay,
gitk, gitgui)
Supposedly it broke using keyboard to navigate the menus.
I can't reproduce this with this patch. The popups can be navigated as
long as the parent has focus.
2018-07-29 14:43:17 +02:00
emersion
555721f714 Add xdg-decoration-unstable-v1 support 2018-07-28 22:48:07 +01:00
Drew DeVault
f1b65b34a6
Merge pull request #1127 from emersion/surface-precommit
surface: add wlr_surface_role.precommit
2018-07-27 13:21:03 -04:00
Markus Ongyerth
d5950255de tablet-v2 tablet_tool grab implementation
Implement the basic logic for tablet-v2 tablet_tool's grabs. And plug in
the default grab.
2018-07-23 10:08:10 +02:00
Ilia Bozhinov
8b7c85d765 xdg-shell(-v6): add set_title and set_app_id toplevel signals
This is useful for example when rendering decorations
2018-07-22 22:42:37 +03:00
emersion
5dbf0fe7f2 linux-dmabuf: add v1 suffix
This prevents some future conflicts with the stable version.

Fixes #1133
2018-07-19 21:50:05 +01:00
Ryan Dwyer
dc58c1356d Introduce set_hints event for xwayland 2018-07-19 21:07:11 +10:00
Markus Ongyerth
454f2a84a8 tablet-v2 tablet_pad grab implementation
Implement the basic logic for tablet-v2 tablet_pad's grabs. And plug in
the default grab.
Features like "holding" the focus should be implemented via grabs, like
they are for pointer and keyboard.
2018-07-19 11:35:00 +02:00
emersion
153f37bdf5 xwayland: handle override_redirect flag changes
The override_redirect flag can change on configure notify and
on map notify. This adds an event to know when it changes.

This removes wlr_xwayland_surface_is_unmanaged which was wrongly
using the window type to decide whether the view should be
unmanaged.

A similar patch was proposed to Weston, but has never been
merged upstream [1].

[1]: https://patchwork.freedesktop.org/patch/211161/
2018-07-18 18:51:03 +01:00
emersion
16d7e09d99 surface: add wlr_surface_role.precommit
This allows to emit the unmap event before the surface becomes
actually unmapped for most shells.
2018-07-15 19:30:19 +01:00
Markus Ongyerth
9a6f77fc2c tablet-v2: fix merge commits and test again
There were a few issues after rebase, that the merge algorithm didn't
throw at my face:

wlr_output did a check on the actual role, not a string anymore, so that
had to go to allow tablet-v2 to set cursor surfaces.
A few L_DEBUG/L_ERRORs were still around
There was a user-after-free in tablet-group free()ing, probably after
insufficient testing from a previous feedback pass
2018-07-14 10:29:22 +02:00
Markus Ongyerth
74ca2f8fcf Another round of feedback from acrisci 2018-07-14 09:52:34 +02:00
Markus Ongyerth
43b20bfea2 First feedback pass from acrisci 2018-07-14 09:52:05 +02:00
Markus Ongyerth
9313ac1068 propagate rename to rootston code 2018-07-14 09:51:26 +02:00
Markus Ongyerth
d9e978e1b3 rename wlr_tablet_tool to wlr_tablet
The previous naming was based on the input-device capability names from
libinput.
With code that uses the libinput_tablet_tool and mapping into tablet-v2,
this is confusing, so the name is changed to follow the names used in
the protocol.
2018-07-14 09:49:58 +02:00
Markus Ongyerth
b84288af16 Remove unused tablet_pad list from tools 2018-07-14 09:48:57 +02:00
Markus Ongyerth
6b51f3b57a use previous resource versions and destroy pads 2018-07-14 09:48:57 +02:00
Markus Ongyerth
48e2cba9b6 Handle relative motion for mouse tools 2018-07-14 09:48:57 +02:00
Markus Ongyerth
5cbdd13df8 remove unused wl_listener 2018-07-14 09:48:57 +02:00
Markus Ongyerth
2bc09d91c3 Silent conversion from double to int should be illegal 2018-07-14 09:48:57 +02:00
Markus Ongyerth
dc525a9c5f Clean up serial handling and automate proximity acompaning events 2018-07-14 09:48:57 +02:00
Markus Ongyerth
25c2808153 Clean up serial handling 2018-07-14 09:48:57 +02:00
Markus Ongyerth
88a4b908d1 Hide pad auxiliary data in .c file 2018-07-14 09:48:57 +02:00
Markus Ongyerth
fa39fd178d Split tablet_v2 implementation for easier maintainance 2018-07-14 09:48:57 +02:00
Markus Ongyerth
2c12011472 Send all tablet tool axis events 2018-07-14 09:47:16 +02:00
Markus Ongyerth
2155c976f6 Improve inert resource handling 2018-07-14 09:47:16 +02:00
Markus Ongyerth
b79d11395c Hook up set_cursor in rootston 2018-07-14 09:47:16 +02:00
Markus Ongyerth
0c9a26828a Use wlr_list for paths, and improve inert resource handling 2018-07-14 09:43:17 +02:00
Markus Ongyerth
adba68a3c1 Use tablet_tool impl in libinput backend 2018-07-14 09:43:16 +02:00
Markus Ongyerth
31cec36b74 1st feedback pass
Rename make_ functions to _create
Implement set_cursor and set_feedback
2018-07-14 09:43:16 +02:00
Markus Ongyerth
5c7a37f309 Add tool buttons 2018-07-14 09:40:39 +02:00
Markus Ongyerth
391eef6ea9 Propagate most axis events to clients 2018-07-14 09:40:39 +02:00
Markus Ongyerth
f375246657 Implement basic tablet_pad handling (bound to keyboard focus) 2018-07-14 09:40:39 +02:00
Markus Ongyerth
e235f7d336 Basic tablet_v2 object lifetime 2018-07-14 09:40:39 +02:00
Markus Ongyerth
77bac448cc storage commit #2 2018-07-14 09:40:39 +02:00
Markus Ongyerth
000b305ecc backend/libinput: Manage tablet tool livetimes
This adds the management code to manage tablet tools lifetimes from
libinput.
It follows the suggestion made in the tablet-unstable-v2.xml to destroy
tablet_tools once all tablets that it got into contact with were removed
from the system. This is implemented via a refcount.

If a tool is *not* unique, it will be destroyed on proximity out. This
is libinput specific and mentioned in libinput docs that tools will not
be found again, so we shouldn't keep a reference to them.
Also they can't be on other tablets as well, because they cannot be
tracked.

The naming in this commit is a bit off (to not break things).
The wlr names stay the same, tablet_tool is the libinput_device with
capaiblity LIBINPUT_DEVICE_CAP_TABLET_TOOL which is more akin to
"tablet" in the tablet-unstable-v2 protocol.
The struct that corresponds to the tablet_tool in tablet-unstable-v2 is
called tablet_tool_tool, a rename should be done at some point in the
future.
2018-07-14 09:40:39 +02:00
emersion
5bb272d7f3 surface: add wlr_surface.opaque_region 2018-07-13 10:54:51 +01:00
emersion
c4915d1492 render: add wlr_texture_is_opaque 2018-07-12 23:35:33 +01:00
Drew DeVault
c0b4217fce
Merge pull request #1116 from emersion/surface-role
surface: replace wlr_surface_set_role_committed with wlr_surface_role
2018-07-11 15:27:42 -07:00
emersion
7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion
deeca53e33
Rename wl_resources to resource, wl_global to global 2018-07-08 19:21:31 +01:00
emersion
c19d475753
xdg-output: don't send no-op updates
To begin with, no-op updates are unnecessary, so this patch is an
improvement on its own.

Then, this fixes hotplugging issues with xwayland. xwayland waits
for both wl_output and xdg_output to send a "done" event. However,
it doesn't handle well desynchronized "done" updates: if xdg-output
sends "done" twice, the second one will wait for the next wl_output
"done" event. This is an issue when the first is a no-op and the
second is a real update: the second isn't applied. I've considered
patching xwayland instead, but it seems pretty complicated.
2018-07-08 14:12:18 +01:00
emersion
33db4263a0
surface: replace wlr_surface_set_role_committed with wlr_surface_role 2018-07-07 22:45:16 +01:00
Drew DeVault
be54278207
Merge pull request #1095 from agx/output-add-mode
Allow to add additional modes to outputs
2018-07-07 08:58:17 -07:00
Guido Günther
709d7dd722 rootston: Handle modeline parameter
This allows to pass custom modes.
2018-07-07 17:31:42 +02:00
Guido Günther
8d72090afe drm: Allow to add additional modes
This allows to add additional modes to the list of available video modes
using VESA Coordinated Video Timing information.

Closes #1080
2018-07-07 14:51:39 +02:00
emersion
226306ed45
surface: rename wlr_surface_state.buffer to buffer_resource 2018-07-04 19:12:18 +01:00
emersion
012e38fbe5
surface: add wlr_surface.previous 2018-07-04 19:12:18 +01:00
emersion
78555abba3
surface: move position and scale out of wlr_surface_state 2018-07-04 19:12:17 +01:00
emersion
233bfe2f4f
surface: do not monkey-patch state damage 2018-07-04 19:12:17 +01:00
emersion
adf0423f7c
surface: better buffer position handling 2018-07-04 19:12:17 +01:00
emersion
e6399c61b7
surface: fix WLR_SURFACE_STATE_BUFFER_DAMAGE value 2018-07-04 19:12:17 +01:00
emersion
3c0d672ebd
surface: make pending and current embedded structs 2018-07-04 19:12:17 +01:00
emersion
64836ddfe7
surface: remove wlr_surface_state.subsurface_position 2018-07-04 19:12:17 +01:00
emersion
3ee86b6105
surface: rename invalid state 2018-07-04 19:12:16 +01:00
Ryan Dwyer
86f401e827 Introduce wlr_xdg_surface_for_each_popup
It is common to want to iterate an xdg-surface's popups separately from
the toplevel and subsurfaces. For example, popups are typically rendered
on top of most other surfaces.

wlr_xdg_surface_for_each_surface continues to iterate both surfaces and
popups to maintain backwards compatibility.
2018-07-01 23:24:39 +10:00
emersion
dbb01cbcd0
screencopy: listen to buffer destroy 2018-06-30 22:18:04 +01:00
emersion
c421700f3d
screncopy: update protocol 2018-06-30 22:18:04 +01:00
emersion
bf7560b7cd
screencopy: add capture_output_region support 2018-06-30 22:18:04 +01:00
emersion
2b9cbaddf3
screencopy: add support for frame flags 2018-06-30 22:18:03 +01:00
emersion
73755ad348
screencopy-v1: add basic implementation 2018-06-30 22:17:59 +01:00
Dominique Martinet
c263f7ca29 s/wlr_subsurface_from_surface/wlr_subsurface_from_wlr_surface/
This was the only x_from_wlr_surface function that lacked the wlr_ prefix,
let's have an API as uniform as possible.
2018-06-30 21:21:13 +09:00
Dominique Martinet
0ced9df350 wlr_idle_inhibit_v1: add *data pointer to wlr structs 2018-06-28 20:29:44 +09:00
Dominique Martinet
d0b902b962 wlr_idle: add helper to enable/disable all timers
There was no way to tell wlr_idle to stop processing input events
and rearm timers all the time, such an API is required to have
some form of idle inhibitor.
2018-06-27 22:47:05 +09:00
Drew DeVault
e459fe0ec7
Merge pull request #992 from emersion/screencontent
Implement wlr_export_dmabuf_unstable_v1 protocol
2018-06-22 05:37:07 -07:00
emersion
0e3b35c87e
Merge pull request #1072 from emersion/surface-remove-matrices
surface: remove matrices
2018-06-20 21:29:17 +01:00
emersion
831b7297a4
surface: remove matrices
These were unused.
2018-06-20 21:01:35 +01:00
emersion
a6c0e25d36
surface: remove wlr_frame_callback
This removes the need to allocate a structure for frame callbacks.
wl_resource_get_link is used instead.
2018-06-20 20:00:23 +01:00
emersion
57548b557a
Merge branch 'master' into screencontent 2018-06-17 14:49:18 +01:00
Drew DeVault
fb118ac996
Merge pull request #1062 from emersion/wlr-buffer-comeback
Add back wlr_buffer
2018-06-16 13:43:14 -07:00
Drew DeVault
8e33deb0be
Merge pull request #1063 from ascent12/multi-seat
Multiseat fixes
2018-06-14 10:37:06 -07:00
Scott Anderson
47985d2dc5 Multiseat fixes 2018-06-14 20:46:16 +12:00
Drew DeVault
d27eeaa14c Revert "Merge pull request #1050 from emersion/wlr-buffer"
This reverts commit 5e4af4862e, reversing
changes made to 9a1f0e2d5f.
2018-06-13 19:57:42 -04:00
emersion
0378d143d9
surface: remove wlr_surface.texture
The texture is managed by the surface's wlr_buffer now. In
particular, the buffer can destroy the texture early if it becomes
invalid.
2018-06-13 19:38:10 +01:00
emersion
d643361c48
Merge pull request #1047 from NotKit/gles2fix
Fix GLES2 renderer to use glGetUniformLocations locations
2018-06-13 15:37:16 +01:00
Drew DeVault
5e4af4862e
Merge pull request #1050 from emersion/wlr-buffer
Introduce wlr_buffer
2018-06-13 05:40:23 -07:00
NeKit
6f29db1044 gles2 renderer: introduce struct wlr_gles2_tex_shader 2018-06-13 13:43:01 +03:00
emersion
38d415dd20
buffer: make wlr_buffer_ref return the buffer 2018-06-11 08:13:35 +01:00
Vincent Vanlaer
f1a62a3200 Rename egl.exts to match the extension names 2018-06-09 19:11:51 +02:00
emersion
9ea5b1a85e
Merge branch 'master' into wlr-buffer 2018-06-09 17:54:47 +01:00
Vincent Vanlaer
5ec6d8230d Split eglSwapBuffersWithDamage feature detection
Detecting whether eglSwapBuffersWithDamageEXT or
eglSwapBuffersWithDamageKHR is used should be based on the extension
string, not only on the availability of the function.
2018-06-09 11:39:14 +02:00
emersion
7d24af43e5
buffer: improve docs 2018-06-08 20:28:57 +01:00
emersion
e4933ab445
Introduce wlr_buffer 2018-06-08 20:06:13 +01:00
emersion
457bfcab19
render/egl: only request high priority context on DRM 2018-06-08 00:17:45 +01:00
emersion
d425edc96c
render/egl: consistent extension checking 2018-06-08 00:06:34 +01:00
emersion
cbfe0e834a
Request a high priority EGL context 2018-06-08 00:06:34 +01:00
emersion
32f9699359
Merge pull request #1029 from emersion/wl-backend-keyboard-focus-keys
backend/wayland: fix keyboard keys not pressed/released when focus changes
2018-06-08 00:04:33 +01:00
NeKit
de91c55ea9 Fix GLES2 renderer to use glGetUniformLocations locations
This is needed as uniform locations are driver implementation-specific.
2018-06-07 18:06:31 +03:00
emersion
6f895081e1
Merge pull request #1043 from acrisci/drag-icon-unmap
drag-icon map and unmap fixes
2018-06-07 11:18:58 +01:00
Ilia Bozhinov
a989104a6b xdg-shells: add a set_parent signal to toplevel surfaces 2018-06-06 17:08:06 +03:00
Tony Crisci
9333acd68e handle drag icon map in rootston 2018-06-05 23:01:43 -04:00
Tony Crisci
319ebdf476 add back map event 2018-06-05 22:50:29 -04:00
Tony Crisci
1c75d4e54a rename drag-icon map to unmap 2018-06-05 18:17:42 -04:00
emersion
78966417f4
Merge pull request #1031 from martinetd/multibind-seat
seat: allow clients to bind to seat multiple times
2018-06-04 16:44:22 +01:00
Dominique Martinet
51b9883ea0 seat: allow clients to bind to seat multiple times
This lets clients bind to a seat multiple times by re-using the existing
wlr_seat_client whenever a duplicate request happens.
Previously, an independant wlr_seat_client would be created and only
events from one would be processed.

Fixes #1023.
2018-06-04 22:31:36 +09:00
Tony Crisci
58d549c98a add data to wlr_drag_icon 2018-06-03 20:11:59 -04:00
Silvan Jegen
736309c228 Remove redundant roots_seat_remove_device function
This function is unimplemented and is redundant because all devices added
with roots_seat_add_device get destruction handlers assigned already.

This fixes issue #998.
2018-06-03 19:54:33 +02:00
emersion
551700e887
backend/wayland: fix keyboard keys not pressed/released when focus changes 2018-06-03 13:18:57 +01:00
Timidger
2eb8b240e1
Added data field to wlr_subsurface 2018-06-02 15:57:44 -07:00
Markus Ongyerth
3994762ae0 Add wlr_surface_get_geometry
This function defaults and clips the xdg-surface geometry to the
bounding box of the surface + its subsurfaces, as specified by the
protocol spec.
2018-06-01 15:21:18 +02:00
emersion
21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
emersion
135721118a
render: remove wlr_renderer_check_import_dmabuf
It's possible to implement it outside the renderer, by creating a
texture and destroying it right away. This reduces the API surface
of the renderer.
2018-05-30 17:08:15 +01:00
emersion
28020ff577
Only allow one modifier per DMA-BUF, split attributes struct in render/ 2018-05-30 09:29:12 +01:00
emersion
00e108f2fc
export-dmabuf: correctly finish wlr_linux_dmabuf_attribs 2018-05-29 18:47:18 +01:00
emersion
7901740f94
rootston: enable export-dmabuf 2018-05-29 18:47:17 +01:00
emersion
e26f4dff98
export-dmabuf: wait for the frame to be ready, send timestamp 2018-05-29 18:47:17 +01:00
emersion
5ba1a9af56
render: add wlr_texture_to_dmabuf 2018-05-29 18:47:17 +01:00
emersion
bd430b8620
backend/drm: support multi-planar DMA-BUFs when exporting 2018-05-29 18:47:17 +01:00
emersion
36bd4795d4
export-dmabuf: add basic and incomplete implementation 2018-05-29 18:47:17 +01:00
emersion
9e26808c28
output, backend/drm: add wlr_output_export_dmabuf 2018-05-29 18:45:45 +01:00
emersion
e1f56538a8
Merge pull request #999 from dcz-purism/virtual-keyboard
Support virtual keyboard protocol
2018-05-29 18:22:44 +01:00
Tony Crisci
044fa52be4 reword new_surface docs 2018-05-28 13:12:53 -04:00
Tony Crisci
c27cd5f065 document the map/unmap xdg-shell events 2018-05-28 11:16:33 -04:00
Dorota Czaplejewicz
5334ee8bfd virtual-keyboard: add support for the virtual-keyboard-v1 protocol 2018-05-28 10:05:55 +02:00
emersion
47f097e09b
xdg-shell: add wlr_xdg_toplevel_set_tiled 2018-05-27 13:38:06 +01:00
Tony Crisci
9971d06afb document key and modifier signals 2018-05-26 11:32:45 -04:00
emersion
6eb4b5b54d
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
render: bind wl_drm in renderer
2018-05-25 13:54:16 +01:00
Ilia Bozhinov
24cf70ae96 backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
2018-05-25 14:56:52 +03:00
emersion
41130fe54b
render: bind wl_drm in renderer 2018-05-21 19:07:08 +01:00
emersion
52bd8aa716
backend/multi: disallow multiple renderers at the same time 2018-05-19 09:09:03 +01:00
emersion
3036507463
xdg-shell: split into multiple files 2018-05-14 22:28:45 +01:00
emersion
c7480d5084
xdg-shell-v6: rename shared private functions to prevent conflicts with xdg-shell stable 2018-05-14 19:16:46 +01:00
emersion
facc5aa359
xdg-shell-v6: split into separate files 2018-05-13 22:32:03 +01:00
emersion
db84379242
Send axis source event 2018-05-12 13:53:21 +01:00
emersion
0b58579564
Add support for discrete axis values 2018-05-12 13:34:58 +01:00
emersion
cf5013416d
xdg-output: redesign resource destroy 2018-05-11 22:30:26 +01:00
Vincent Vanlaer
72a75b3a72 Fix Xwayland cleanup
Fixes #964
2018-05-10 01:44:17 +02:00
emersion
13098a18ea
Fix hardware cursors scale & transform 2018-05-09 19:58:18 +01:00
emersion
8e831cd416
Merge pull request #959 from VincentVanlaer/xwayland-lazy
Add the option to start Xwayland only when a client connects
2018-05-08 23:04:26 +01:00
Vincent Vanlaer
119a6cf35c Make xwayland_finish* clean up wlr_xwayland 2018-05-08 22:22:35 +02:00
Markus Ongyerth
8931452e1d add wlr_layer_surface_surface_at
Adds wlr_layer_surface_surface_at, this is consistent with the other
shell implementations, and simplifies handling in compositors.
2018-05-08 16:03:10 +02:00
Vincent Vanlaer
dbf4f9a231 Make startup command no longer wait for xwayland 2018-05-06 23:41:29 +02:00
Vincent Vanlaer
31861b3a7a Add option to rootston to start xwayland lazy 2018-05-06 23:41:29 +02:00
Vincent Vanlaer
c80bf1591e Allow xwayland to start lazily
Makes the xwayland startup process two phased.
The first phase just initialises the X11 sockets.
The second phase starts the Xwayland server itself.
When starting xwayland lazily the second phase will be postponed until
a client has connected to the X11 socket.

Changes in behaviour:
The DISPLAY environment is now set immediately after the X11 sockets
are created.
When the Xwayland server is killed or crashes, the sockets will not be
recreated, but reused.

Fixes #849: Start up Xwayland lazily
2018-05-06 23:41:25 +02:00
emersion
5087199d5d
output-damage: limit the number of damaged rectangles 2018-05-05 14:28:55 +01:00
emersion
cf10cbc00c
Use UTF-8 xwayland window title if available 2018-05-04 20:44:00 +01:00
emersion
caf9f9022c
Merge pull request #936 from emersion/full-hardware-cursors
output: always use hardware cursors if available
2018-05-04 19:00:45 +01:00
Drew DeVault
57d03a3eda
Merge pull request #931 from emersion/redesign-resource-destroy
Redesign resource destruction
2018-05-04 11:48:41 -04:00
emersion
d136026a2c
seat: implement inert seat resources 2018-05-03 22:03:44 +01:00
morganamilo
6305e6327f
Fix typos in comments and strings 2018-05-03 21:59:43 +01:00
emersion
5d37b14116
data-device: make sure resources are correctly destroyed 2018-05-03 20:22:51 +01:00
emersion
ff4708d406
linux-dmabuf: correctly destroy resources 2018-05-03 18:45:30 +01:00
emersion
2cff6dbd63
seat: split into multiple files 2018-05-03 10:30:47 +01:00
emersion
1e563e7ecf
data-device: split into multiple files 2018-05-02 18:04:10 +01:00
emersion
225d182765
output: always use hardware cursors if available
This changes the `wlr_output_impl.set_cursor` function to take a
`wlr_texture` instead of a byte buffer. This simplifies the
DRM and Wayland backends since they were creating textures from
the byte buffer anyway.

With this commit, performance should be improved when moving the
cursor since outputs don't need to be re-rendered anymore.
2018-05-01 21:38:04 +01:00
emersion
62d7337d00
backend/x11: add one pointer per output 2018-04-29 14:46:29 +01:00
emersion
ddac792b61
backend/wayland: only set one pointer listener 2018-04-29 14:30:13 +01:00
emersion
9f8a7c8fc4
backend/wayland: create one virtual pointer per output 2018-04-29 14:30:13 +01:00
emersion
2551ef8871
input-device: add output_name field, populate it from libinput 2018-04-29 14:30:09 +01:00
Drew DeVault
a0f4903063
Merge pull request #926 from emersion/fix-x11-backend-memory-leaks
Fix some backend memory leaks
2018-04-29 08:00:59 -04:00
emersion
f8e0a03451
backend/x11: correctly destroy input devices 2018-04-28 12:55:36 +01:00
emersion
6e7c0b57f6
cursor: use NAN for unspecified axes, refactor absolute warping code 2018-04-28 09:24:38 +01:00
emersion
7f70d244a9
xwayland: fix some Chromium comboboxes
Some comboboxes (e.g. in chrome://flags) are advertized as…
Notifications of course! Yeah, notifications, the thing that
tells you you have mail, your battery is low, or the dog has
eaten your carpet. This isn't the first time we notice Chromium's
X11 backend is pretty shit.

Anyway, added notifications and splash screens to the list of
unmanaged windows. Also removed utility windows because those
should be managed, but maybe I'm wrong and I'll revert this.
2018-04-26 23:18:59 +01:00
emersion
43012f3740
compositor: redesign how resources are managed
All public resource creators now take a new ID for the resource
and an optional list where the resource link is added. When the
resource is destroyed it is its own responsibility to remove
itself from the list. This removes the need for the caller to add
a destroy listener.

This commit fixes a few segfaults with resources not removed from
the list when destroyed.
2018-04-26 17:51:06 +01:00
Ryan Dwyer
daa1ee35be Make WLR_DIRECTION enum powers of 2 2018-04-26 19:51:11 +10:00
Drew DeVault
fecb971518
Merge pull request #902 from emersion/various-memory-leaks
Various memory leaks
2018-04-26 11:34:49 +02:00
Drew DeVault
25dddc0094
Merge pull request #911 from RyanDwyer/fix-output-direction
Fix WLR_DIRECTION enums
2018-04-26 11:20:25 +02:00
Ryan Dwyer
de97f90246 Fix WLR_DIRECTION enums.
Having 0 as an enum value causes wlr_output_layout_adjacent_output() to
never match WLR_DIRECTION_UP.
2018-04-26 19:09:55 +10:00
emersion
449f06556a
Destroy wlr_surface with wlr_renderer 2018-04-26 00:11:36 +01:00
emersion
d47713ac0f
compositor: destroy subsurface resources with wlr_subcompositor 2018-04-25 23:53:44 +01:00
emersion
89a9c96fab
compositor: make wlr_compositor_destroy destroy resources 2018-04-25 23:53:44 +01:00
emersion
71ca45e2c0
Make sure we don't use others' prefixes 2018-04-25 23:24:58 +01:00
emersion
b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
Drew DeVault
097561d6bf
Merge pull request #901 from emersion/layer-shell-minor-memory-leak
layer-shell: fix small memory leak
2018-04-25 11:39:25 +02:00
emersion
018b82c01e
render/egl: allow passing NULL to surface and image destructors 2018-04-25 08:28:48 +01:00
emersion
eaed6bd03b
render/egl: add wlr_egl_destroy_surface 2018-04-24 23:44:43 +01:00
emersion
8e2f3056f8
layer-shell: fix small memory leak 2018-04-24 22:40:48 +01:00
Guido Günther
ad22e02310 rootston: Damage layer-shell popups 2018-04-23 11:24:31 +02:00
Drew DeVault
0a0627f5d0 Finish forward-porting @acrisci's positioner work 2018-04-23 11:24:06 +02:00
Drew DeVault
2e3d901ac5 Forward-port xdg-shell-v6 positioner improvements 2018-04-23 11:24:06 +02:00
Drew DeVault
278aa84619 Basic layer popup rendering 2018-04-23 11:24:06 +02:00
Drew DeVault
d3cdb00208 Add (shitty) support for popups to layer example 2018-04-23 11:24:06 +02:00
Drew DeVault
6b7b64ec1e Generalize xdg-shell popups and add to layer-shell 2018-04-23 11:22:23 +02:00
Drew DeVault
edbf4a2f60 Implement output auto-selection in rootston 2018-04-22 19:15:49 +02:00
Drew DeVault
177b548b15 Update layer shell with optional wl_output 2018-04-22 18:57:45 +02:00
emersion
bfcd3f3707
Add wlr_subcompositor 2018-04-21 19:02:39 +01:00
emersion
fa84b267e0
Remove wlr_surface::subsurface 2018-04-21 18:40:25 +01:00
emersion
70d820be25
Add wlr_renderer_init_wl_shm to advertize supported renderer formats 2018-04-20 23:58:30 +01:00
Drew DeVault
dbdc63ddde
Merge pull request #873 from emersion/output-dont-emit-mode-twice
output: don't emit the mode event if it hasn't changed
2018-04-17 21:08:27 -04:00
emersion
94fa6c88f4
output: don't emit the mode event if it hasn't changed
This also fixes #535.
2018-04-18 00:15:25 +01:00
Uli Schlachter
98f8ec6a08 x11_handle_input_event: Remove return value
handle_x11_event() and x11_handle_input_event() react to different kinds
of events, so it does not make much of a difference if
x11_handle_input_event() signals if it handled an event or not.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-04-15 10:33:53 +02:00
Drew DeVault
63763d3279
Merge pull request #862 from emersion/renderer-scissor-upside-down
Make wlr_renderer_scissor take normal coords instead of upside-down ones
2018-04-13 09:32:41 -04:00
emersion
bcf5da5cd7
Merge pull request #866 from emersion/xwayland-unmapped-on-create
xwayland: emit new_surface when unmapped
2018-04-13 08:48:01 -04:00
emersion
fa02e30adf
xwayland: emit new_surface when unmapped 2018-04-13 14:37:13 +02:00
Drew DeVault
4dbf7f8b88
Merge pull request #865 from martinetd/str_truncation
Fix gcc string truncation warnings
2018-04-13 08:31:09 -04:00
Dominique Martinet
555206cf60 Fix gcc string truncation warnings 2018-04-13 14:37:53 +09:00
emersion
1b802d9251
Make wlr_renderer_scissor take normal coords instead of upside-down ones 2018-04-12 19:38:33 -04:00
emersion
8dec7036d0
Always unmap before destroying surface 2018-04-11 23:09:13 -04:00
emersion
17d0440b75
Add wlr_xwayland_surface_ping 2018-04-08 16:28:01 -04:00
emersion
c55ad11d96
xwayland: add _NET_WM_WINDOW_TYPE_MENU support 2018-04-08 12:02:52 -04:00
emersion
d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
Drew DeVault
ae4cef9e41
Merge pull request #825 from emersion/surface-iterators
Add surface iterators
2018-04-05 23:06:29 -04:00
Drew DeVault
6710de9878 Merge branch 'master' into xwayland-dnd 2018-04-05 15:04:49 -04:00
emersion
4a9a9eae9a
Add surface iterators 2018-04-05 14:18:17 -04:00
emersion
19b576734e
Merge pull request #834 from emersion/surface-is-subsurface
Add wlr_surface_is_subsurface and wlr_subsurface_from_surface
2018-04-05 14:16:45 -04:00
emersion
aced024819
Add wlr_surface_is_subsurface and wlr_subsurface_from_surface 2018-04-05 14:00:53 -04:00
Drew DeVault
da73b4f60b
Merge pull request #830 from swaywm/xdg-output
Add wlr_xdg_output_manager
2018-04-05 13:58:01 -04:00
Drew DeVault
abfe7923c4 Add wlr_xdg_output_manager 2018-04-05 12:40:30 -04:00
Timidger
527cc702d9
Added userdata to wlr_output_layout
Needed for https://github.com/swaywm/wlroots-rs/issues/131
2018-04-05 11:47:12 -04:00
emersion
3ea425d4e2
Fix xdg-shell popups, add wlr_xdg_surface_surface_at 2018-04-04 17:45:24 -04:00
emersion
c9d21106b4
Add wlr_xdg_surface_v6_surface_at and wlr_wl_shell_surface_surface_at 2018-04-04 17:42:16 -04:00
emersion
1a8b24bdd2
rootston: fix view_at 2018-04-04 17:16:35 -04:00
emersion
d16127b3cb
Fix wlr_surface_subsurface_at, change it to be wlr_surface_surface_at 2018-04-04 16:48:23 -04:00
emersion
9b440edaf4
output: document wlr_output_set_custom_mode 2018-04-03 23:05:49 -04:00
emersion
2d6bbf12f8
backend/{x11,headless}: fix refresh rate 2018-04-03 22:54:01 -04:00
Drew DeVault
2ecce27dd5
Merge pull request #807 from swaywm/input-inhibit
Input inhibit
2018-04-03 15:58:47 -04:00
Drew DeVault
1e39c37b3c
Merge pull request #810 from emersion/x11-backend-configure-fix-cursor
backend/x11: fix cursor position when receiving configure event
2018-04-03 15:44:07 -04:00
Timidger
920ab9f108
Added user data field for wlr_cursor
This is required for wlroots-rs.
2018-04-03 15:23:37 -04:00
Drew DeVault
56deff41b6 Implement input inhibit in rootston 2018-04-03 15:09:53 -04:00
Drew DeVault
3a8c7f283d Add input-inhibitor example client 2018-04-03 14:06:52 -04:00
Drew DeVault
ef4e833f13 Add wlr_input_inhibitor 2018-04-03 14:06:52 -04:00
emersion
41fccb8507
Merge branch 'master' into xwayland-dnd 2018-04-03 13:35:40 -04:00
emersion
9609985f29
backend/x11: fix cursor position when receiving configure event 2018-04-03 13:32:24 -04:00
emersion
591ea27cf9
xwayland: refactor selection code 2018-04-03 12:56:54 -04:00
Danilo Spinella
f83ad3f3ef Install include directory into includedir
Follow includedir parameter when installing include directory.
2018-04-03 16:56:32 +02:00
emersion
58ac05c276
Merge branch 'master' into xwayland-dnd 2018-04-03 10:38:46 -04:00
emersion
8f84c5b05f
xwayland: only send one target at a time 2018-04-03 00:44:04 -04:00
Drew DeVault
506acbdecd Missed a spot 2018-04-02 20:57:09 -04:00
Drew DeVault
333ab59902 Add wlr_surface_is_*_surface
And wlr_*_surface_from_wlr_surface
2018-04-02 20:42:02 -04:00
emersion
92b74071d0
xwayland: support multiple wayland → xwayland selection transfers
This fixes drag'n'drop support for Chromium.
2018-04-02 19:56:41 -04:00
Drew DeVault
37036df822 Handle layer surfaces below shell surfaces 2018-04-02 18:44:06 -04:00
emersion
8836b4f024
Merge branch 'master' into xwayland-dnd 2018-04-02 15:57:04 -04:00
Drew DeVault
a94f4d0edc Always give keyboard focus to the topmost layer 2018-04-02 15:48:22 -04:00
Drew DeVault
1f4a4a8641
Merge pull request #800 from emersion/untie-gles2-renderer-texture
Untie wlr_gles2_renderer and wlr_gles2_texture
2018-04-02 10:32:04 -04:00
Drew DeVault
8b37e8f67a
Merge pull request #792 from emersion/x11-backend-blank-cursor
backend/x11: hide cursor
2018-04-02 10:21:07 -04:00
emersion
f3f61bed3e
Untie wlr_gles2_renderer and wlr_gles2_texture 2018-04-01 16:07:50 -04:00
Tony Crisci
5a47da1ea6 annotate wlr-output-layout coord variables 2018-04-01 00:17:27 -04:00
emersion
a7bb48b404
render/egl: add wlr_egl_create_image_from_wl_drm
This allows external renderers and potential future GL-based
renderers to re-use this function.
2018-03-31 23:20:00 -04:00
emersion
33a2eb4b77
Untie wlr_backend from wlr_renderer 2018-03-31 18:49:43 -04:00
emersion
7b88ace557
backend/x11: hide cursor 2018-03-31 12:10:43 -04:00
Drew DeVault
96c6091f80
Merge pull request #786 from emersion/x11-backend-multiple-outputs
backend/x11: add support for multiple outputs
2018-03-31 10:13:43 -04:00
emersion
90fbab6f39
xwyaland: fix style issues 2018-03-31 00:35:08 -04:00
emersion
aa6ae710f7
backend/x11: fix input events 2018-03-30 23:51:19 -04:00
emersion
0a7a8cbd1c
backend/x11: add WLR_X11_OUTPUTS support 2018-03-30 23:51:19 -04:00
emersion
d4f7ced6e2
backend/x11: refactor, prepare support for multiple outputs 2018-03-30 23:51:16 -04:00
Drew DeVault
e19ee6d469 Add wlr_surface_point_accepts_input
Ref https://github.com/swaywm/sway/pull/1674
2018-03-30 23:02:11 -04:00
Drew DeVault
dc412c514b Find layer surfaces for input events 2018-03-30 17:27:10 -04:00
Drew DeVault
662f40b8ae Refactor cursor event passhtrough 2018-03-30 17:27:10 -04:00
Tony Crisci
212d957c69
Merge pull request #779 from emersion/xwayland-map-consistency
xwayland: rename map_notify to map for consistency
2018-03-30 16:16:52 -04:00
emersion
47a529a69c
output-damage: fix missing wlr_box include 2018-03-30 12:31:16 -04:00
emersion
865b0aa123
xwayland: rename map_notify to map for consistency 2018-03-30 11:01:23 -04:00
emersion
cadfccf1fd
xwayland: use a separate window for drag'n'drop 2018-03-29 17:53:47 -04:00
emersion
d5f46f4db4
data-device: redesign wlr_data_source 2018-03-29 17:53:13 -04:00
Drew DeVault
4137d9fc80 Destroy layer surfaces on client destroyed 2018-03-29 16:30:09 -04:00
Drew DeVault
b887af9a60 Fix maximized windows interaction with layer shell
If there were no layer surfaces the usable area of the output would be
an empty box.
2018-03-29 12:18:50 -04:00
emersion
ca2a73b90d
xwayland: allow drag data source transfer after drag ends 2018-03-29 11:40:19 -04:00
emersion
743466d475
data-device: add seat.drag_source 2018-03-29 11:33:40 -04:00
emersion
a316396eab
Merge pull request #720 from acrisci/xdg-positioner
xdg-positioner
2018-03-29 01:02:40 -04:00
Tony Crisci
2e63d1a0ca toplevel_box to toplevel_sx_box 2018-03-28 23:24:39 -04:00
emersion
6fd50947bd
xwayland: improve error handling 2018-03-28 21:36:53 -04:00
Tony Crisci
967bccffcd remove xdg-positioner wlr wrappers 2018-03-28 19:42:17 -04:00
Tony Crisci
376d1cc0da rename xdg-positioner structs 2018-03-28 18:30:38 -04:00
Tony Crisci
dbffda7549 xdg-positioner wlr abstractions 2018-03-28 16:27:08 -04:00
emersion
2a34b154e6
xwayland: send DND_DROP 2018-03-28 15:33:23 -04:00
emersion
73394deb76
xwayland: send DND_POSITION 2018-03-28 14:16:14 -04:00
emersion
5dd022da13
Merge pull request #765 from swaywm/transformed-events
Use libinput transformed events instead of width_mm/height_mm
2018-03-28 14:11:39 -04:00
emersion
0d7a81ccdf
xwayland: send DND_ENTER 2018-03-28 12:59:11 -04:00
Drew DeVault
52d621e097
Merge pull request #763 from emersion/x11-backend-kbd-modifiers
backend/x11: correctly update keyboard modifiers
2018-03-28 12:51:08 -04:00
Drew DeVault
32bdcdf719 Address review feedback 2018-03-28 12:33:17 -04:00
Drew DeVault
ac219cbda6 Remove width_mm from tablet events 2018-03-28 12:05:37 -04:00
Drew DeVault
324b9d910d Remove width_mm from wlr_touch events 2018-03-28 11:04:40 -04:00
Drew DeVault
a35a5786b0 Remove width_mm from wlr_pointer events 2018-03-28 10:46:50 -04:00
emersion
f033f717a2
backend/x11: make xcb-xkb optional, remove global state 2018-03-28 00:26:15 -04:00
Tony Crisci
41e54ba632 Merge branch 'master' into xdg-positioner 2018-03-28 00:20:39 -04:00
Tony Crisci
330ee08126
Merge pull request #744 from emersion/texture-redesign
Redesign wlr_texture
2018-03-28 00:14:57 -04:00
Drew DeVault
96a8df2f9a Fix ack configure/configure flow
Prevents FOUC/improves frame perfect rendering goal
2018-03-27 22:50:55 -04:00
Drew DeVault
52fe2688ea Address @emersion's feedback 2018-03-27 18:51:41 -04:00
Drew DeVault
13edb19a6c Fix issue starting up client EGL on X11 backend 2018-03-27 18:51:38 -04:00
Drew DeVault
776b81d499 Fix surface layer damage tracking 2018-03-27 18:50:32 -04:00
Drew DeVault
86ca4bea6d Fix layer rendering/layout bugs 2018-03-27 18:50:32 -04:00
Drew DeVault
097e87ca9f Handle usable area for maximized windows
Also fixes some bugs
2018-03-27 18:50:32 -04:00
Drew DeVault
ab6c2bf584 Reset exclusivity after shell layer
Also fixes an issue which was applying exclusivity to all edges
2018-03-27 18:50:32 -04:00
Drew DeVault
d1c0e6fe2c Add layer_surface.close 2018-03-27 18:50:32 -04:00
Drew DeVault
8c98c18880 Gracefully deal with outputs being removed 2018-03-27 18:50:32 -04:00
Drew DeVault
f444a0d14c Implement layer surface damage 2018-03-27 18:50:32 -04:00
Drew DeVault
4bf936360d Arrange & render layer surfaces 2018-03-27 18:50:09 -04:00
Drew DeVault
b31ce4220c Add broken test client and rootston stubs 2018-03-27 18:50:09 -04:00
Drew DeVault
88eec637a4 Address feedback 2018-03-27 18:50:09 -04:00
Drew DeVault
1628730b09 Add wlr_layer_surface_configure 2018-03-27 18:50:09 -04:00
Drew DeVault
b06105b564 Implement layer surface requests 2018-03-27 18:50:09 -04:00
Drew DeVault
3ba57fccd1 Wire up layer surface resources to stubs 2018-03-27 18:50:09 -04:00
Drew DeVault
f29d8b55ae Initial scaffolding of layer shell 2018-03-27 18:50:09 -04:00
Tony Crisci
575bc81d54
Merge pull request #754 from emersion/popup-map-unmap-damage
[WIP] xdg-shell: damage view when popup is mapped/unmapped
2018-03-27 17:37:03 -04:00
emersion
4abca435cc
rootston: damage view when xdg-popup is mapped/unmapped 2018-03-27 17:27:58 -04:00
emersion
19a525f3b5
rootston: damage view when zxdg-popup-v6 is mapped/unmapped 2018-03-27 17:24:25 -04:00
emersion
c42fd1018b
render: remove GL calls from wlr_egl 2018-03-27 17:02:48 -04:00
Tony Crisci
8371e2f41d implement flip_x 2018-03-27 14:49:31 -04:00
Drew DeVault
1ed90541f9
Merge pull request #753 from emersion/xdg-shell-unmap-destroy
xdg-shell-v6: don't destroy role resources on unmap
2018-03-27 13:15:32 -04:00
emersion
b6c1760de5
xwayland: create DND window, add DND atom helpers 2018-03-27 12:04:37 -04:00
emersion
171e28eaff
xdg-shell: don't destroy role resources on unmap, move toplevel fields
Ports 5233801530 and
334bab543d to xdg-shell stable.
2018-03-27 10:25:02 -04:00
Drew DeVault
ac715969ac Improve documentation of wlr_cursor 2018-03-27 09:24:23 -04:00
Dominique Martinet
a0b52a0dff Fix x11 backend
Need to include wlr/config.h before using the various WLR_HAS_xxx defines
2018-03-27 09:20:21 +02:00
Tony Crisci
bbd0e23fa7 xdg-positioner constraint detection 2018-03-26 23:48:32 -04:00
emersion
a918ec877e
xdg-shell-v6, xdg-shell: explain what popup geometry is 2018-03-26 22:11:41 -04:00
emersion
334bab543d
xdg-shell-v6: move toplevel specific fields in wlr_xdg_toplevel_v6 2018-03-26 19:32:21 -04:00
emersion
adf4fb08dd
Merge branch 'master' into texture-redesign 2018-03-26 19:13:13 -04:00
emersion
5233801530
xdg-shell-v6: don't destroy role resources on unmap
The motivation for this is:
- `get_popup` and `get_toplevel` allocate role-specific resources.
- On the first non-null commit, the surface gets mapped.
- On a null commit, the surface gets unmapped. It can be mapped
  again with a non-null commit.
- When the role object (xdg-toplevel or xdg-popup) is
  destroyed, the surface is unmapped and role-specific resources
  are destroyed. The client can call `get_popup` or `get_toplevel`
  again on that surface.
- When the xdg-surface object is destroyed, the surface is
  unmapped, role-specific resources are destroyed and the surface
  itself is destroyed.
2018-03-26 18:35:45 -04:00
Drew DeVault
891610081f
Merge pull request #751 from emersion/rotated-surface-damage
Fix damage tracking for rotated surfaces
2018-03-26 18:05:35 -04:00
emersion
140bc19476
rootston: add -D flag to enable damage tracking debugging 2018-03-26 17:34:46 -04:00
emersion
4555fc8a54
Fix damage tracking for rotated surfaces
It was broken because the damage extents were rotated about its
own center, not about the center of the surface.

This adds a new wlr_region_rotated_bounds that rotates regions.
This allows us to have only one code path (for both non-rotated
views and rotated views) and optimizes rendering for rotated
views.
2018-03-26 15:31:08 -04:00
Tony Crisci
4da18f7fc3 xdg-positioner attrs 2018-03-26 12:46:04 -04:00
emersion
793c3b3047
render: add simple functions to render rectangles and ellipses 2018-03-26 12:41:51 -04:00
emersion
c63d94483b
Redesign wlr_texture
- Textures are now immutable (apart from those created from raw
  pixels), no more invalid textures
- Move all wl_drm stuff in wlr_renderer
- Most of wlr_texture fields are now private
- Remove some duplicated DMA-BUF code in the DRM backend
- Add more assertions
- Stride is now always given as bytes rather than pixels
- Drop wl_shm functions

Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-24 23:48:32 -04:00
Tony Crisci
f53575e3a3 unified xdg-surface close 2018-03-24 15:11:26 -04:00
Tony Crisci
30b8fb5572 Merge branch 'master' into xdg-positioner 2018-03-22 20:06:53 -04:00
emersion
a854c2f246
Merge branch 'master' into gles2-renderer-redesign 2018-03-23 00:55:55 +01:00
Drew DeVault
ef3769851f
Merge pull request #740 from emersion/egl-debug
render/egl: use EGL_KHR_debug
2018-03-22 18:54:21 -04:00
Dominique Martinet
d5e14ab247 wayland backend: fix use-after free on output destroy
==12021==ERROR: AddressSanitizer: heap-use-after-free on address 0x617000015698 at pc 0x7f1a9abe1c09 bp 0x7ffe9068f6b0 sp 0x7ffe9068f6a0
WRITE of size 4 at 0x617000015698 thread T0
    #0 0x7f1a9abe1c08 in pointer_handle_leave ../backend/wayland/wl_seat.c:40
    #1 0x7f1a96ae7d1d in ffi_call_unix64 (/lib64/libffi.so.6+0x5d1d)
    #2 0x7f1a96ae768e in ffi_call (/lib64/libffi.so.6+0x568e)
    #3 0x7f1a988e0d8a  (/lib64/libwayland-client.so.0+0x8d8a)
    #4 0x7f1a988dd927  (/lib64/libwayland-client.so.0+0x5927)
    #5 0x7f1a988debe3 in wl_display_dispatch_queue_pending (/lib64/libwayland-client.so.0+0x6be3)
    #6 0x7f1a9abdd6d6 in dispatch_events ../backend/wayland/backend.c:28
    #7 0x7f1a9a968c11 in wl_event_loop_dispatch (/lib64/libwayland-server.so.0+0x9c11)
    #8 0x7f1a9a967449 in wl_display_run (/lib64/libwayland-server.so.0+0x8449)
    #9 0x418dff in main ../rootston/main.c:81
    #10 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #11 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)

0x617000015698 is located 664 bytes inside of 696-byte region [0x617000015400,0x6170000156b8)
freed by thread T0 here:
    #0 0x7f1a9af754b8 in __interceptor_free (/lib64/libasan.so.4+0xde4b8)
    #1 0x7f1a9abe01ee in wlr_wl_output_destroy ../backend/wayland/output.c:194
    #2 0x7f1a9ac12918 in wlr_output_destroy ../types/wlr_output.c:299
    #3 0x7f1a9abe061b in xdg_toplevel_handle_close ../backend/wayland/output.c:255
    #4 0x7f1a96ae7d1d in ffi_call_unix64 (/lib64/libffi.so.6+0x5d1d)
    #5 0x7f1a96ae768e in ffi_call (/lib64/libffi.so.6+0x568e)
    #6 0x7f1a988e0d8a  (/lib64/libwayland-client.so.0+0x8d8a)
    #7 0x7f1a988dd927  (/lib64/libwayland-client.so.0+0x5927)
    #8 0x7f1a988debe3 in wl_display_dispatch_queue_pending (/lib64/libwayland-client.so.0+0x6be3)
    #9 0x7f1a9abdd6d6 in dispatch_events ../backend/wayland/backend.c:28
    #10 0x7f1a9a968c11 in wl_event_loop_dispatch (/lib64/libwayland-server.so.0+0x9c11)
    #11 0x7f1a9a967449 in wl_display_run (/lib64/libwayland-server.so.0+0x8449)
    #12 0x418dff in main ../rootston/main.c:81
    #13 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #14 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)

previously allocated by thread T0 here:
    #0 0x7f1a9af75a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
    #1 0x7f1a9abe0703 in wlr_wl_output_create ../backend/wayland/output.c:272
    #2 0x7f1a9abdd8eb in wlr_wl_backend_start ../backend/wayland/backend.c:55
    #3 0x7f1a9abbeb49 in wlr_backend_start ../backend/backend.c:28
    #4 0x7f1a9abd8ce1 in multi_backend_start ../backend/multi/backend.c:24
    #5 0x7f1a9abbeb49 in wlr_backend_start ../backend/backend.c:28
    #6 0x418c32 in main ../rootston/main.c:58
    #7 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #8 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)
2018-03-22 21:27:49 +01:00
Dominique Martinet
de955a0f63 xdg_popup_grab: add listener on seat destroy 2018-03-22 21:25:41 +01:00
emersion
b1f93bc5cc
render/egl: use EGL_KHR_debug 2018-03-21 10:42:43 +01:00
emersion
cc5ef1d2ff
render/gles2: move list of supported WL formats to pixel_format.c 2018-03-21 08:50:59 +01:00
emersion
3581573bdc
render/gles2: make wlr_renderer_begin take viewport size
This allows raw GL calls outside wlr_renderer to be removed.
2018-03-21 07:37:09 +01:00
emersion
95e86e675a
render/gles2: remove global state, use OpenGL debug extension 2018-03-20 19:14:33 +01:00
Guido Günther
b3cb5a36c7 gles2: allow to specify texture target type
Allow to set the texture target type when generating/binding the
texture.  This allows us to attach the texture type to the texture so we
don't have to keep the logic elsewhere.
2018-03-20 14:30:30 +01:00
emersion
c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
Drew DeVault
a76cef475b
Merge pull request #733 from emersion/fix-matrix-transpose
Don't use OpenGL matrix transposition
2018-03-19 16:36:17 -04:00
Drew DeVault
8d490fdb34 Write some more docs 2018-03-19 15:46:28 -04:00
emersion
6ecb0eefcb
render/gles2: transpose matrices before binding them
Setting glUniformMatrix3fv's transpose parameter to GL_TRUE is
not allowed for OpenGL ES 2.

This adds a wlr_matrix_transpose function.
2018-03-19 20:21:02 +01:00
Drew DeVault
1956d3cedb
Merge pull request #722 from emersion/matrix-redesign
Matrix redesign
2018-03-17 15:22:00 -04:00
Tony Crisci
09413aa7f1
Merge pull request #711 from emersion/map-unmap
Add map/unmap to xdg-shell
2018-03-17 10:00:54 -04:00
emersion
7894fca224
matrix: rename wlr_matrix_texture to wlr_matrix_projection 2018-03-15 21:26:45 +01:00
emersion
e607d0f7ee
xdg-shell: add map/unmap support 2018-03-15 20:15:09 +01:00
emersion
876f07e9f1
renderer: replace wlr_texture_get_matrix by wlr_render_texture 2018-03-15 19:31:02 +01:00
emersion
1914a1aa2b
surface: drop wlr_surface_get_matrix 2018-03-15 18:35:22 +01:00
emersion
8b58e1a3ad
Merge branch 'master' into matrix-redesign 2018-03-15 15:48:09 +01:00
emersion
824a95ad19
matrix: use 2D matrices 2018-03-15 15:33:58 +01:00
emersion
de0e40d621
Merge pull request #698 from agx/linux-dmabuf
Add initial linux_dmabuf protocol support
2018-03-15 12:45:07 +01:00
Guido Günther
eb4337b5ee Wire up linux_dmabuf in rootston 2018-03-15 12:40:18 +01:00
Guido Günther
14cdb6153f Add initial linux_dmabuf protocol support
Tested with

    ./weston-simple-dmabuf-drm
    ./weston-simple-dmabuf-drm --import-immediate=1
    ./weston-simple-dmabuf-drm --y-inverted=1
    (and combinations)

Supports only single plane XRGB dmabufs for now.
2018-03-15 12:40:18 +01:00
emersion
d26b67cb06
matrix: unify API, don't use array pointers 2018-03-15 11:10:56 +01:00
emersion
b6a3f240c7
matrix: move to types/ 2018-03-15 09:11:27 +01:00
Tony Crisci
8836b167bf store xdg-positioner properties on the popup 2018-03-13 19:21:08 -04:00
emersion
ace738dbca
xdg-shell-v6: next_geometry and geometry fields are not longer pointers in wlr_xdg_surface_v6 2018-03-13 22:17:25 +01:00
emersion
149209b72e
xdg-shell-v6: rename toplevel and popup fields in wlr_xdg_surface_v6 for consistency 2018-03-13 22:09:44 +01:00
emersion
657e5c8c0d
xdg-shell-v6: changed wlr_xdg_surface_v6_configure.toplevel_state to be NULL if surface isn't a toplevel 2018-03-13 22:05:35 +01:00
emersion
e74ddaaf10
xdg-shell-v6: redesign the configure/ack_configure workflow 2018-03-13 19:57:21 +01:00
emersion
c1c88bfe5d
rootston: destroy seat view on unmap 2018-03-13 12:31:45 +01:00
emersion
6ac3534df6
rootston: add destroy to view interface 2018-03-12 09:17:06 +01:00
Guido Günther
2d0db16942 render: Flip textures in case of inverted_y 2018-03-11 19:02:05 +01:00
emersion
3f072bedd9
xdg-shell-v6: add map signal 2018-03-10 11:18:50 +01:00
emersion
c27fd1e1ee
rootston: add view_map and view_unmap 2018-03-09 10:29:22 +01:00
Drew DeVault
bfc0e95d2c Add mode support to libinput backend
And extend tablet example with tilt and ring support
2018-03-07 20:57:55 -05:00
Scott Anderson
3c9fc7c68e Add const to x11 and input interfaces 2018-03-06 21:16:18 +13:00
Scott Anderson
902d6cc240 Use xcb atoms properly 2018-03-06 21:15:47 +13:00
Dominique Martinet
2910972b25 xwm.h: fix guard ifdef and remove wlr_ prefix from xwm_atoms_contains 2018-03-04 11:16:18 +01:00
Dominique Martinet
d9a724c4a2 xcb errors: init errors context at start
`xcb_errors_context_new` is more than just a malloc, it does a few
xcb requests so we benefit from not generating a new context everytime
2018-03-03 17:06:30 +01:00
Dominique Martinet
7d1870c6f1 move xwm.h out of include/wlr
xwm.h was meant to be private, so move it to include/xwayland/xwm.h
We had an ifdef WLR_HAS_XCB_ICCCM in xwayland.h which was easy to move
to xwm, it is not safe to use the WLR_HAS_* in the public headers.

I checked a few of our current users and none rely on xwm.h being
public as expected (rootston, sway, hsroots)
2018-03-03 17:03:21 +01:00
emersion
c2ba1869ce
Merge pull request #670 from Ongy/xwayland_unmanaged
add xwayland unmanaged tests to support dmenu
2018-02-27 09:47:23 +01:00
emersion
1171368cfc
Merge pull request #687 from agx/roots_view.alpha
rootston: drop saved.alpha from roots_view
2018-02-26 19:53:55 +01:00
Guido Günther
f97ef3f5d4 rootston: drop saved.alpha from roots_view
It's currently unused.
2018-02-26 19:45:24 +01:00
Markus Ongyerth
a65ef8ea86 restore dpms state on drm resume
If there is no current mode, set outputs to dpms off in drm resume.
Sets current mode to null on disable to ensure this can be checked.
2018-02-26 18:12:51 +01:00
Markus Ongyerth
bb676013ed add xwayland unmanaged tests to support dmenu
This adds `wlr_xwayland_surface_is_unamanged`, to allow compositors more
fine grained control over XWayland focus.
A surface that is unmanaged should not receive focus, while other
windows that are just override redirect may want it (dmenu).
The way unamanged is determined is taken from wlc.
2018-02-26 12:02:49 +01:00
Drew DeVault
3296365ce5
Merge pull request #659 from agx/alpha
Make wlr_render_with_matrix use alpha
2018-02-25 13:16:35 -05:00
Guido Günther
e2ea1ebe48 rootston: Add alpha channel to views 2018-02-25 16:53:36 +01:00
Guido Günther
d08792bfff Add alpha to wlr_render_with_matrix
so we can use the alpha channel to e.g. blend in textures
2018-02-25 13:47:48 +01:00
Guido Günther
e6ca78b0e4 rootston: add view_create
so we can do basic view setup. Will be used to initialize alpha.
2018-02-25 13:47:43 +01:00
Tony Crisci
b7b86a9591
Merge pull request #641 from Ongy/idle-inhibit
Add idle-inhibit implementation
2018-02-24 10:15:18 -05:00
Markus Ongyerth
67285c1d57 idle-inhibit: style adjustments and motivation 2018-02-23 13:18:05 +01:00
emersion
ca3a947864
rootston: fix user-after-free in output_handle_destroy 2018-02-23 10:29:18 +01:00
emersion
b1e2718dd7
xwayland: fix some use-after-free in xwm 2018-02-23 10:20:53 +01:00
emersion
bd9583a7e8
Merge pull request #652 from agx/symbols-file
Add symbols file
2018-02-23 09:54:49 +01:00
Markus Ongyerth
a715826751 move activity_notify into events in wlr_idle
This moves the `struct wl_signal activity_notify` in `struct wlr_idle`
into a local `struct {} events` to keep consistency with other modules
in the library.
2018-02-22 21:14:28 +01:00
Markus Ongyerth
87a7afb641 idle-inhibit: second feedback pass 2018-02-21 16:22:04 +01:00
Guido Günther
2688f6163f Rename _strip_path to wlr_strip_path
since it's a public function
2018-02-21 10:25:52 +01:00
Markus Ongyerth
3016133f91 idle-inhibit: feedback pass 2018-02-20 13:41:10 +01:00
Drew DeVault
1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Drew DeVault
09cfa39392
Merge pull request #632 from acrisci/output-layout-adjacent
add wlr_output_layout_adjacent_output
2018-02-19 18:00:32 -05:00
Drew DeVault
868ad5af69
Merge pull request #647 from ascent12/elf_visibility
ELF Visibility
2018-02-18 21:49:23 -05:00
Scott Anderson
86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13:00
Drew DeVault
566c98846a
Merge pull request #645 from agx/x11-window-title
x11 backend: set window title
2018-02-18 17:46:51 -05:00
Guido Günther
15afef6cbc x11 backend: set window title
This makes windows identifiable in the window list
2018-02-18 23:42:04 +01:00
Scott Anderson
f27c0b44b8 Remove usec_to_msec from public API 2018-02-19 10:43:25 +13:00
Tony Crisci
9a8808f8cf move direction to wlr_output_layout.h 2018-02-17 18:48:50 -05:00
Tony Crisci
d2c7defa10 Merge branch 'master' into output-layout-adjacent 2018-02-17 16:34:32 -05:00
Markus Ongyerth
50d573b2ca implements the idle_inhibit protocol type
This adds the types/wlr_idle_inhibit_v1 implementation.
2018-02-17 12:37:12 +01:00
emersion
717bdccb6e
Merge remote-tracking branch 'upstream/master' into martinetd/xdg_shell 2018-02-16 18:25:58 +01:00
Tony Crisci
85871cb666 add wlr_output_layout_adjacent_output 2018-02-14 14:10:31 -05:00
Dominique Martinet
7d26a6debd xdg-shell stable: copy-pasta implementation 2018-02-14 12:52:30 +01:00
emersion
392d54a35d
Wrap wl_resource_get_user_data into safer helper functions
This ensures we're not incorrectly casting a resource.

Fixes #628
2018-02-13 23:48:46 +01:00
emersion
c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion
36ead80cd1
Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
emersion
10ecf871f2
Remove wlr_backend.events.{output_remove,device_remove} 2018-02-12 10:36:43 +01:00
emersion
5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
emersion
a9632341bf
output_damage: listen to transform and scale output events 2018-02-11 13:07:00 +01:00
emersion
5a8f098eea
output, output_damage: add docs 2018-02-11 13:04:00 +01:00
emersion
ec837e3c9e
Introduce wlr_output_damage 2018-02-11 12:49:30 +01:00
Drew DeVault
664d7bfe4e
Merge pull request #618 from VincentVanlaer/atomic-gamma
Add atomic gamma control
2018-02-10 09:51:09 -05:00
emersion
bf6d245400
Swap buffers with damage 2018-02-09 22:54:14 +01:00
Vincent Vanlaer
ab011406ad Add atomic gamma lut size fetching
Legacy gamma lut size now uses the new legacy_crtc member of
wlr_drm_crtc. This was Previously doen using old_crtc in
wlr_drm_connector, but since this refers to the crtc that was connected to
the ouput, this could give the wrong result.
2018-02-09 17:29:14 +01:00
Vincent Vanlaer
cc1229e75e Add atomic gamma setting 2018-02-09 17:29:04 +01:00
emersion
cdd55b5d19
Merge remote-tracking branch 'upstream/master' into output-damage 2018-02-09 14:50:26 +01:00
Vincent Vanlaer
74264d4f62 Rename roots_seat_cancel_transform 2018-02-08 13:13:33 +01:00
Vincent Vanlaer
90eb50d9aa Merge roots_seat_cancel_* into one function 2018-02-06 22:55:56 +01:00
Vincent Vanlaer
7ae8800a63 Cancel rootston move/resize/rotate on escape press 2018-02-06 12:36:38 +01:00
emersion
faa57341ca
output: replace raw GL calls by wlr_renderer_* calls 2018-02-03 10:01:42 +01:00
emersion
ddb1779f9f
render: make wlr_renderer_clear take a float[4] for the color 2018-02-03 09:32:02 +01:00
emersion
3d3ea32137
Merge remote-tracking branch 'upstream/master' into output-damage 2018-02-03 00:15:44 +01:00
emersion
bb4aeb3b2f
backend/drm: support updating cursor when session is paused 2018-02-02 21:01:59 +01:00
Drew DeVault
39d5e78d37 Fix typo in xcursor.h 2018-02-02 08:48:01 -05:00
Drew DeVault
8cf622f074 Improve xcursor docs 2018-02-01 20:30:32 -05:00
emersion
8eed857292
output: add destroy signal for wlr_output_cursor 2018-02-01 12:08:35 +01:00
emersion
edb4c8d858
output: damage whole output when fullscreen surface size changes 2018-01-30 22:06:10 +01:00
emersion
704130cc11
output: fix performance issues with wlr_output_schedule_frame 2018-01-30 14:45:02 +01:00
emersion
a7cba7d83f
rootston: damage whole output when entering/leaving fullscreen 2018-01-30 14:40:22 +01:00
emersion
2a855e6282
rootston: fix urxvt damage on HiDPI outputs
util/region: add wlr_region_expand
2018-01-30 12:01:10 +01:00
emersion
d498855b9d
backend/drm: fix hw cursor position on rotated and scaled outputs
output: add wlr_output_transformed_resolution
2018-01-30 10:23:35 +01:00
emersion
d0961a02af
render: add wlr_renderer_scissor docs 2018-01-30 10:00:58 +01:00
emersion
51c22d39a4
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-29 23:24:09 +01:00
Tony Crisci
ed5b1fdedd
Merge pull request #580 from emersion/screenshooter-renderer-backport
Backport screenshooter fixes from the renderer redesign v1
2018-01-29 17:13:23 -05:00
emersion
1ee61dbd0f
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-28 21:22:50 +01:00
Patrick Steinhardt
52cb19d99d rootston: fix compilation without XWayland support
In case wlroots is not being compiled with XWayland support, we will not
have an xwayland surface in our roots view. While we make sure to pay
attention to that in some places, we are not being consistent and try to
access the xwayland surface in other places. Obviously, this leads to a
compiler error due to the field not being present.

Fix the issue by sprinkling in a few additional ifdefs where required.
2018-01-28 12:07:15 +00:00
emersion
63736be214
rootston: fix damage tracking for SSD 2018-01-28 10:11:31 +01:00
emersion
7111dd79ef
rootston: damage tracking for rotated views 2018-01-27 10:43:17 +01:00
emersion
8d58ed502b
output: add wlr_output_schedule_frame 2018-01-26 22:39:23 +01:00
emersion
ece2c1e4e2
Damage tracking for transformed outputs 2018-01-26 22:11:09 +01:00
emersion
a98ece68d3
util: add docs for wlr_region_scale 2018-01-25 21:54:51 +01:00
emersion
4223fbc763
rootston: damage tracking scale support 2018-01-25 19:15:20 +01:00
emersion
3f96427d08
Merge branch 'output-damage' of github.com:emersion/wlroots into output-damage 2018-01-24 18:49:47 +01:00
emersion
6281deb90f
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-24 14:48:01 +01:00
emersion
7a2e9a17ba
Merge pull request #579 from Ongy/dpms_decouple
decouples outputenable state and wl_output global
2018-01-24 10:57:35 +01:00
Markus Ongyerth
f946c10cb1 re-adds wlr_output_update_enabled
Re-add the wlr_output_update_enabled to make sure
wlr_output::events.enable is called when the output enabled state
changes.
2018-01-24 10:23:48 +01:00
emersion
4fa90b0511
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
2018-01-23 22:06:54 +01:00
emersion
2ad7df8680
rootston: damage tracking for drag icons 2018-01-23 20:01:40 +01:00
Markus Ongyerth
3cf7225cec decouples outputenable state and wl_output global
This decouples wlr_output_enable and the wl_global.
The previously internal functions wlr_output_(destroy/create)_global are
exposed and used automatically in the wlr_output_layout to create/tear
down the global.
The compositor can handle them itself if it wants to, but I think this
is the right moment to create/destroy the wl_output when the
wlr_output_layout is used.
2018-01-23 17:40:12 +01:00
emersion
4d282c8590
rootston: damage tracking for drag icons 2018-01-23 13:37:58 +01:00
emersion
415a2b7c56
render: add wlr_renderer_clear and wlr_renderer_scissor 2018-01-22 16:42:22 +01:00
emersion
3f1c4f5be7
rootston: damage tracking for wl_shell 2018-01-22 16:01:32 +01:00
Tony Crisci
9d87d4e336 take roots_view out of input.h 2018-01-21 19:09:35 -05:00
Tony Crisci
9076ecd91f take seat.h out of view.h 2018-01-21 19:08:40 -05:00
Tony Crisci
85a6939cf2 rename matrix model box to project box 2018-01-21 19:03:10 -05:00
Tony Crisci
e8c407d00e rename wlr_deco_part to roots_deco_part 2018-01-21 18:46:19 -05:00
Tony Crisci
4183271475 make it work with rotation 2018-01-21 18:24:53 -05:00
emersion
59c53e8333
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-21 22:18:06 +01:00
Tony Crisci
d13114520a move matrix model code to matrix.h 2018-01-21 15:53:42 -05:00
Tony Crisci
7474f00591 Merge branch 'master' into decorations 2018-01-21 15:09:33 -05:00
emersion
66ae4071a7
rootston: damage tracking for xdg popups 2018-01-21 21:06:37 +01:00
emersion
d8b36357e4
rootston: add roots_view_child::destroy 2018-01-21 15:13:10 +01:00
emersion
a636d72fc7
rootston: track subsurface damage 2018-01-21 14:50:37 +01:00
emersion
eeffe11337
surface: add wlr_surface new_subsurface and wlr_subsurface destroy events 2018-01-21 14:22:33 +01:00
emersion
c6aab6f56c
Add docs and comments 2018-01-21 11:11:25 +01:00
emersion
0365b587f0
output: add damage tracking via buffer age 2018-01-21 00:06:35 +01:00
emersion
4ca38b84ed
backend/drm: fix hardware cursors not moving
This adds back `wlr_output::needs_swap`. This allows a backend to
request buffer swaps even if the output isn't damaged. This is
needed by the DRM backend to trigger pageflips when the cursor
moves.
2018-01-20 16:43:14 +01:00
emersion
e29a0df8c1
output: fix software cursors damage tracking 2018-01-19 14:08:47 +01:00
emersion
b296481007
rootston: remove repaint timer, listen for damage instead 2018-01-19 13:14:16 +01:00
emersion
a0f24b809e
output: add damage event 2018-01-19 13:13:46 +01:00
emersion
7f9f918b78
rootston: damage output on mode change 2018-01-19 11:31:04 +01:00
emersion
443bd4cd89
output: fullscreen surface damage tracking 2018-01-19 11:20:27 +01:00
emersion
bde255933e
output: add wlr_output::damage, fixes #572 2018-01-18 19:47:21 +01:00
emersion
8b3f3ddb7f
rootston: fix double-buffering artifacts 2018-01-18 17:18:21 +01:00
emersion
96d6f34edd
rootston: replace view_damage with view_apply_damage and view_damage_whole 2018-01-18 16:30:56 +01:00
emersion
01bcc2ab01
rootston: damage views when moved 2018-01-18 12:25:39 +01:00
emersion
5089f2d9fb
rootston: do not swap buffers when output isn't damaged 2018-01-18 11:42:54 +01:00
emersion
1a084807ce
rootston: do not redraw if output has no damage 2018-01-18 03:31:46 +01:00
Tony Crisci
b6f29e87e8 dont use pointer for modifiers 2018-01-17 08:31:15 -05:00
Tony Crisci
43896af90f Merge branch 'master' into modifier-fixes 2018-01-17 08:27:47 -05:00
Tony Crisci
61bd79200c basic decorations 2018-01-16 19:04:26 -05:00
Tony Crisci
3751a17321 decorate xwayland views 2018-01-16 07:51:10 -05:00
Tony Crisci
dc701b72fc abstract box matrix 2018-01-16 07:14:47 -05:00
Drew DeVault
b331c5c2c5
Merge pull request #549 from emersion/output-enabled
Add wlr_output::enabled
2018-01-15 20:53:13 -05:00
Tony Crisci
c690420501
Merge pull request #562 from emersion/xwayland-fullscreen-render-children
xwayland: render children window in fullscreen
2018-01-15 07:53:32 -05:00
Tony Crisci
e46d2dd0f8
Merge pull request #556 from raazvvann/heghe/idle-protocol
Idle protocol
2018-01-14 15:55:04 -05:00
emersion
65b28b3823
xwayland: render children window in fullscreen 2018-01-14 18:19:37 +01:00
Markus Ongyerth
dfae5ff98f Update comment for wlr_headless_backend_create 2018-01-13 21:41:04 +01:00
Markus Ongyerth
c00e9d1416 adds remote argument to wayland backend create
Add a remote display name argument to wlr_wl_backend_create.
If NULL is passed to the wayland backend at all times, creating a
wayland backend *after* the compositor was started up, would require
changing the WAYLAND_DISPLAY environment variable.
2018-01-13 21:20:15 +01:00
Heghedus Razvan
440cf7112d Include idle protocol in rootston
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-01-10 14:33:00 +02:00
Heghedus Razvan
21cc5e6fef Add idle protocol
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-01-10 14:32:41 +02:00
emersion
53ba9b4eec
Fix output enable in DRM backend 2018-01-07 00:28:21 +01:00
Tony Crisci
b40a5f084a keyboard grab enter with modifiers 2018-01-06 11:06:09 -05:00
emersion
8ebd7d4dbe
output: rename resolution event to mode 2018-01-06 12:42:32 +01:00
Tony Crisci
0ef2df21f2 compositor modifier hook 2018-01-05 07:00:50 -05:00
emersion
be3a7b0017
Disable outputs in rootston config 2018-01-04 15:48:28 +01:00
emersion
d9ecfbaf32
Add wlr_output enable event 2018-01-04 14:51:36 +01:00
emersion
771263380c
Add wlr_output::enabled 2018-01-04 12:46:15 +01:00
Tony Crisci
ce3a48c316
Merge pull request #542 from emersion/abstract-data-source
Abstract data sources
2018-01-04 06:15:17 -05:00
Drew DeVault
b23bd8ea28
Merge pull request #544 from emersion/fix-views-outside-output-layout
Fix views outside output layout
2018-01-01 11:45:08 -05:00
Drew DeVault
d438a877fd
Merge pull request #545 from emersion/fix-output-destroy
Free fullscreen surface and cursors when destroying output
2018-01-01 11:33:43 -05:00
Calvin Lee
5a26ed645a Allow configurable verbosity 2017-12-31 14:50:19 -07:00
emersion
9ac9ba861f
Free fullscreen surface and cursors when destroying output 2017-12-31 13:00:35 +01:00
emersion
1fe1d64042
Fix views outside output layout 2017-12-31 12:49:06 +01:00
emersion
38ed3b4245
seat: rename selection_source to selection_data_source, remove unused data_device 2017-12-30 09:58:04 +01:00
emersion
b20aed66d6
Abstract wlr_primary_selection_source 2017-12-29 23:23:00 +01:00
emersion
f237b5c7a7
Make wlr_data_source abstract.
This removes some fields specific to sources coming from clients.

This adds some drag'n'drop-related callbacks.
2017-12-29 22:51:33 +01:00
Dominique Martinet
ec952931a1 wlr_xwayland: preserve end of struct on restart
This is more robust than trying to recopy a few fields.
Note: wlr_xwayland->events.ready now resets after each trigger, so one can
hook on it again and be called when restart is ready
2017-12-29 20:50:50 +01:00
Dominique Martinet
689004ff21 rootston seat: implement part of roots_seat_destroy
... and have it listen to seat destroy notifier
2017-12-29 19:00:51 +01:00
Dominique Martinet
e0eafa0429 xwayland: listen to wlr_seat destroy signal 2017-12-29 19:00:08 +01:00
Dominique Martinet
58488ec5ce wlr_seat: add destroy signal 2017-12-29 17:55:03 +01:00
Dominique Martinet
bb0d888f25 xwayland selection: further cleanup on Xwayland exit
This is necessary if our last primary/clipboard selection was on Xwayland,
and we try to paste to native wayland after Xwayland died
2017-12-29 16:30:59 +01:00
Drew DeVault
c23bd2ab7a Further fixes to header install dir 2017-12-28 14:38:52 -05:00
Drew DeVault
9c163b7d38
Merge pull request #531 from acrisci/keyboard-num-keycodes
wlr-keyboard: keep track of number of keycodes pressed
2017-12-27 16:14:06 -08:00
Tony Crisci
e8b810ce3e keep track of number of keycodes pressed 2017-12-27 18:58:43 -05:00
Björn Esser
71e42dae90
libwlroots: Add shared library versioning 2017-12-27 18:00:13 +01:00
Björn Esser
48ecbff691
include: Generate and install version-header 2017-12-27 17:13:58 +01:00
Björn Esser
892f7a5db0
include: Install headers in an isolated include-dir 2017-12-27 17:13:58 +01:00
Björn Esser
ff13849624
config: Avoid clash with other config-headers 2017-12-27 17:13:58 +01:00
Tony Crisci
815d71a3aa validate grab serial for shell events 2017-12-27 08:04:01 -05:00
Tony Crisci
069f120b70 rootston: remove input event ring buffer 2017-12-27 07:31:53 -05:00
emersion
a79dc7df51
Merge pull request #524 from acrisci/role-committed
[wip] Role committed
2017-12-27 13:02:49 +01:00
Tony Crisci
5c5f0611c4 xwayland: role committed 2017-12-27 06:50:21 -05:00
Tony Crisci
e42d762a88 drag-icon: surface committed 2017-12-27 06:41:14 -05:00
Tony Crisci
68328700c7 wl-shell: role committed 2017-12-27 06:32:54 -05:00
Tony Crisci
e809250171
Merge pull request #519 from emersion/xwayland-primary-selection
Implement xwayland primary selection sync
2017-12-27 06:23:04 -05:00
Tony Crisci
d5ffa26564 xdg-shell: role-committed func 2017-12-27 06:15:25 -05:00
Tony Crisci
5a18f62fee add role-committed hook 2017-12-27 06:06:29 -05:00
Tony Crisci
6c2242e66b
Merge pull request #522 from emersion/fix-drm-output-transform-cursor
Fix cursor on transformed output with DRM backend
2017-12-27 05:48:45 -05:00
emersion
43435d4915
Add output transform helpers docs 2017-12-27 11:17:25 +01:00
Björn Esser
57a09c8ca4
config: Put all defines into config.h 2017-12-26 18:51:27 +01:00
emersion
e737f65e38
Fix cursor on transformed output with DRM backend 2017-12-26 18:16:37 +01:00
emersion
4a11609b76
Fix use-after-free when destroying selection sources 2017-12-25 18:18:26 +01:00
emersion
6dffaa7bb7
Implement xwayland primary selection sync 2017-12-25 16:10:16 +01:00
Dominique Martinet
e85c2827c8 rootston: add arbitrary libinput config 'tap_enabled'
This ought to be enough to serve as an example for other compositors to
use.
2017-12-24 14:55:38 +01:00
emersion
4476f79850
Fix primary clipboard issues 2017-12-22 23:45:07 +01:00
emersion
a95d09d561
Add missing gtk-primary-selection interfaces 2017-12-22 22:22:29 +01:00
emersion
0a171d3ace
Add wlr_primary_selection_device_manager and wlr_primary_selection_source 2017-12-22 19:20:12 +01:00
Tony Crisci
d1dce19253 handle display destroy 2017-12-21 08:17:35 -05:00
Tony Crisci
6c8fd6017e backend add and remove events 2017-12-20 05:54:41 -05:00
Tony Crisci
ee39dff1e7 rootston: handle backend creation failed 2017-12-20 05:51:23 -05:00
Tony Crisci
58e69c9ce1 multibackend remove subbackend 2017-12-19 18:49:00 -05:00
Tony Crisci
a937016e38 remove session from multibackend 2017-12-19 18:25:46 -05:00
Tony Crisci
4e804ef40f add backend destroy event 2017-12-19 18:14:47 -05:00
Dominique Martinet
fcd7062542 x11 backend: add wlr_input_device_is_x11 2017-12-19 20:40:36 +01:00
Dominique Martinet
169bc9fa10 wl backend: add wlr_input_device_is_wl 2017-12-19 20:20:32 +01:00
Dominique Martinet
d9eaca6c9f headless backend: add wlr_output_is_headless 2017-12-19 20:17:47 +01:00
Dominique Martinet
995383b049 headless backend: add wlr_input_device_is_headless 2017-12-19 20:16:12 +01:00
Dominique Martinet
be95147385 drm backend: add wlr_output_is_drm 2017-12-19 20:13:49 +01:00
Dominique Martinet
dabfe159de wl backend: add wlr_output_is_wl 2017-12-19 20:13:49 +01:00
Dominique Martinet
f83b16bc17 x11 backend: add wlr_output_is_x11 2017-12-19 20:13:49 +01:00
Dominique Martinet
3e228b0b2a libinput backend: add wlr_input_device_is_libinput 2017-12-19 20:13:49 +01:00
emersion
4a36ba4bdd
Destroy multi backend on display destroy 2017-12-19 18:28:47 +01:00
Drew DeVault
f3769a4b1f
Merge pull request #496 from emersion/headless-backend
Headless backend
2017-12-17 20:48:01 -05:00
Drew DeVault
10c72f4bf6
Merge pull request #487 from emersion/xwm-selection
xwm clipboard sync, 2nd edition
2017-12-17 20:03:26 -05:00
emersion
b99d1f4fcc
Refactor wlr_egl_init to accept config_attribs 2017-12-17 23:51:04 +01:00
emersion
bc5bdb7793
Add headless input devices 2017-12-17 18:49:20 +01:00
emersion
0256de0002
Add full refresh rate support to custom modes 2017-12-17 18:02:55 +01:00
emersion
b852fb9a2b
Minimal working headless output 2017-12-17 13:35:07 +01:00
emersion
3970264ccf
Initialize headless backend 2017-12-17 12:56:42 +01:00
emersion
8af6fbd7a0
Support multiple resources per seat client for data_device 2017-12-16 14:22:59 +01:00
emersion
4f0443a344
Support multiple resources per seat client for pointer, keyboard, touch 2017-12-16 13:53:39 +01:00
emersion
51db087210
Introduce fractional scaling 2017-12-15 01:00:03 +01:00
emersion
6b42bfad18
Merge branch 'master' into xwm-selection 2017-12-14 23:59:04 +01:00
Drew DeVault
23fb663ea4
Merge pull request #453 from emersion/surface-transform
Add surface transforms support
2017-12-14 14:43:04 -05:00
emersion
466e86b7b2
Merge branch 'master' into surface-transform 2017-12-14 20:31:18 +01:00
emersion
75ef7860bb
Merge branch 'master' into display-destroy 2017-12-14 20:29:30 +01:00
emersion
6ef0219763
Merge branch 'master' into xwm-selection 2017-12-14 11:20:38 +01:00
Drew DeVault
a9fb071d49
Merge pull request #485 from emersion/wl-backend-multiple-outputs
Multiple outputs with Wayland backend
2017-12-13 19:33:59 -05:00
Tony Crisci
ea4b871e16 xwm: user custom event handler 2017-12-13 17:54:19 -05:00
emersion
a1302cc4a5
Fix pointer events with multiple outputs in wayland backend 2017-12-13 22:32:22 +01:00
emersion
3b4b8953d9
Update output layout when scale or transform changes 2017-12-12 21:58:00 +01:00
emersion
c67a5824b8
Merge branch 'master' into display-destroy 2017-12-11 16:14:03 +01:00
emersion
529675b7b0
Add wlr_output_set_custom_mode 2017-12-11 12:14:23 +01:00
emersion
925497fbea
Set default cursor image in rootston 2017-12-11 10:36:22 +01:00
Drew DeVault
eb4e91f96d
Merge pull request #474 from emersion/customize-repeat-info
Make keyboard repeat info configurable
2017-12-08 15:47:11 -05:00
emersion
2c6e52c164
Add docs for wlr_keyboard_set_repeat_info 2017-12-08 17:06:31 +01:00
emersion
a3c0f97810
Make keyboard repeat info configurable 2017-12-08 17:03:05 +01:00
Tony Crisci
35188834db Merge branch 'master' into feature/xwm-selection 2017-12-08 09:22:44 -05:00
emersion
c5fa415a03
Send wl_surface.{enter,leave} to cursor surfaces 2017-12-08 14:23:33 +01:00
Tony Crisci
4c60072be5 move get_resize_name to xcursor 2017-12-08 06:08:06 -05:00
Tony Crisci
d74ac69f7b bring edges into wlr 2017-12-08 06:03:57 -05:00
emersion
6001235b04
Listen to display destroy in session
It's not the backend's responsibility to destroy the session anymore.
2017-12-08 11:17:56 +01:00
emersion
b06535718d
Do not destroy wl_client in wlr_xwayland_finish 2017-12-08 01:38:45 +01:00
emersion
18eb1eee3f
Listen to display destroy in xwayland, rename wlr_egl_free 2017-12-08 00:59:37 +01:00
emersion
9d43adaafa
Listen to display destroy in backends 2017-12-07 23:44:59 +01:00
emersion
bdb6e0b84c
Remove destroy event in screenshooter for now 2017-12-07 01:19:41 +01:00
emersion
0e066f0d76
Listen to display destroy in output 2017-12-07 01:12:04 +01:00
emersion
cbf5763c22
Listen to display destroy in xdg-shell-v6 2017-12-07 01:08:35 +01:00
emersion
9ddaea14a1
Listen to display destroy in wl-shell 2017-12-07 01:05:49 +01:00
emersion
983ea3033f
Listen to display destroy in seat 2017-12-07 01:02:07 +01:00
emersion
088ff9a614
Listen to display destroy in gamma control manager 2017-12-07 00:55:50 +01:00
emersion
c7900663bc
Add display destroy listener to data device 2017-12-07 00:50:55 +01:00
emersion
e6d2e72401
Remove display destroy listeners, add compositor listener 2017-12-07 00:44:45 +01:00
emersion
32591d66d6
Add display destroy listener in server decoration 2017-12-07 00:36:05 +01:00
emersion
dfe11a2b0e
Add display destroy listener in screenshooter, destroy display in rootston 2017-12-07 00:13:06 +01:00
emersion
bf2b58eb6d
Add wlr_output_set_scale
Fixes #465
2017-12-06 16:36:46 +01:00
Tony Crisci
86df909256 xwayland: remove xwayland param from xsurface methods 2017-12-03 17:30:57 -05:00
Drew DeVault
3f70043d00
Merge pull request #458 from acrisci/refactor/wlr-decoration-modes
wrap server decoration modes
2017-12-03 14:13:27 -05:00
Tony Crisci
344ca222db wrap server decoration modes 2017-12-03 13:39:29 -05:00
Tony Crisci
41d7bad470 wl-shell: add commit event 2017-12-03 12:37:23 -05:00
emersion
6a69b4419f
Make wlr_output_transform_* functions public, refactoring 2017-12-01 09:15:33 +01:00
emersion
f4754ad1a2
Fix surface transforms 2017-11-30 23:58:12 +01:00
Moritz
cef6d75491 Moved os-compatibility and added header
* Moved os-compatibility.c to util
* Added header under util
* Removed static since it isn't needed (i think so)
* Adjusted meson.build to include lib_wlr

Improved some codestyle

* Added guard to os-compatibility.h
* Fixed typo in include statment

Adjusted Guard

* Changed guard to _WLR_UTIL_OS_COMPATIBILITY
2017-11-30 18:01:13 +01:00
Tony Crisci
fc17c74516 xwayland: clean up seat setting 2017-11-22 08:23:23 -05:00
Tony Crisci
b0683874e9 xwm: send selection data 2017-11-22 08:10:06 -05:00
Tony Crisci
39e2ea8420 xwm: get selection targets 2017-11-21 18:09:25 -05:00
emersion
dcb168914e
Merge branch 'master' into fullscreen 2017-11-21 18:34:12 +01:00
Drew DeVault
1228d0da19
Merge pull request #387 from emersion/laggy-move-resize
Fix laggy move-resize
2017-11-21 11:13:18 -05:00
emersion
9a6f799d8f
Add fullscreen command, fix view_at with fullscreen views 2017-11-21 10:37:53 +01:00
emersion
17d9e2ce35
Unify view events naming, remove client from event structs 2017-11-21 09:50:00 +01:00
emersion
151901123f
Merge branch 'master' into refactor-wlr-list 2017-11-20 21:15:58 +01:00
emersion
54f1135c05
Fix fullscreen in xdg-shell 2017-11-20 20:53:13 +01:00
emersion
abab2902f5
Check for subsurfaces and popups before using wlr_output_set_fullscreen_surface 2017-11-20 19:45:10 +01:00
emersion
80998cdf57
Add support for fullscreen xwayland views 2017-11-20 17:58:26 +01:00
emersion
b04a9a248d
Initial fullscreen support 2017-11-20 17:27:36 +01:00
emersion
1d08d31709
Merge branch 'master' into laggy-move-resize 2017-11-20 14:35:31 +01:00
emersion
0153a0ed8f
Fix laggy move-resize for xwayland views 2017-11-20 12:05:21 +01:00
emersion
7904b625f0
Merge branch 'master' into laggy-move-resize 2017-11-19 22:28:51 +01:00
emersion
97ddd2d1df
Add roots_seat_cycle_focus 2017-11-19 19:21:18 +01:00
emersion
bf41e7a794
Make the close command use roots_seat_get_focus, rename a few symbols 2017-11-19 19:14:31 +01:00
emersion
a8b31da52c
Remove roots_seat_{add,remove}_view 2017-11-19 18:15:11 +01:00
emersion
76e8e1a6ad
Merge branch 'master' into seat-views 2017-11-19 17:56:26 +01:00
Tony Crisci
af23192ede wlr-seat: remove client bound and unbound signal 2017-11-19 11:13:59 -05:00
Tony Crisci
bd8cdf1e9f rootston: remove grab listeners 2017-11-19 10:20:32 -05:00
Tony Crisci
390b526450 Merge branch 'bug/xwayland-ready-listener' into refactor/wlr-drag-icon 2017-11-19 10:11:39 -05:00
Tony Crisci
90d2eca218 rootston: xwayland ready listener 2017-11-19 10:07:30 -05:00
Tony Crisci
3b74db467b data-device: wlr-drag-icon 2017-11-19 09:33:55 -05:00
emersion
016744ef4d
Refactor wlr_list inside wlroots 2017-11-19 00:17:40 +01:00
emersion
72d877658a
Merge branch 'master' into seat-views 2017-11-18 22:18:25 +01:00
Tony Crisci
f277f28eef Merge branch 'master' into feature/wlr-seat-touch 2017-11-18 13:43:25 -05:00
emersion
5b13f51dfc
Add per-seat cursor configuration 2017-11-18 17:34:24 +01:00
emersion
cd566ccd8e
Add cursor theme to rootston config 2017-11-18 09:47:53 +01:00
emersion
a3a8b7bfd8
Fixed a bug with move-resize, removed xdg-shell ack_configure event
Fixed move-resizing a view when only one coordinate changes.
2017-11-18 09:09:23 +01:00
emersion
e2843d87c8
Ensure to move the view when configured 2017-11-17 23:52:42 +01:00
emersion
27937add76
Merge branch 'master' into laggy-move-resize 2017-11-17 23:29:47 +01:00
emersion
bb6d34e7a5
rootston: add per-seat views 2017-11-17 12:45:07 +01:00
Tony Crisci
f61986e8db rename touch slot to touch id 2017-11-16 17:53:52 -05:00
Tony Crisci
fb18e345a6 wlr-seat: return serial from touch down interface 2017-11-16 17:44:10 -05:00
Tony Crisci
584ff1df4c Merge branch 'master' into feature/wlr-seat-touch 2017-11-16 16:19:17 -05:00
emersion
53d4cb47ff
Refactor rootston keyboard 2017-11-16 16:13:23 +01:00
Tony Crisci
12758a00a2 rootston: touch to focus 2017-11-15 08:34:48 -05:00
Tony Crisci
ac4841ba37 put dnd icon in the right place 2017-11-15 08:34:48 -05:00
Tony Crisci
a337e95505 wlr-touch: make dnd work 2017-11-15 08:34:48 -05:00
Tony Crisci
4eab61f86f wlr-seat: refactor touch grab interface 2017-11-15 08:34:48 -05:00
Tony Crisci
6a516f7c41 basic touch dnd 2017-11-15 08:34:48 -05:00
Tony Crisci
94e7dc8a3e data-device: touch grab stubs 2017-11-15 08:34:48 -05:00
Tony Crisci
cbb6fd7352 wlr-seat: touch grab begin and end 2017-11-15 08:34:48 -05:00
Tony Crisci
469729d3af wlr-seat: document seat touch functions 2017-11-15 08:34:48 -05:00
Tony Crisci
4240096b83 wlr-seat: default touch grab 2017-11-15 08:34:48 -05:00
Tony Crisci
e5a31ae870 wlr-seat: basic touch 2017-11-15 08:34:48 -05:00
emersion
3f6cf517b9
Add wlr_xdg_surface_v6_popup_get_position 2017-11-15 14:03:13 +01:00
emersion
f8b43940b1
Merge branch 'master' into cursor-scale 2017-11-12 22:12:50 +01:00
Drew DeVault
a317ecdab8 Run startup command after xwayland is ready 2017-11-12 16:01:48 -05:00
emersion
28fc813ca9
Merge branch 'master' into cursor-scale 2017-11-12 21:16:45 +01:00
Drew DeVault
1e0e73efaa Spawn views on last active output 2017-11-12 09:55:28 -05:00
emersion
5d986f1e87
Remove unnecessary include 2017-11-12 15:49:27 +01:00
emersion
8605243459
Introduce wlr_xcursor_manager 2017-11-12 11:10:56 +01:00
emersion
2dccb11741
rootston: keep one xcursor_theme per seat 2017-11-11 23:53:45 +01:00
emersion
09279b90a6
Add wlr_output.serial 2017-11-11 19:09:34 +01:00
emersion
aaf0691883
rootston: add roots_xcursor_theme
roots_xcursor_theme loads multiple wlr_xcursor_theme at different scales.
2017-11-11 18:42:14 +01:00
emersion
ac1573b0e7
Add scale parameter to wlr_cursor_set_image 2017-11-11 17:27:44 +01:00
Tony Crisci
1db3b55128 rootston: prefix config structs and functions 2017-11-11 10:59:04 -05:00
Tony Crisci
18079e234a rootston: documentation for config.h functions 2017-11-11 10:44:29 -05:00
Tony Crisci
6e00140e8a rootston: remove unused import and old todo from config header 2017-11-11 10:41:18 -05:00
Tony Crisci
2a9dc60f28 Merge branch 'master' into feature/multiseat 2017-11-11 09:59:39 -05:00
emersion
eb89f1dcd2
Fix resize issues with some xdg-shell apps.
Also renames view_get_size to view_get_box to be more consistent with wlroots API and make it more obvious that x,y are set (while in roots_view.get_size this isn't the case).
Fixes #407
2017-11-11 15:39:15 +01:00
Drew DeVault
5f3b27347c
Merge pull request #404 from emolitor/CPP-Compatibility
Remove VLA from session.h
2017-11-10 10:18:43 -05:00
Eric Molitor
5be11a5c95 Remove VLA from session.h
VLAs are optional C11 features and not supported by C++.
2017-11-10 15:12:00 +00:00
Tony Crisci
27a3a810ab rootston: fix multiseat focus 2017-11-10 08:27:45 -05:00
Drew DeVault
e6babc07a0
Merge pull request #390 from emersion/rootston-maximize
Maximize views in rootston
2017-11-10 08:26:20 -05:00
Drew DeVault
425713b837 Merge branch 'hidpi' 2017-11-10 08:21:50 -05:00
Timidger
80bf3cfff0 Fixes #399 Adds wlr_data_device_manager destructor
Fixed issues
2017-11-09 18:52:58 -08:00
Tony Crisci
739361aa70 wlr-keyboard: take out modifiers event struct (for now) 2017-11-09 17:29:28 -05:00
emersion
bf1b12a725
Fix maximize delay in xdg-shell 2017-11-09 21:41:11 +01:00
emersion
26dadacb71
Add wl_shell support for maximized views 2017-11-09 20:06:05 +01:00
Drew DeVault
66587eb430 Merge remote-tracking branch 'origin/master' into hidpi 2017-11-09 08:36:27 -05:00
Tony Crisci
79f5bd6ef8 Merge branch 'master' into feature/multiseat 2017-11-08 20:21:59 -05:00
emersion
2118c691b1
Add maximize support for xwayland in rootston 2017-11-08 23:03:07 +01:00
Tony Crisci
06642859f1 rootston: drag icons 2017-11-08 15:35:47 -05:00
Tony Crisci
428bf18ec7 rootston: request set cursor 2017-11-08 15:23:56 -05:00
Tony Crisci
992f931ae9 rootston: cleanup for multiseat 2017-11-08 14:53:08 -05:00
emersion
882e620639
Always read state from wlr_keyboard in the seat 2017-11-08 19:02:56 +01:00
Tony Crisci
a00b7f1e9b rootston: remove devices from seat 2017-11-08 09:04:33 -05:00
emersion
84d5e6bbb4
Send current keyboard state when entering a surface 2017-11-08 10:57:46 +01:00
Tony Crisci
09c6092423 multiseat: somewhat working 2017-11-07 15:56:11 -05:00
emersion
03d3fdc158
Basic maximization implementation for xdg-shell 2017-11-05 16:29:43 +01:00
Tony Crisci
2280928bb2 rootston: roots_cursor 2017-11-05 09:20:11 -05:00
Tony Crisci
b74c4cf974 Merge branch 'master' into feature/multiseat 2017-11-05 08:09:45 -05:00
emersion
3e3209cba2
Fix laggy move-resize in xdg-shell 2017-11-05 10:22:42 +01:00
Tony Crisci
704f0f158a rootston: move device init to seat 2017-11-04 13:12:35 -04:00
Tony Crisci
5354fe8729 move keyboard to seat 2017-11-04 09:23:57 -04:00
Drew DeVault
6d8e1abfc0 Improve input sensitivity
We now use doubles until the last minute, which makes it so we can move
the pointer more precisely. This also includes a fix for tablet tools,
which move absolutely and sometimes do not update the X or Y axis.
2017-11-04 01:35:12 -04:00
emersion
cf713edc10
Fix moving views when resizing below min size 2017-11-03 14:49:15 +01:00
Tony Crisci
9bd0f47efd rootston: refactor keyboard 2017-11-03 06:21:24 -04:00
Tony Crisci
447c561d15 rootston: seat config by device 2017-11-03 06:08:37 -04:00
Drew DeVault
86b8729998 Merge remote-tracking branch 'origin/master' into hidpi 2017-11-02 23:34:02 -04:00
Tony Crisci
53021f8ed4 rootston: break up input.h 2017-11-02 20:31:19 -04:00
Drew DeVault
62734d0553
Merge pull request #380 from emersion/xwayland-root-cursor
Set xwayland root cursor
2017-11-02 12:28:31 -04:00
emersion
3f4ad47421
Use compositor theme for xwm cursor 2017-11-02 16:49:22 +01:00
emersion
d11973ed7d
Fix disabled cursors 2017-11-02 11:37:43 +01:00
emersion
e18460c981
Add wlr_output.needs_swap 2017-11-01 20:08:15 +01:00
emersion
0df7a3c22d
Add wlr_seat_pointer_request_set_cursor_event.serial 2017-11-01 18:15:37 +01:00
Drew DeVault
0d9d670dbd
Merge pull request #365 from emersion/wayland-backend-transform
Cursors ✕ Output Transformations fixes
2017-11-01 10:21:02 -04:00
emersion
60c018c017
Fix hidden software cursors, fix cursor transformations on DRM backend 2017-11-01 14:25:41 +01:00
Drew DeVault
a6930cd8ea Handle output enter/leave correctly 2017-11-01 08:51:59 -04:00
Drew DeVault
a7446792a1 Consider scale factor when rendering views 2017-11-01 08:44:07 -04:00
Tony Crisci
1a756b3123 bugfix: dnd force cancel 2017-11-01 08:05:02 -04:00
emersion
0beae99188
Apply output transformation to pointer events in Wayland backend 2017-11-01 11:00:27 +01:00
emersion
c3b09f73da
Fix cursor hotspot with rotated outputs on DRM backend 2017-10-31 12:30:57 +01:00
emersion
4230a577cc
Remove wlr_cursor_set_xcursor for now 2017-10-31 12:30:56 +01:00
emersion
95566c6bdf
Transform cursor hotspot, fix wayland cursor hotspot 2017-10-31 12:30:56 +01:00
emersion
2e2d63a164
Manage wlr_output_cursor from wlr_cursor 2017-10-31 12:30:56 +01:00
emersion
1b6c729360
Add wlr_output_cursor 2017-10-31 12:30:03 +01:00
Drew DeVault
ebca06bfe4
Merge pull request #358 from acrisci/refactor/sec-to-msec
refactor input time_sec to time_msec
2017-10-30 15:50:31 -04:00
Tony Crisci
875a5b446f remove time usec 2017-10-30 15:43:06 -04:00
Tony Crisci
74bca7251b rename wlr_seat to seat on seat structs 2017-10-30 08:44:39 -04:00
Tony Crisci
fddef4d58e rename seat handle to seat client 2017-10-30 08:37:54 -04:00
Tony Crisci
a224e74fad refactor input time_sec to time_msec 2017-10-30 06:40:06 -04:00
Tony Crisci
c01248cf17 Merge branch 'master' into feature/xwm-rewrite 2017-10-29 10:43:10 -04:00
Drew DeVault
50e86a0efa Allow configuring output mode in rootston
Fixes #336
2017-10-28 15:32:08 -04:00
Drew DeVault
4281aefbf8
Merge pull request #324 from acrisci/feature/keyboard-redesign
wlr-seat: keyboard redesign
2017-10-28 10:56:41 -04:00
Tony Crisci
c555a66dda Merge branch 'master' into feature/xwm-rewrite 2017-10-27 15:22:00 -04:00
Tony Crisci
325def3841 xwm: create colormap and visual depth detection 2017-10-27 15:20:50 -04:00
Drew DeVault
9f1ed70b81
Merge pull request #344 from emersion/compositor-action-cursors
Set compositor cursor for move, resize and rotate
2017-10-27 13:42:53 -04:00
emersion
315c01ba0f
Remove input.last_active_view 2017-10-27 19:21:26 +02:00
Tony Crisci
be297d9d14 xwm: net wm state 2017-10-27 13:17:34 -04:00
emersion
ec5beeb8b8
Move xcursor stuff into its own file 2017-10-27 19:09:38 +02:00
Tony Crisci
6a4290b86a xwm: moveresize events 2017-10-27 10:48:09 -04:00
Drew DeVault
4bee96bd30 Merge pull request #333 from emersion/server-decoration
Add server-decoration protocol
2017-10-27 09:28:25 -04:00
emersion
a43acae000
Send server-decoration ack event automatically 2017-10-27 00:02:30 +02:00
emersion
c0c4816b13
Fix fallback when there are two config blocks for a keyboard 2017-10-26 22:38:03 +02:00
Tony Crisci
4a106648c4 xwm: remove incorrect implementation of net wm state 2017-10-26 15:58:18 -04:00
emersion
4e5d23daa9
Per-keyboard configuration 2017-10-26 19:59:32 +02:00
emersion
9d587d759f
Do not set hw cursor if disabled when switching VT 2017-10-26 18:58:44 +02:00
emersion
7c85709de1
Focus last view on close in rootston 2017-10-25 20:34:40 +02:00
Tony Crisci
0d1dd84a48 xwm: improve activation and dont send focus twice 2017-10-25 08:39:28 -04:00
Tony Crisci
e5ee01254b xwm: map and unmap notify 2017-10-24 21:07:46 -04:00
Tony Crisci
2ff94d0036 xwm: get rid of displayable surfaces list 2017-10-24 18:57:20 -04:00
emersion
e84d573b91
Complete server-decoration implementation 2017-10-24 23:22:27 +02:00
emersion
e521b0404b
Add server-decoration skeleton 2017-10-24 21:56:18 +02:00
Tony Crisci
79e14f65e0 xwm: fix lists 2017-10-24 14:37:18 -04:00
Tony Crisci
a3f2754668 xwm: add surface to rootston on surface commit 2017-10-24 12:00:43 -04:00
Tony Crisci
1dbe314937 Merge branch 'master' into feature/data-device-selection 2017-10-24 07:57:36 -04:00
Tony Crisci
d33a9f8eaa wlr-seat: keyboard redesign 2017-10-24 07:18:11 -04:00
emersion
eea532911a
Send output current mode when changed 2017-10-23 21:03:00 +02:00
Tony Crisci
d1dd0a6970 refactor buffer detection 2017-10-22 21:07:32 -04:00
emersion
1cc8f21d8e
Cleanup wlr_gamma_control 2017-10-22 23:11:26 +02:00
emersion
e1d213fccd
Create globals only for enabled outputs in DRM backend 2017-10-22 22:21:23 +02:00
Drew DeVault
c5fff08f8a Forgot to rename these 2017-10-22 10:56:40 -04:00
Drew DeVault
16f35ecbea Merge branch 'master' into heghe/wl_list 2017-10-21 22:03:48 -04:00
Drew DeVault
169b68b17c Rename remaining refs to wlr_list 2017-10-21 22:02:36 -04:00
Drew DeVault
24ae081001 Merge pull request #308 from ascent12/render-fixups
Render fixups
2017-10-21 18:08:58 -04:00
Scott Anderson
bdeffad7e5 Remove drm field from wlr_drm_connector 2017-10-22 10:36:07 +13:00
Scott Anderson
822a9f65a4 Add pointer to backend inside wlr_output 2017-10-22 10:36:07 +13:00
Scott Anderson
4ea84c5765 Remove unnecesary wlr_renderers 2017-10-22 10:36:07 +13:00
Scott Anderson
9b984253e2 Move egl.h to render/egl.h 2017-10-22 10:36:07 +13:00
Tony Crisci
6fcac087fe rootston: remove mostly unused mapped icon param 2017-10-21 09:59:35 -04:00
Tony Crisci
3c7ef3aae6 Merge branch 'master' into feature/data-device-selection 2017-10-21 09:43:24 -04:00
Tony Crisci
a87b60e31e Merge branch 'master' into feature/data-device-selection 2017-10-21 09:37:58 -04:00
emersion
c8570d0e42
Remove wl_list_init when using wl_signal_add 2017-10-21 12:35:51 +02:00
Drew DeVault
1782d5e7b7 Implement simple touch support for rootston 2017-10-20 23:19:41 -04:00
Heghedus Razvan
d3f0878d71 Replace list_t with wl_list in wlr_wl_backend
Now wlr_backend->outputs is a list of wlr_wl_backend_output instead of
wlr_output.

Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 19:44:59 +03:00
D.B
8c759d7abe Add startup command option to rootston
Allows specifying a command to run at startup.
2017-10-20 17:49:04 +02:00
Tony Crisci
eaed6b6d29 wl-output: send layout position 2017-10-20 07:29:01 -04:00
Heghedus Razvan
e1f196a3e9 Replace list_t with wl_list for wlr_input_device
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 11:50:43 +03:00
Heghedus Razvan
1d716241af Replace list_t with wl_list in wlr_output
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 11:46:09 +03:00
Heghedus Razvan
c03e774636 Replace list_t with wl_list in wlr_drm_backend
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 11:46:03 +03:00
Heghedus Razvan
bde25fe020 Replace list_t with wl_list in wlr_multi_backend
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 11:45:31 +03:00
Tony Crisci
169bc216ed rootston: view set position 2017-10-19 12:33:02 -04:00
Tony Crisci
c00a94ca76 data-device: fix drag icon position 2017-10-17 17:21:11 -04:00
Tony Crisci
b7c622a319 Merge branch 'master' into feature/data-device-selection 2017-10-17 16:01:17 -04:00
Drew DeVault
62371a9974 Merge pull request #257 from emersion/fix-client-cursors
[WIP] Fix client cursors
2017-10-17 09:22:43 -04:00
Tony Crisci
19784360f1 bug: fix view centering 2017-10-16 14:35:16 -04:00
Tony Crisci
2d35e20691 data-device: keyboard grabs 2017-10-16 07:52:04 -04:00
Tony Crisci
3f3110452c wlr-seat: pointer state button info 2017-10-16 06:31:53 -04:00
Tony Crisci
34f27ff691 wlr-seat: selection signal 2017-10-16 05:07:09 -04:00
Tony Crisci
02f4acc69f data-device: refactor set selections for xwayland 2017-10-15 14:49:43 -04:00
Tony Crisci
df0a8d3abe wlr-data-device: drag icons 2017-10-15 11:06:03 -04:00
Tony Crisci
a1bfa4a2f2 wlr-data-device: basic drag and drop 2017-10-15 05:59:52 -04:00
Tony Crisci
07259cf8ea wlr-data-device: source actions 2017-10-15 05:59:52 -04:00
Tony Crisci
25831d287e wlr-data-device: offer set actions 2017-10-15 05:59:52 -04:00
Tony Crisci
3892acecac wlr-data-device: basic clipboard 2017-10-15 05:59:52 -04:00
Tony Crisci
6a7560fae0 wlr-data-device interface 2017-10-15 05:59:52 -04:00
emersion
29abf93bb6
Check pointer focused surface instead of view at cursor 2017-10-12 14:28:37 +02:00
emersion
92daa790bb
Allow to update the cursor hotspot without its pixels 2017-10-12 09:40:51 +02:00
Enerccio
f53616ab1c Fixed wrong function name
Apparently I am first guy to ever call this...
2017-10-11 11:20:06 +02:00
Tony Crisci
0a6f54384c wl-shell: documentation 2017-10-10 12:24:56 -04:00
Tony Crisci
821cf92498 wl-shell: fix popup grab 2017-10-10 12:20:39 -04:00
Tony Crisci
f7e7f6271d wl-shell: cleanup 2017-10-10 11:13:11 -04:00
Tony Crisci
1b2742d0b2 bug: emit surface new event later 2017-10-10 10:28:43 -04:00
Tony Crisci
fe3c6c929b wl-shell: popup input handling 2017-10-10 10:00:09 -04:00
Tony Crisci
22a16a59ca wl-shell: basic pointer grab 2017-10-10 08:39:08 -04:00
Tony Crisci
cd1204f71f wl-shell: render popups in the right place 2017-10-10 08:39:08 -04:00
Versus Void
a6db47196c Upload texture on surface commit 2017-10-10 11:18:38 +03:00
Drew DeVault
c39bfe7f84 Merge pull request #206 from emersion/client-cursor
Client provided cursors
2017-10-09 17:56:05 -04:00
Tony Crisci
654e2ccd6b move surface finder functions to wlroots 2017-10-09 16:51:55 -04:00
Drew DeVault
d0d6413772 Merge pull request #220 from versusvoid/optional-xwayland
Make Xwayland optional
2017-10-09 08:09:03 -04:00
emersion
8492174088
Switch back to compositor cursor when switching from one view to another 2017-10-09 13:12:38 +02:00
emersion
4d157fe5de
Switch back to compositor cursor when leaving view 2017-10-09 12:51:28 +02:00
Timidger
3abf713e35 Fixed include in wlr_keyboard.h 2017-10-08 18:55:59 -07:00
emersion
8a77d1b6a2
Listen to cursor surface commit & destroy events 2017-10-08 23:11:59 +02:00
emersion
9b83caa658
Add wlr_output_set_cursor_surface 2017-10-08 21:21:06 +02:00
emersion
65d57920e5
rootston: handle request_set_cursor 2017-10-08 20:37:47 +02:00
emersion
78d3582b70
Add request_set_cursor event 2017-10-08 20:32:43 +02:00
emersion
7b6d785f52
Rename wlr_surface->signals to events 2017-10-08 19:12:28 +02:00
Drew DeVault
82a6598ca7 Merge pull request #243 from acrisci/feature/input-bounds
Use wl_surface input bounds for input handling
2017-10-08 12:52:53 -04:00
Drew DeVault
8dcf3bfdf7 Merge pull request #239 from emersion/center-views
Center views in rootston
2017-10-08 12:51:42 -04:00
Tony Crisci
db15ab77b4 use input bounds for pointer events 2017-10-08 12:33:39 -04:00
emersion
518ef46ef2
Activate new views 2017-10-08 18:19:05 +02:00
emersion
3774d6c2c0
Center wl shell views 2017-10-08 17:59:38 +02:00
emersion
3c6f2f29bf
Do not remove the commit listener 2017-10-08 17:28:19 +02:00
Drew DeVault
9e1ff2dce9 Merge pull request #140 from emersion/screenshooter
Add screenshooter
2017-10-08 10:06:41 -04:00
emersion
d09d01236b
Center xdg shell views 2017-10-08 12:17:25 +02:00
Scott Anderson
c0e5feea37 Add GL/EGL extension loader generator 2017-10-08 13:23:41 +13:00
emersion
0ce3135304
Move read_pixels from output to renderer 2017-10-08 02:11:56 +02:00
Tony Crisci
4f848000af Merge branch 'master' into feature/xdg-popup 2017-10-07 13:04:04 -04:00
emersion
a87f016017
Remove cairo dependency, write raw pixels 2017-10-07 19:01:11 +02:00
Tony Crisci
4680943e74 xdg-seat: keyboard grabs 2017-10-07 12:52:02 -04:00
emersion
d4cc82f11a
Call glReadPixels right before swapping buffers 2017-10-07 16:22:03 +02:00
emersion
05096ab458
rootston: create screenshooter interface 2017-10-07 16:22:03 +02:00
emersion
d0db6a80ab
Add post_frame event to wlr_output, use wlr_drm_plane_make_current in wlr_drm_output_read_pixels 2017-10-07 16:22:02 +02:00
emersion
35f9700251
First attempt to implement screenshooter 2017-10-07 16:22:02 +02:00
emersion
1c8b72e0cd
Add screenshooter skeleton 2017-10-07 16:22:02 +02:00
Versus Void
9cab66f0f9 Make xwayland compile-time optional 2017-10-06 21:50:25 +00:00
Versus Void
decd87043f Add config option to disable Xwayland 2017-10-06 21:48:50 +00:00
Drew DeVault
08ccc7f653 Merge pull request #221 from versusvoid/wayland-xkb_state_update_mask
Use xkb_state_update_mask() with Wayland backend
2017-10-06 15:16:10 -04:00
Versus Void
568b270cdf Use xkb_state_update_mask() with Wayland backend
Fix #158
2017-10-06 22:02:29 +00:00
emersion
69aff9b35e
Implement wlr_xdg_toplevel_v6_send_close 2017-10-06 16:03:35 +02:00
emersion
972e9dbd1b
Add close command, add close for xwayland 2017-10-06 16:03:35 +02:00
Tony Crisci
67ea307753 xdg-shell: cleanup 2017-10-06 07:52:18 -04:00
Tony Crisci
48ae4fc588 rootston: handle grab end 2017-10-06 07:32:59 -04:00
Tony Crisci
4657f10dd2 Merge branch 'master' into feature/xdg-popup 2017-10-06 07:04:27 -04:00
Tony Crisci
d3ebf99b0f xdg-popup: basic pointer grab 2017-10-06 06:54:43 -04:00
Versus Void
641d08ce7e Transform hotspot with cursor
Fix #188
2017-10-06 09:07:08 +03:00
Drew DeVault
b2d478a418 Merge pull request #189 from emersion/xwayland-hints
xwayland: add support for window hints
2017-10-05 16:27:30 -04:00
emersion
12b9b1a4bd
Copy xcb_icccm structs into wlroots 2017-10-05 22:23:37 +02:00
Tony Crisci
17b134e178 wlr-seat: pointer grab interface 2017-10-05 13:30:46 -04:00
Drew DeVault
d74a6d254f Merge pull request #198 from emersion/rootston-move-resize-rotate
rootston: force move, resize and rotate
2017-10-05 13:12:29 -04:00
emersion
454a6a902b
Parse _MOTIF_HINTS 2017-10-05 19:11:28 +02:00
emersion
fc61e82795
Use pointers for xwayland hints and size_hints 2017-10-05 19:11:28 +02:00
emersion
267f24753f
Add support for WM_HINTS 2017-10-05 19:10:24 +02:00
emersion
ca68ef37f0
Add padding if xcb_icccm is not available 2017-10-05 19:10:24 +02:00
emersion
ed9796ec68
xwayland: parse normal hints 2017-10-05 19:10:23 +02:00
emersion
ef5914bdb6
xwayland: add wlr_xwayland_surface->motif_hints 2017-10-05 19:10:23 +02:00
Versus Void
c5df6ca900 Fix memory leaks 2017-10-05 20:01:56 +00:00
Tony Crisci
30eabf38b8 Merge branch 'master' into feature/xdg-popup 2017-10-03 18:58:38 -04:00
emersion
f9dbc1841d
rootston: add meta-key to config file 2017-10-03 22:14:25 +02:00
Versus Void
606311c755 Reset buffer resource pointer on destroy signal 2017-10-03 19:57:54 +00:00
emersion
9b88f25208
rootston: rotate views! 2017-10-03 21:06:32 +02:00
emersion
521e893528
Add modifiers signal, remove wlr_keyboard_update_modifiers 2017-10-03 14:03:26 +02:00
emersion
d3d9aca40c
Add modifiers support in wayland backend, parse modifiers in rootston config 2017-10-03 08:46:11 +02:00
emersion
3a8fdebaaa
Fix modifiers handling, add wlr_keyboard_get_modifiers 2017-10-03 08:46:11 +02:00
emersion
2fccff16eb
Begin modifiers support 2017-10-03 08:46:11 +02:00
emersion
238ded1578
Use a command string rather than an action enum 2017-10-03 08:46:10 +02:00
emersion
97d0fe8976
Parse bindings in config, execute bindings 2017-10-03 08:46:10 +02:00
emersion
d32018f1ac
Use keysyms instead of keycodes 2017-10-03 08:46:10 +02:00
emersion
ab6c1f88e6
Add keyboard state to rootston 2017-10-03 08:46:09 +02:00
Tony Crisci
e003296c23 xdg-popup: render popups in the right place 2017-10-02 19:10:36 -04:00
Tony Crisci
97cdcccaf0 xdg-surface: get popup 2017-10-02 19:10:36 -04:00
Drew DeVault
87a0cb7ba3 Merge pull request #182 from ascent12/drm-multi-gpu
DRM Multi-GPU
2017-10-02 08:46:06 -04:00
Scott Anderson
f193623ca1 Change iface prefix to suffix 2017-10-02 21:44:33 +13:00
Drew DeVault
f2ea691b93 Add basic drawing tablet support to rootston 2017-10-01 11:21:55 -04:00
Scott Anderson
f6f9c40965 Minor fixes 2017-10-01 22:44:24 +13:00
Scott Anderson
009c3747a8 Multi-GPU DRM 2017-10-01 22:29:25 +13:00
Scott Anderson
fa3d0ed929 Change wlr_session to open every GPU 2017-10-01 16:47:05 +13:00
Scott Anderson
eaef028976 Add renderer pointer inside drm_surface 2017-10-01 15:55:25 +13:00
Tony Crisci
8f41c497a7 Merge branch 'master' into feature/subcompositor 2017-09-30 13:29:31 -04:00
Tony Crisci
8b7ae61ad4 subsurface handle parent destroy 2017-09-30 13:24:59 -04:00
Tony Crisci
4c1bd9bde8 input events for subsurfaces 2017-09-30 12:59:45 -04:00
emersion
7f5d0624d6
Add x, y, width, height arguments to wlr_xwayland_surface_configure 2017-09-30 16:33:04 +02:00
Tony Crisci
19e30aab9b subcompositor protocol errors 2017-09-30 08:55:40 -04:00
Tony Crisci
93f79378f7 subsurface stacking requests 2017-09-30 08:55:40 -04:00
Tony Crisci
86bc4840a0 subsurface commit and render 2017-09-30 08:55:40 -04:00
Tony Crisci
cb2d05e83b subsurface sync and position 2017-09-30 08:55:40 -04:00
Tony Crisci
7f39578824 cleanup wlr_surface.[ch] 2017-09-30 08:55:40 -04:00
Tony Crisci
68eeebc647 subsurface implementation stubs 2017-09-30 08:55:40 -04:00
emersion
74f2d0cd63
Completely fix resize offset 2017-09-30 14:02:09 +02:00
emersion
77d28183b5
Partially fix resize offset 2017-09-30 13:54:51 +02:00
emersion
28d4b475dc
Add edges support, remove get_input_bounds 2017-09-30 13:22:42 +02:00
Scott Anderson
4101b89700 Rename wlr_drm_output to wlr_drm_connector 2017-09-30 23:31:08 +13:00
emersion
33a97576ca
Add view_resize 2017-09-30 11:57:39 +02:00
Scott Anderson
22e77d9195 Rename backend to drm 2017-09-30 22:22:26 +13:00
Scott Anderson
ec5b95e08f Add pointer to backend from DRM outputs 2017-09-30 22:01:59 +13:00
emersion
97679b8e12
React to xdg shell resize requests 2017-09-30 10:39:06 +02:00
Scott Anderson
096249a2a1 Split DRM rendering to its own file 2017-09-30 20:52:58 +13:00
Scott Anderson
d0708b1a3a Split DRM internal interface to its own header 2017-09-30 19:11:41 +13:00
Scott Anderson
610b0493ac Rename files to remove pointless drm prefix 2017-09-30 19:03:34 +13:00
Scott Anderson
c8a8ff66f2 Removed unused fields 2017-09-30 18:53:05 +13:00
Drew DeVault
a48dedba3d Merge pull request #170 from emersion/xwayland
Improve xwayland, batch 2
2017-09-29 17:25:58 -04:00
emersion
4ccb83bf33
xwayland: add wlr_xwayland_surface_close 2017-09-29 23:18:12 +02:00
emersion
5002d968f3
xwayland: add window_type support 2017-09-29 23:03:01 +02:00
emersion
b78ae54158
xwayland: add pid support 2017-09-29 22:43:14 +02:00
emersion
97346e7a1b
xwayland: add state support 2017-09-29 22:26:03 +02:00
emersion
7c9f3240f6
xwayland: add set_parent event 2017-09-29 20:22:35 +02:00
emersion
d8c86431e0
xwayland: add signals for configure, set_{class,title} 2017-09-29 18:28:38 +02:00
emersion
f2b03b2ec1
Add reply->type checks, add XCB_ATOM_WM_TRANSIENT_FOR 2017-09-29 16:44:22 +02:00
emersion
47d767dbc4
xwayland: expose wlr_xwayland_surface_configure 2017-09-29 16:19:06 +02:00
emersion
e3917af69d
xwayland: read window title & class 2017-09-29 15:57:21 +02:00
Scott Anderson
1b18b0a27d Fix time and transform 2017-09-29 16:31:04 +13:00
Scott Anderson
6bf508df81 Add closing with WM button 2017-09-29 16:15:09 +13:00
Scott Anderson
8027232ae5 Add timer for rendering loop 2017-09-29 16:15:09 +13:00
Scott Anderson
9ca5b0cae8 Add basic input 2017-09-29 16:15:09 +13:00
Scott Anderson
3a5b150df2 Basic rendering 2017-09-29 16:15:09 +13:00
Scott Anderson
bbe90d41bb Add EGL for X11 2017-09-29 16:15:09 +13:00
Scott Anderson
517ba0bc16 Change egl_get_config to always use visual id 2017-09-29 16:15:09 +13:00
Scott Anderson
7ad2a57feb Open X11 Window 2017-09-29 16:12:13 +13:00
Scott Anderson
a598e6d026 Add X11 backend skeleton 2017-09-29 16:12:13 +13:00
Drew DeVault
ada7fde6fb DRY up focus and implement z ordering 2017-09-28 19:48:55 -04:00
Drew DeVault
10240af6ea Handle input device removal 2017-09-28 19:05:38 -04:00
emersion
b7927078e9
x11 -> xwayland, window -> surface, fix some calloc sizes and wrong types 2017-09-28 23:26:31 +02:00
Drew DeVault
c92199a953 Merge pull request #163 from emersion/wl_shell-fixes
wl_shell fixes
2017-09-28 13:29:49 -04:00
Drew DeVault
220a6e9bf6 Add xwayland activate and fix EGL bug 2017-09-28 09:11:16 -04:00
Drew DeVault
906a816abf Fix rootston keyboard, add Xwayland 2017-09-28 08:54:57 -04:00
emersion
9d405cffa7
Use enums instead of uint32_t where applicable 2017-09-28 13:12:01 +02:00
emersion
3d03ef2d02
role -> state 2017-09-28 12:45:47 +02:00
emersion
27ca8eaced
Fix typo: s/transcient/transient/ 2017-09-28 12:38:41 +02:00
Drew DeVault
7cf4ee128e Merge remote-tracking branch 'origin/master' into rootston 2017-09-27 20:25:34 -04:00
emersion
a04462ba8b
wl_shell: listen for wlr_surface destroy signal 2017-09-28 01:31:31 +02:00
emersion
63f277f3b9
rootston: handle request_move 2017-09-28 00:29:37 +02:00
emersion
d6c6b7c506
class_ -> class, free more stuff in destroy_shell_surface 2017-09-27 23:47:39 +02:00
emersion
241fec4d87
wl_shell: add wlr_wl_shell_surface_{configure,popup_done} 2017-09-27 23:45:09 +02:00
emersion
14ab56b6c5
wl_shell: implement set_popup request 2017-09-27 23:10:33 +02:00
emersion
663bfe4cd8
wlr_wl_shell: implement all requests except set_popup 2017-09-27 21:15:31 +02:00
emersion
e001e40022
Set view->surface 2017-09-27 15:03:35 +02:00
emersion
acf58e04de
Fix segfault, add wl_shell view 2017-09-27 14:48:53 +02:00
Drew DeVault
d7d73cd298 Merge pull request #144 from ascent12/drm-dp-mst
DisplayPort MST
2017-09-27 07:58:01 -04:00
emersion
ed9a43c213
Add first try to add wl_shell to rootston 2017-09-26 23:59:25 +02:00
Drew DeVault
e6a6634bc5 Minor tweaks to (broken) keyboard support 2017-09-25 08:47:00 -04:00
Drew DeVault
f4387b437f Merge branch 'master' into rootston 2017-09-25 08:29:51 -04:00
Drew DeVault
61e451ea1b Move keyboard logic to wlr_{keyboard,seat} 2017-09-24 14:12:56 -04:00
Drew DeVault
b84d59403f Initial keyboard support in rootston 2017-09-23 18:32:03 -04:00
Drew DeVault
0ca7932c3f Implement xdg surface request_move 2017-09-23 18:18:19 -04:00
Drew DeVault
eaf6c0ccf4 Implement pointer motion and buttons 2017-09-23 17:48:13 -04:00
Drew DeVault
d89272dbbd Merge pull request #156 from acrisci/feature/wlr-keyboard-events
[wip] wlr-seat-keyboard: keyboard events
2017-09-23 15:00:52 -04:00
Drew DeVault
57c50c78f0 Implement wlr_cursor in rootston 2017-09-23 14:53:15 -04:00
Tony Crisci
84a8f1b42d add keys array param to seat keyboard enter 2017-09-23 14:41:57 -04:00
Tony Crisci
3895593998 wlr-seat: keyboard layout 2017-09-23 14:09:54 -04:00
Drew DeVault
e81e99d16d Render XDG shell surfaces 2017-09-23 11:13:18 -04:00
Drew DeVault
7523de7c61 Wire up pointer, start on cursor 2017-09-23 10:36:32 -04:00
Drew DeVault
0699aa62d8 Initial pass on roots_input 2017-09-23 10:13:05 -04:00
emersion
4809b7b3e4
Fix some include guard names in interfaces/ 2017-09-23 13:10:10 +02:00
emersion
427bdb5b55
Use more consistent include guard names 2017-09-23 10:26:01 +02:00
Scott Anderson
025b3ee515 Add error recovery for failed page flips 2017-09-23 18:27:14 +12:00
Scott Anderson
459d138fa2 Add timeout to DRM cleanup
This prevents a potential infinite loop preventing us from closing
properly.
2017-09-23 16:32:25 +12:00
Drew DeVault
b6d7c3ed8e Initialize display, backend; add frame handling 2017-09-23 00:30:39 -04:00
Drew DeVault
550748681d Establish rootston headers & main 2017-09-22 23:30:40 -04:00
Tony Crisci
30b5d76426 wlr-seat: keyboard modifiers 2017-09-22 17:09:47 -04:00
Tony Crisci
cef1f60522 wlr-seat-keyboard: basic events 2017-09-22 16:28:11 -04:00
Drew DeVault
e5e6dab7fd Fix use of serial on motion_request 2017-09-22 11:11:53 -04:00
Tony Crisci
e38248f34c wlr-seat: implement cursor axis events
Axis events for the cursor are generated with the scroll wheel.
2017-09-22 10:30:09 -04:00
Scott Anderson
8cb49f4d68 Add stdbool.h 2017-09-22 14:17:29 +12:00
Drew DeVault
d558745633 Handle tablet motion in example compositor 2017-09-21 18:51:33 -04:00
Tony Crisci
7a3edf6e62 use double for cursor coordinates 2017-09-21 11:38:04 -04:00
Tony Crisci
8b74450b39 wlr_seat: pointer events 2017-09-20 19:43:49 -04:00
Tony Crisci
aeaa983631 wlr_seat: formatting cleanup 2017-09-19 15:38:06 -04:00
Tony Crisci
5b9373a791 xdg-toplevel-v6 set parent 2017-09-16 20:07:19 -04:00
Tony Crisci
2573c429ee reset pending geometry on ack configure 2017-09-16 19:32:23 -04:00
Tony Crisci
94f4f1878d xdg-surface-v6: implement ping 2017-09-16 12:35:49 -04:00
Tony Crisci
0f865c547a xdg-toplevel-v6: seat events 2017-09-16 08:31:08 -04:00
Tony Crisci
27161a673f xdg-shell new surface and ack configure events 2017-09-15 08:53:08 -04:00
Tony Crisci
569b147bba schedule configure request on toplevel first commit 2017-09-15 07:50:13 -04:00
Tony Crisci
a0bdbc92ba xdg-shell-toplevel configure requests 2017-09-14 16:27:14 -04:00
Tony Crisci
45a3b761a6 xdg-surface-v6: add events 2017-09-14 08:39:57 -04:00
Tony Crisci
50f4275298 implement xdg-toplevel state properties 2017-09-13 09:19:10 -04:00
Tony Crisci
353629b034 xdg-surface geometry 2017-09-13 08:44:32 -04:00
Tony Crisci
2fd5c7999b set title and app_id 2017-09-13 07:57:16 -04:00
Tony Crisci
9d2dc8447a use wlr_surface on shell struct and listen to events 2017-09-13 07:57:16 -04:00
Tony Crisci
b2c71287f2 set toplevel role on wlr_surface 2017-09-13 07:57:14 -04:00
Tony Crisci
c5f8f81e58 xdg_surface: handle wlr_surface destroy 2017-09-11 17:24:55 -04:00
Tony Crisci
74e9578889 add surface destroy signal 2017-09-11 13:01:53 -04:00
emersion
6f98b5a337
Add set_gamma and get_gamma_size to wlr_output_impl 2017-09-06 18:53:08 +02:00
emersion
cd125377fc
Add wlr_output_{set_gamma,get_gamma_size} 2017-09-06 17:34:09 +02:00
emersion
1b588e7c1f
Add gamma_control skeleton 2017-09-06 14:48:27 +02:00
Tony Crisci
e733b0e643 Rename wlr_output_layout_init()
Rename wlr_output_layout_init() to wlr_output_layout_create() to be consistent
with the rest of the api.
2017-09-05 17:53:29 -04:00
Tony Crisci
57c18c38bb wlr_cursor: handle layout changes
Add the layout `destroy` and `change` events.

When a layout is destroyed, detach is from the wlr_cursor.

When a layout is changed, warp the cursor to the closest layout boundary.
2017-09-05 07:48:28 -04:00
Tony Crisci
d84deb0742 add wlr_output destroy event 2017-08-31 07:47:44 -04:00
Tony Crisci
40bd6bcc43 implement output layout auto configuration 2017-08-31 07:47:44 -04:00
Drew DeVault
6daf9e9ab2 Merge pull request #120 from acrisci/feature/wlr-cursor
wlr_cursor
2017-08-29 12:12:18 -05:00
Tony Crisci
b6031d1065 refactor wlr_output_layout_closest_point 2017-08-29 12:36:39 -04:00
Tony Crisci
9b65d0b3f0 refactor and rename wlr_geometry to wlr_box 2017-08-29 12:36:39 -04:00
Tony Crisci
a51b76083e rename wlr_cursor_init to wlr_cursor_create 2017-08-29 12:36:39 -04:00
Tony Crisci
1fb8bc9340 wlr_cursor.c: fix formatting 2017-08-29 12:36:39 -04:00
Tony Crisci
3449777a8d wlr_output_layout.c: fix style 2017-08-29 12:36:39 -04:00
Drew DeVault
30611894f2 Implement tablet_tool support in pointer example 2017-08-28 22:12:35 -04:00
Tony Crisci
5c845f14ed handle input device destroy 2017-08-28 10:29:53 -04:00
Tony Crisci
df0ee7f25f implement tablet tool devices 2017-08-28 10:23:14 -04:00
Tony Crisci
5e06d61e42 implement touch up and touch down 2017-08-27 17:35:12 -04:00
Dominique Martinet
871646d225 Double-fork for xwayland execution
The intermediate fork needs to wait for SIGUSR1 for when Xserver is
ready, or SIGCHLD if the exec didn't work out.

Also change the exit() to _exit() as that is apparently more appropriate
for forks (and waitpid's status was wrong without it for some reason)

Fixes #122.
2017-08-27 21:41:08 +02:00
Tony Crisci
c914697676 add device to touch events 2017-08-27 11:44:55 -04:00
Tony Crisci
ed126b0881 add touch events 2017-08-27 11:34:25 -04:00
Tony Crisci
ac503a47a7 intersect cursor and device regions 2017-08-26 11:55:24 -04:00
Tony Crisci
0a97b68278 implement cursor and device geometry mapping 2017-08-26 08:32:11 -04:00
Tony Crisci
98f4cdfccb implement wlr_cursor_map_input_to_output 2017-08-26 08:32:11 -04:00
Tony Crisci
13e895d943 implement wlr_cursor_map_to_output 2017-08-26 08:32:11 -04:00
Tony Crisci
a4810203cc change output layout coords to double type 2017-08-26 08:32:11 -04:00
Tony Crisci
0cba06dcef implement wlr_cursor_warp 2017-08-26 08:32:11 -04:00
Tony Crisci
dd68f680e4 handle cursor to output edge cases 2017-08-26 08:32:11 -04:00
Tony Crisci
e3d47376dc add wlr_cursor basic implementation 2017-08-26 08:32:11 -04:00
Scott Anderson
d16b2977f6 Remove single GPU assumptions from wlr_session 2017-08-26 14:50:16 +12:00
Scott Anderson
fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Scott Anderson
46823152ea Rename functions to be consistent with #93 2017-08-26 11:56:43 +12:00
Dominique Martinet
fd3ad3b9e4 xwayland: fix shutdown caused by Xwayland/client stop 2017-08-24 07:51:24 +02:00
Dominique Martinet
3391e5b634 xwayland: fix style issues 2017-08-23 22:03:49 +02:00
Dominique Martinet
1458a95e65 example compositor: loop through xwayland surfaces 2017-08-23 22:03:49 +02:00
Dominique Martinet
eb5b9cc6da xwayland: move & split internal header file 2017-08-23 22:03:49 +02:00
Dominique Martinet
fa0e1015c6 xwm: fix minimal init, this gets us some events on window creations 2017-08-23 22:03:49 +02:00
Dominique Martinet
6eb20fb8d2 init xwm only once Xwayland server is ready 2017-08-23 22:03:49 +02:00
Dominique Martinet
3cc5b1acc6 wlr_compositor: add signal for create_surface 2017-08-23 22:03:49 +02:00
Dominique Martinet
b2bab1af5c xwayland: split xwm structure out, initial xwm.c 2017-08-23 22:03:49 +02:00
Dominique Martinet
49a823d4c6 Xwayland: first draft, just start server for now 2017-08-23 22:03:49 +02:00
Dominique Martinet
1ca08dc4cb wlr_compositor: change _init/finish to _create/destroy 2017-08-19 23:17:39 +02:00
Dominique Martinet
4110788159 move wl_compositor into wlroots as wlr_compositor 2017-08-19 21:56:51 +02:00
Dominique Martinet
f24b3df980 wlr renderer/texture: rename init to create when it does alloc 2017-08-19 08:33:31 +02:00
Tony Crisci
f03be94309 rename wlr_cursor to wlr_xcursor
This is for the implementation of another type that should be called wlr_cursor.
2017-08-18 19:48:55 -04:00
nyorain
86314caa5b Implement wlr_data_{source,device,device_manager} 2017-08-18 18:56:21 +02:00
Drew DeVault
e5fd858394 Merge pull request #101 from nyorain/texture_fix
Fix surface buffer uploading
2017-08-18 10:16:45 -04:00
Drew DeVault
3138c5ddf0 Clean up wlr_output_layout 2017-08-17 21:06:28 -04:00
Tony Crisci
5a9baf487e add helper methods for intersection 2017-08-17 21:05:13 -04:00
Tony Crisci
2e9e237f9d layout-output example: handle empty config 2017-08-17 21:05:13 -04:00
Tony Crisci
44181b57ac Add wlr_output_layout implementation
An output layout consists of a mapping of outputs to their position in a global
coordinate system that usually cooresponds to the output position in physical
space in front of the user.

Add an example that allows configuration of an output layout and demonstrates
its boundaries with a bouncing image.
2017-08-17 21:05:13 -04:00
nyorain
10eee58d2d Fix surface buffer uploading 2017-08-17 17:50:09 +02:00
Drew DeVault
18f1538108 Merge pull request #99 from nyorain/wlr_seat2
wlr_seat
2017-08-17 08:42:24 -04:00
nyorain
ad22b4874d Fix wlr_seat; add to example compositor 2017-08-17 13:06:53 +02:00
Drew DeVault
af5db7a44c Initial pass on wlr_seat 2017-08-17 12:57:04 +02:00
Dominique Martinet
577d2f6fcd wayland backend: switch to xdg shell
Closes #72 and #96.
2017-08-17 10:24:27 +02:00
Calvin Lee
901c14c409 Prevent alloc errors from crashing in list_t
This commit changes the `list_t` api so that alloc errors can be
detected and worked around. Also fixes errors not found in 5cc7342
2017-08-16 09:23:21 +02:00
Dominique Martinet
f9b55dfa95 Make wlr_wl_shell_create work like xdg
Also:
- rename wlr_xdg_shell_v6_init to create as that is what it does
- free wlr_xdg_shell on failure to create wl_global, the struct
is not initialized enough to call destroy at that point
2017-08-15 15:36:02 +02:00
Dominique Martinet
5dae8e1be8 example compositor: only iterate over wl_shell and xdg_shell surfaces 2017-08-15 15:34:26 +02:00
Dominique Martinet
f4e6b138fb Move wl_shell into wlroots 2017-08-15 15:13:23 +02:00
Drew DeVault
f60b53c6e3 Change how surface matricies are calculated 2017-08-15 08:52:30 -04:00
Tony Crisci
d5f98dbf61 refactor getting surface size into a function 2017-08-15 08:22:22 -04:00
Tony Crisci
5b1ce84350 implement buffer transform 2017-08-15 07:36:51 -04:00
Tony Crisci
84c6dbd58d remove unused dimension from buffer calculations 2017-08-15 07:36:51 -04:00
Tony Crisci
e46ec57b43 implement surface sizing 2017-08-15 07:36:51 -04:00
Tony Crisci
72a33b736f implement texture get buffer size 2017-08-15 07:36:50 -04:00
Tony Crisci
f0f190bfa5 implement buffer scale
Keep track of the scale of the buffer set by surface.set_buffer_scale.

Calculate the height and width of the texture from the buffer depending on the
scale when it is attached.

Use buffer damage to determine the damage of the buffer when flushing damage.

Convert surface damage to buffer damage and union to the surface buffer_damage
prior to flushing damage.
2017-08-15 07:36:50 -04:00
Drew DeVault
d2e796edb7 Merge pull request #86 from nyorain/master
Fix style issues
2017-08-15 07:18:22 -04:00
nyorain
d7dcbbc175 Add wayland backend cursor support 2017-08-14 18:02:05 -04:00
nyorain
f998bb8299 Fix style issues 2017-08-14 17:09:56 +02:00
Dominique Martinet
ba20d5b3ca Refactor out wlr_touch_state 2017-08-14 16:22:31 +02:00
Dominique Martinet
bd67849c03 Refactor out wlr_tablet_tool_state 2017-08-14 16:22:31 +02:00
Dominique Martinet
a289940bff Refactor out wlr_tablet_pad_state 2017-08-14 16:22:31 +02:00
Dominique Martinet
53e7bebd23 Refactor out wlr_pointer_state 2017-08-14 16:22:31 +02:00
Dominique Martinet
0a3246ad97 Refactor out wlr_keyboard_state 2017-08-14 16:22:31 +02:00
Dominique Martinet
e6ad67911b Refactor out wlr_input_device_state 2017-08-14 16:22:31 +02:00
Drew DeVault
de6f32c84e Refactor away wlr_renderer_state 2017-08-14 08:37:50 -04:00
Drew DeVault
94e6e6334b Refactor out wlr_texture_state 2017-08-14 08:25:26 -04:00
Drew DeVault
c8c6619146 Refactor out wlr_output_mode_state 2017-08-14 08:03:51 -04:00
Calvin Lee
de66bdb867 Add backend detection functions
Resolves #80
2017-08-13 23:08:33 +02:00
Drew DeVault
41e735242d Remove wlr_output_state, update backends 2017-08-13 11:38:03 -04:00
Drew DeVault
4386816889 wlr_backend_init -> wlr_backend_start
Also renames create to init. We'll use create for anything that
allocates and init for anything that takes a pointer and initializes it.
2017-08-13 10:19:57 -04:00
Dominique Martinet
5c82d2f5c3 libinput backend: massive renaming
- 'libinput' (backend's) to libinput_context
- 'device' (libinput_device) to libinput_dev
- 'dev' (wlr_device) to wlr_dev
- 'devices' lists tangling of libinput devices to wlr_devices
- 'devices' list of wlr_devices in backend state to wlr_device_lists
2017-08-13 08:18:05 +02:00
Drew DeVault
234b2104e4 Refactor wlr_backend_state out of DRM backend 2017-08-12 19:52:22 -04:00
Drew DeVault
c95a108d2f Update libinput backend with new state design 2017-08-12 13:51:47 -04:00
Drew DeVault
81cd90297d Refactor out wlr_backend_state from wl/multi 2017-08-12 11:43:36 -04:00
Dominique Martinet
3ea878b76e wayland backend: free seatName 2017-08-12 01:19:45 +02:00
Dominique Martinet
8427749dd0 wayland backend: emit signal for input/output removal 2017-08-12 01:16:12 +02:00
Drew DeVault
ce65a0c138 Merge pull request #69 from 4e554c4c/user_data
Add user data to wlr_* structs
2017-08-11 14:59:15 -04:00
Calvin Lee
a8c1e8ce69 Add user data to wlr_* structs
Resolves #68
2017-08-11 20:44:17 +02:00
nyorain
ed2fc30625 Fix wlr_surface invalid values 2017-08-11 20:30:42 +02:00
Drew DeVault
62d8b252c0 Refactor meson and move xdg-shell into wlroots 2017-08-11 09:37:09 -04:00
Drew DeVault
c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04:00
Drew DeVault
7095274a9e Merge branch 'master' into drm_buffer 2017-08-10 13:19:39 -04:00
Drew DeVault
7da43ff8b0 Implement wlr_surface_flush_damage 2017-08-10 08:26:16 -04:00
nyorain
31d78ff497 Fix wlr_surface destruction bug 2017-08-10 12:42:35 +02:00
Tony Crisci
14654ecb77 implement compositor create region
Complete the implementation of wlr_region_create and put it in the compositor.
2017-08-10 05:59:43 -04:00
nyorain
1901c3e1b6 Fix example for updated gles 2017-08-10 11:03:58 +02:00
nyorain
67369173aa Implement drm (egl) buffer attaching 2017-08-10 10:59:58 +02:00
Drew DeVault
750d0ad458 Flesh out wlr_surface state lifecycle a bit
Sprinked some TODOs around for future work
2017-08-09 23:34:50 -04:00
Drew DeVault
4de930542f Implement partial texture uploads 2017-08-09 22:17:40 -04:00
Tony Crisci
8306f46dfb implement surface frame
The surface frame callback lets a window know when it is a good time to show the
next frame if it is animating. In particular, this callback is used by
weston-simple-shm to throttle drawing.
2017-08-09 17:31:38 -04:00
nyorain
cf9ee6ce3f Move wlr_surface into wlr 2017-08-09 17:27:12 +02:00
nyorain
1bea754521 Implement wlr_region using pixman 2017-08-09 17:05:55 +02:00
Scott Anderson
af67966d92 Atomic modesetting 2017-08-09 08:07:00 -04:00
nyorain
e167f41fde Rename wlr_surface -> wlr_texture; attach -> upload 2017-08-08 18:25:16 +02:00
Drew DeVault
7486263f7e Add xcursor sublibrary 2017-08-07 21:13:04 -04:00
Scott Anderson
d09ca20a4d Use gbm_bo_map for cursor 2017-08-07 21:07:42 +12:00
Scott Anderson
5a636b21ba Remove old fields 2017-08-06 21:51:34 +12:00
Scott Anderson
5f7042a1f2 Moved headers 2017-08-06 21:49:04 +12:00
Scott Anderson
1db97a9af9 Updated DRM cursor rendering 2017-08-06 21:38:40 +12:00
Scott Anderson
7b772e1a4b DRM resource initalisation 2017-08-06 15:49:02 +12:00
Drew DeVault
5bf61ca7ed Check for multi backend before using it 2017-08-05 23:08:35 -04:00
Scott Anderson
4d4da18437 Fixed VT switching 2017-08-06 13:37:49 +12:00
Scott Anderson
cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Scott Anderson
2ae5cd6539 Moved session/ into backend/ 2017-08-06 13:25:26 +12:00
Scott Anderson
ae4478e17f Changed ownership of wlr_session to the multi backend.
Currently breaks VT switching for examples.
2017-08-06 13:25:26 +12:00
Tony Crisci
effea557bb Implement destroying surfaces
Add a signal for wlr_surface destruction on the wlr_surface that compositors
can listen to to remove the surface from their state.

Implement a listener for this in the example wl_compositor to remove the
surface from its internal list of surfaces.

Destroy the surface in the compositor destroy_surface callback given when the
surface resource was created.

Add a reference to the surface resource to the wlr_surface so a compositor can
find it in its list of resources upon wlr_resource destruction.
2017-08-04 11:53:55 -04:00
Drew DeVault
e92a65fee8 Remove use of missing header 2017-07-12 09:49:26 -04:00
Scott Anderson
8189c64d7f Fixed that warnings that showed up with optimisations. 2017-07-11 00:14:55 +12:00
Scott Anderson
5b8ec107b9 Session documentation. 2017-07-09 23:02:41 +12:00
Scott Anderson
3779ef802d Stop remembering the drm fd in child. 2017-07-09 22:23:54 +12:00
Scott Anderson
2f2c8205d8 Moved IPC to its own file. 2017-07-09 22:12:50 +12:00
Scott Anderson
bd5bca5283 Added public fields to wlr_session 2017-07-09 17:53:13 +12:00
Drew DeVault
8920b5d607 Merge branch 'wlcore' 2017-06-29 16:00:24 -04:00
Drew DeVault
18e6ddc1c5 Remove wlr_compositor 2017-06-28 17:25:01 -04:00
Drew DeVault
f5b7bc033e Add wlr_wl_compositor and remove wlr_wl_shm 2017-06-26 10:26:55 -04:00
Scott Anderson
0cd94f0cf0 Added software cursor fallback 2017-06-26 17:34:15 +12:00
Drew DeVault
8a18cf456a Remove endian.h
Fuck big endian systems anyway
2017-06-23 14:46:18 -04:00
Drew DeVault
5a2796266f Support wl_shm pixel formats in gles2 renderer 2017-06-23 14:25:55 -04:00
Drew DeVault
2aafb5dd19 Add wlcore/wl_shm (WIP) 2017-06-23 13:41:07 -04:00
Drew DeVault
b18209c904 Switch to GLES2
Closes #13
2017-06-23 11:38:45 -04:00
Drew DeVault
168f0955ab Add wl_output globals for wlr_outputs 2017-06-22 14:27:35 -04:00
nyorain
dbde1f7340 Store wayland backend axis source 2017-06-22 17:58:53 +02:00
nyorain
272030652a Implement absolute motion events for wayland 2017-06-22 17:55:00 +02:00
nyorain
c1520077b6 Implement wayland backend input events 2017-06-22 16:53:48 +02:00
Drew DeVault
3d71969b2a Make event names consistent 2017-06-21 14:07:09 -04:00
Drew DeVault
f4453d104d Reorganize wlr-common 2017-06-21 12:10:07 -04:00
Drew DeVault
fd91244e83 Update everyone to use new headers 2017-06-21 10:27:45 -04:00
Drew DeVault
53a8b4f127 Split out types.h and wlr/types.h
TODO: Update the code accordingly and move other types into the same
paradigm
2017-06-21 10:10:04 -04:00
Scott Anderson
55854565dc Fixed VT switching 2017-06-21 13:31:29 +12:00
Scott Anderson
091de12bf4 Changed session signal to only emit on DRM changes 2017-06-21 12:47:53 +12:00
Drew DeVault
c2d0090ad7 Support multiple wl backend outputs 2017-06-20 18:22:21 -04:00
Drew DeVault
b9d36c8149 Add dynamic output resizing for Wayland backend
This allows outputs to:
- Not support modesetting
- Resize themselves
2017-06-20 17:51:45 -04:00
nyorain
50ce35e9da Implement wayland backend output 2017-06-20 18:27:05 +02:00
nyorain
62b1421635 Make egl_error function part of the egl interface
The function may be useful for backends using egl.
2017-06-20 18:26:29 +02:00
nyorain
792d535225 Rework wayland backend output implementation 2017-06-19 22:36:40 +02:00
nyorain
e65ca967f9 Merge branch 'master' into wayland-backend 2017-06-19 21:22:42 +02:00
Drew DeVault
41b5294013 Merge pull request #16 from nyorain/master
Make logging ninja friendly
2017-06-19 15:18:48 -04:00
Drew DeVault
632a04f1b7 Implement keyboard LEDs 2017-06-19 15:15:37 -04:00
Drew DeVault
ecb04afcad Implement tablet pads 2017-06-19 14:49:07 -04:00
nyorain
acbc0a019a Make logging ninja friendly
When building with ninja instead of make __FILE__ will be relative
and logging therefore break. This moves stripping the path
from __FILE__ to runtime and handles a relative filepath as
well as a full one.
2017-06-19 20:01:35 +02:00
nyorain
8fbf1ca3ff Continue wayland backend update
Update wayland backend to new api.
Start to use the input interfaces.
Compiling now, not tested.
2017-06-19 19:05:10 +02:00
nyorain
41a477375c Merge branch 'libinput' into wayland-backend 2017-06-19 17:49:26 +02:00
nyorain
904739c405 Start to fix wayland backend
Starts to update the wayland backend to the new backend api.
Not yet updated to libinput branch (not yet compiling).
2017-06-19 17:46:50 +02:00
Drew DeVault
7e038a6110 Add (broken) DRM hardware cursors 2017-06-16 15:38:34 -04:00
Drew DeVault
2443a070e7 Add colored quad and ellipse rendering primitives 2017-06-15 15:31:13 -04:00
Drew DeVault
4a9966b1a4 Implement wlr_tablet_tool 2017-06-15 14:32:53 -04:00
Drew DeVault
3f24f8a1be Flesh out touch events and add demo 2017-06-14 14:50:09 -04:00
Drew DeVault
d6905f86cb Allocate wlr_touch devices 2017-06-14 11:40:03 -04:00
Drew DeVault
a63230e59c Implement libinput wlr_pointer 2017-06-13 11:05:45 -04:00
Drew DeVault
e257afeb7e Establish multi backend support 2017-06-13 08:10:36 -04:00
Drew DeVault
5dd96c0772 Incorporate XKBCommon into example 2017-06-13 08:10:36 -04:00
Drew DeVault
7a5f35b5bb Reassign ownership of libinput handle 2017-06-13 08:10:36 -04:00
Drew DeVault
f479b7c8c7 Split keyboard code out into its own file 2017-06-13 08:10:36 -04:00
Drew DeVault
59ceaf507e Handle key presses 2017-06-13 08:10:36 -04:00
Drew DeVault
0e75d157f5 Initialize keyboards from libinput 2017-06-13 08:10:36 -04:00
Drew DeVault
019fff06be Fix issues, flesh out event handling somewhat 2017-06-13 08:10:36 -04:00
Drew DeVault
af69591e62 Add error handling and init in backend_autocreate 2017-06-13 08:10:36 -04:00
Drew DeVault
1262f1400c Initial pass on libinput backend 2017-06-13 08:10:22 -04:00
Drew DeVault
325a331425 Fix some build errors 2017-06-12 22:45:25 -04:00
Drew DeVault
2b06f88f0b Combine internal DRM headers into one
Everything always just included both anyway
2017-06-10 12:30:02 -04:00
Drew DeVault
2b909e1729 Add error "handling" to gles3 backend 2017-06-09 10:28:50 -04:00
Scott Anderson
63c3faa006 Fixed rendering bug: Delay calling gbm_surface_release_buffer until it
has been scanned out.
2017-06-09 17:15:55 +12:00
Drew DeVault
cd6a40d816 Further improvements to rendering subsystem 2017-06-08 15:52:42 -04:00
Drew DeVault
83f8864f0a Add wlr_renderer and move quad rendering there 2017-06-08 12:02:51 -04:00
Drew DeVault
211488131f Add wlr_shader to wlr-render 2017-06-08 11:30:38 -04:00
Drew DeVault
fc1dc1b5b0 Use constant VBO for quad, add matrix stuff 2017-06-07 21:35:07 -04:00
Scott Anderson
382f712792 Merge remote-tracking branch 'upstream/master' into rotation 2017-06-08 00:52:33 +12:00
Scott Anderson
632a7acb03 Filled out more wlr_output fields. 2017-06-08 00:39:40 +12:00
Scott Anderson
53dd622263 Provide user with transformation matrix 2017-06-07 16:43:57 +12:00
Drew DeVault
6f5c70ac69 Let backend track transform state
This will be necessary to provide it to clients via wl_output.
2017-06-06 11:48:30 -04:00
Scott Anderson
c97de93fe1 Added output rotation example 2017-06-05 22:48:51 +12:00
Scott Anderson
b537656b4b Removed inline function 2017-06-05 15:09:41 +12:00
Scott Anderson
cf07a9fc4f Logging improvements 2017-06-05 14:50:33 +12:00
Drew DeVault
7d82476590 Refactor type implementations 2017-06-04 19:30:50 -04:00
Scott Anderson
5df56653ab Changed invalidate interface. 2017-06-04 17:43:34 +12:00
Scott Anderson
de44994dfc Udev event device matching 2017-06-03 15:47:33 +12:00
Drew DeVault
40b85d992a Refactor udev and drm initialization 2017-06-01 20:29:10 -04:00
ascent12
62d612a01e Merge branch 'master' into session 2017-06-01 23:10:19 +12:00
Drew DeVault
e2ee67125e s/wayland.h/types.h/g 2017-05-31 16:24:32 -04:00
Drew DeVault
c7f6981d9c Clean up outputs on exit 2017-05-31 16:17:04 -04:00
Drew DeVault
fee409bd0a Generalize DPMS, remove DRM refs from example 2017-05-31 15:38:26 -04:00
Drew DeVault
03c9b46034 Have backend manage opengl context 2017-05-31 15:15:42 -04:00
Scott Anderson
f9d363fece Added device matching 2017-05-14 13:07:34 +12:00
Scott Anderson
7efdd3c9fc Refactored renderer startup to function. 2017-05-14 12:48:47 +12:00
Scott Anderson
058b8bdf27 Working commit 2017-05-14 12:42:49 +12:00
Scott Anderson
c88f252580 Initial D-Bus signal support. 2017-05-14 12:40:17 +12:00
Scott Anderson
599d1bcbdc DPMS support 2017-05-13 20:37:15 +12:00
Drew DeVault
00931f2f8f Generalize output handling 2017-05-07 12:26:48 -04:00
Drew DeVault
15b1ce9e6c Refactor backend state management 2017-05-07 10:12:54 -04:00
Scott Anderson
7e9feb70a0 Fixed hotplugging + make EGL more chatty. 2017-05-04 21:58:11 +12:00
Scott Anderson
4285b0c218 Removed unused fields. 2017-05-03 22:50:18 +12:00
Scott Anderson
ef9768858e Changed modesetting interface. 2017-05-03 22:41:49 +12:00
Scott Anderson
d196a79b6c Changed backend to accept wl_display. 2017-05-03 21:28:44 +12:00
Scott Anderson
0002b8dd08 Added 'direct' session backend 2017-05-03 19:26:43 +12:00
Scott Anderson
18387468bb Renamed 'wlr_drm_display' to 'wlr_drm_output' 2017-05-03 17:49:03 +12:00
Scott Anderson
15d247bf34 Changed drm to use new EGL interface. 2017-05-03 17:17:14 +12:00
Scott Anderson
dbceaee9fa Added EGL interface for backends. 2017-05-03 17:04:41 +12:00
Scott Anderson
81998fdc98 Removed old session code from DRM backend. 2017-05-03 16:23:07 +12:00
Scott Anderson
762ac7f4c0 New session interface. 2017-05-03 14:11:22 +12:00
Scott Anderson
e446a5300b Added example. 2017-05-02 18:13:17 +12:00
Scott Anderson
e9d716fc0c Changed display to use list_t. 2017-05-02 14:34:33 +12:00
Scott Anderson
115d4ae637 Changed events to use wayland functions. 2017-05-02 14:08:34 +12:00
Scott Anderson
562d43a5ec Changed logging. 2017-05-02 13:00:25 +12:00
Scott Anderson
41a82fd2fc Renaming. 2017-05-01 17:49:18 +12:00
Scott Anderson
95a553dc51 Moved headers to the correct place. 2017-05-01 15:33:42 +12:00
Drew DeVault
1aed987301 Add free functions for allocated resources 2017-04-25 21:26:29 -04:00
Drew DeVault
5ca9d612f4 Flesh out wayland backend registry 2017-04-25 19:19:21 -04:00
Drew DeVault
de01e654ce Flesh out wayland backend somewhat, add example 2017-04-25 15:06:58 -04:00
Drew DeVault
52e6ed54cb Initial commit 2017-04-25 11:32:52 -04:00