Commit Graph

223 Commits

Author SHA1 Message Date
emersion 99d879c887
data-control-v1: initial protocol implementation 2018-12-30 02:48:03 +01:00
Ilia Bozhinov 96861ccb7a rootston: create foreign toplevel handle before sending outputs
Otherwise the initial list of outputs isn't sent to foreign-toplevel
clients.
2018-12-20 10:41:58 +01:00
Ilia Bozhinov 8cce2d75a9 rootston: add support for wlr_foreign_toplevel_management_v1 2018-12-08 14:09:51 +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 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 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
emersion 811a4d997b
Rename wlr_primary_selection to wlr_gtk_primary_selection 2018-11-23 11:58:56 +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
emersion 0c7371221c
rootston: fix segfault when destroying unmapped fullscreen views 2018-10-28 23:15:36 +01:00
emersion 1454d1c8f8
rootston: fix segfault in view_at
Make sure the view is mapped.
2018-10-28 23:14:39 +01:00
Sorcus 7c540aa9fe Fix "variable ‘cursor_default’ set but not used" 2018-10-28 10:58:13 +00: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
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
emersion 3a181ab430 rootston: export XCURSOR_SIZE and XCURSOR_THEME
These can be used by toolkits (currently Qt) to choose a default
cursor theme and size. Note that this isn't a perfect solution:

- Per-seat configuration isn't possible
- It's not possible to set the default image
- Live config reload isn't possible

But it's easy to implement and simple. To fix these remaining
issues a separate protocol would be needed.
2018-10-08 16:02:53 +02:00
emersion abd3e995ab rootston: send presentation events 2018-10-04 22:00:23 +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
Las fa2e6e7d9d Implement pointer-constraints protocol in wlroots and rootston 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
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 2f0815838d Init dmabuf global in renderer 2018-09-02 08:50:43 +02:00
emersion a5cab82a0f rootston: fire up wlr-gamma-control-unstable-v1 2018-08-02 23:33:59 +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
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
emersion 555721f714 Add xdg-decoration-unstable-v1 support 2018-07-28 22:48:07 +01: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
Markus Ongyerth e235f7d336 Basic tablet_v2 object lifetime 2018-07-14 09:40:39 +02:00
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion 3c0d672ebd
surface: make pending and current embedded structs 2018-07-04 19:12:17 +01:00
emersion 73755ad348
screencopy-v1: add basic implementation 2018-06-30 22:17:59 +01:00
emersion 7901740f94
rootston: enable export-dmabuf 2018-05-29 18:47:17 +01:00
Dorota Czaplejewicz 5334ee8bfd virtual-keyboard: add support for the virtual-keyboard-v1 protocol 2018-05-28 10:05:55 +02: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
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 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
Guido Günther d4cb33c9fc rootston: Let layer_surface_at look at popups
This allows them to receive input as well.
2018-04-23 11:24:31 +02:00
Drew DeVault edbf4a2f60 Implement output auto-selection in rootston 2018-04-22 19:15:49 +02:00
emersion fa84b267e0
Remove wlr_surface::subsurface 2018-04-21 18:40:25 +01:00
Drew DeVault bef5c1fd56
Merge pull request #850 from emersion/remove-backend-egl
backend: remove wlr_backend_get_egl
2018-04-08 11:21:21 -04:00
emersion d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
Bruno ba5c0903f9
rootston: fix compilation without XWayland support 2018-04-07 23:29:04 +01: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
Tancredi Orlando 74a4b1702b Initialize rootston _surface 2018-04-05 19:13:21 +02:00
Drew DeVault abfe7923c4 Add wlr_xdg_output_manager 2018-04-05 12:40:30 -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