Commit graph

66 commits

Author SHA1 Message Date
emersion
4361785c72 Add wlr-output-management-unstable-v1
This commit adds a new output management protocol. It can be used to get the
current output configuration and apply a new one. It's based on the GNOME D-Bus
API [1] and the KDE protocol [2] [3].

Goals:

* High-level API, not a copy of KMS
* Protect against races wrt. hotplugging
* Extensible via backwards-compatible changes
* Atomic (both when reading current config and when applying a new one)

Features:

* Read all outputs including disabled ones
  * Identification (name, description), available modes, physical size
  * Current mode, enabled/disabled
  * Position, scale, transform
* Write
  * Modeset, enable/disable
  * Position, scale, transform

Non-features (ie. features in GNOME or KDE excluded from this protocol):

* No DPMS (left out for another protocol because it can operate on wl_output)
* No gamma ramps (left out for another protocol, we already have one)
* Cannot set the primary logical monitor and the presentation monitor (should be
  a separate protocol, could use wl_output)

Available outputs and their current configuration are advertised when the client
binds to the manager as "heads" (a head is an enabled or disabled output).

Clients can create a configuration object, add some outputs to configure and
apply the new state.

The GNOME protocol has a concept of "logical monitor": it's a region of the
screen you can assign physical monitors to. You can modeset and enable/disable
physical monitors while you can position, scale and transform logical monitors.
This nicely splits physical properties and logical properties. I've tried to
design a protocol with a similar concept [4], but it turned out being pretty
complicated since you need to have at least two extra objects (one to read the
current logical monitors, one to configure them). I've decided against this
approach for now.

TODO:

* Custom modes
* Output cloning with different resolutions or underscan
* Should transform & scale be per slot or per output device?
* Check all of this makes sense for non-KMS outputs?
* Make sure a compositor can offload everything to a helper client (ie. it
  doesn't apply an initial default modeset on hotplug)
* Should some features be optional?
* Better wording
* Should zero modes mean the output doesn't support modes? What to do if an EDID
  is malformed and returns zero modes?

Possible future features:

* Modes aspect ratio and interlaced modes
* Underscanning? (needs investigation)
* is-builtin property for heads? (should this be in the compositor?)
* Expose suggested panel orientation and tiling data?
* Variable refresh rate? (needs investigation)

References:

[1]: https://gitlab.gnome.org/GNOME/mutter/blob/master/src/org.gnome.Mutter.DisplayConfig.xml#L292
[2]: https://github.com/KDE/kwayland/blob/master/src/client/protocols/outputdevice.xml
[3]: https://github.com/KDE/kwayland/blob/master/src/client/protocols/output-management.xml
[4]: https://paste.sr.ht/%7Eemersion/8727ea50437fff3927c81c40c0ecc9c9885817ef
2019-03-16 09:53:09 -06:00
Drew DeVault
4dde2728f1
Merge pull request #34 from YaLTeR/data-control-primary
Support primary selection in data-control
2019-02-15 15:24:26 +01:00
Ivan Molodetskikh
151664b67a
Make using a data source twice a protocol error 2019-02-15 12:38:59 +03:00
Ivan Molodetskikh
06b41b7ff4
Clarify that data sources can only be used once 2019-02-15 12:38:58 +03:00
Ivan Molodetskikh
caf9c74946
Clarify when the first selection events are sent 2019-02-15 12:38:58 +03:00
Ivan Molodetskikh
3953961870
Add data_control_device.{set_,}primary_selection 2019-01-29 19:16:06 +03:00
Ivan Molodetskikh
3f831de2bb
Fix data_control_device.data_offer description
Data offers are invalidated by selection events, not by new data_offer
events themselves.
2019-01-29 19:16:06 +03:00
Ivan Molodetskikh
a003e45ba1
Fix data_control_device.selection summary 2019-01-29 19:06:38 +03:00
Ivan Molodetskikh
3c1e415eec
Fix data_control_device.set_selection description 2019-01-29 19:06:00 +03:00
Drew DeVault
4ff1cda832
Merge pull request #25 from emersion/data-control
Add wlr-data-control-unstable-v1
2019-01-07 15:25:23 -05:00
emersion
cdd0eddd54
Add wlr-data-control-unstable-v1 2018-12-30 02:47:11 +01:00
emersion
6b442ab091
Merge pull request #26 from ammen99/master
add wlr-foreign-toplevel-management protocol to enumerate and control desktop surfaces
2018-12-09 09:08:22 +01:00
Ilia Bozhinov
60e33b7e36 add wlr-foreign-toplevel-management-v1 protocol
This protocol enables the creation of taskbars, docks, etc. by providing
them a means of listing and controlling opened applications.
2018-12-08 14:19:10 +01:00
emersion
014360a2b0
Merge pull request #28 from swaywm/install
Add Makefile and pkg-config entry
2018-10-12 16:17:26 +02:00
Drew DeVault
723f9c03a2 Add Makefile and pkg-config entry 2018-10-12 10:14:24 -04:00
Drew DeVault
77ee60a6e9
Merge pull request #24 from emersion/gamma-control
Add gamma control
2018-08-06 14:03:49 -04:00
Drew DeVault
c99e4dd86c
Merge pull request #17 from emersion/screencopy
Add screencopy protocol
2018-07-28 09:16:37 -04:00
emersion
34366dbbcc Disambiguate unicity of gamma controls 2018-07-22 13:53:16 +01:00
emersion
1c76f50579 Improve gamma_size description 2018-07-22 13:45:36 +01:00
emersion
d2a96796ec Add gamma control 2018-07-19 00:23:56 +01:00
emersion
9b652d3dd4
screencopy: remove invalid_output_region, format and stride are now enforced 2018-06-23 18:42:19 +01:00
emersion
d105604f15
screencopy: fix typos and minor text issues 2018-06-23 15:18:43 +01:00
emersion
494de01024
screencopy: add invalid_output_region error, simplify overlay_cursor description 2018-06-23 15:12:49 +01:00
emersion
5841bde0ad
screencopy: add capture_output_region 2018-06-23 14:12:06 +01:00
emersion
a7d1452ec4
screencopy: move flags to a separate event 2018-06-23 14:03:21 +01:00
emersion
9c0b0a7092
Improve wording, add presentation timestamp 2018-06-22 22:21:11 +01:00
emersion
faeda4cf13
Remove scale and transform 2018-06-22 22:11:58 +01:00
emersion
063f96463e
Simplify manager interface 2018-06-22 22:11:57 +01:00
emersion
75f284b64f
Add first draft of the screencopy protocol 2018-06-22 22:11:54 +01:00
Drew DeVault
acc39751ad
Merge pull request #11 from atomnuker/master
A DMA-BUF export protocol
2018-06-22 05:38:19 -07:00
Rostislav Pehlivanov
dec67642b6 Add a DMA-BUF export protocol 2018-06-17 14:39:47 +01:00
emersion
e706ef0eaf
Merge pull request #22 from dcz-purism/patch-1
Fix typos in wlr_layer_shell
2018-06-04 21:06:03 +01:00
dcz-purism
bc1364930c
Fix typos in wlr_layer_shell 2018-06-04 22:03:34 +02:00
Drew DeVault
0c98b86f14
Merge pull request #18 from emersion/builds
Check all protocols in strict mode when building
2018-05-29 09:24:04 -04:00
emersion
077286fc94
Fix git remote in .build.yml 2018-05-29 14:20:45 +01:00
Drew DeVault
b0b76307d9
Merge pull request #19 from emersion/editorconfig
Add .editorconfig
2018-05-29 09:17:36 -04:00
emersion
3a09bdf811
Add .editorconfig 2018-05-29 11:31:41 +01:00
emersion
0b86c390ca
Check all protocols in strict mode when building 2018-05-29 11:30:32 +01:00
Drew DeVault
c73ec02b29
Merge pull request #7 from emersion/surface-layers
[WIP] surface-layers redesign
2018-04-18 08:34:48 -04:00
Drew DeVault
2a6a44e8da
Merge pull request #9 from swaywm/input-inhibitor
Add wlr-input-inhibitor-unstable-v1
2018-04-18 08:34:43 -04:00
Drew DeVault
ed0768cd8b Allow wl_output to be null 2018-04-10 20:22:49 -04:00
Drew DeVault
926e897f9f Explain what happens to other clients 2018-04-03 22:10:30 -04:00
Drew DeVault
07ac9ba7bc Add wlr-input-inhibitor-unstable-v1 2018-04-03 10:16:11 -04:00
Drew DeVault
4f6f706dfa Update protocol per emersion's feedback 2018-03-26 22:01:24 -04:00
Drew DeVault
eb8deebdc9 Extend exclusive zone specification 2018-03-26 16:56:12 -04:00
Drew DeVault
ecc604fb07 Address review feedback 2018-03-18 13:50:46 -04:00
Drew DeVault
9fbdced4f2 Use uint for margin, add an error 2018-03-17 20:52:04 -04:00
Drew DeVault
30c6664ecc Rename wlr-layer-surfaces -> wlr-layer-shell 2018-03-17 14:57:14 -04:00
Drew DeVault
e98b28d87b Use in-house input_device enum
We'll likely need to extend this beyond wl_seat in the future.
2018-03-17 14:32:01 -04:00
Drew DeVault
514303af37 Remove passthrough 2018-03-17 13:21:06 -04:00