|
1 | 1 | #include "Server.h" |
| 2 | +#include "wlr.h" |
2 | 3 |
|
3 | 4 | // get workspace by toplevel |
4 | 5 | Workspace *Server::get_workspace(Toplevel *toplevel) const { |
@@ -733,6 +734,35 @@ Server::Server(Config *config) : config(config) { |
733 | 734 | // primary selection |
734 | 735 | wlr_primary_selection_v1_device_manager_create(display); |
735 | 736 |
|
| 737 | + // color manager |
| 738 | + const struct wlr_color_manager_v1_features color_manager_features = { |
| 739 | + false, true, false, false, false, true, false, false}; |
| 740 | + const enum wp_color_manager_v1_render_intent |
| 741 | + color_manager_render_intents[] = { |
| 742 | + WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL, |
| 743 | + }; |
| 744 | + const enum wp_color_manager_v1_transfer_function |
| 745 | + color_manager_transfer_functions[] = { |
| 746 | + WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_SRGB, |
| 747 | + WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST2084_PQ, |
| 748 | + }; |
| 749 | + const enum wp_color_manager_v1_primaries color_manager_primaries[] = { |
| 750 | + WP_COLOR_MANAGER_V1_PRIMARIES_SRGB, |
| 751 | + WP_COLOR_MANAGER_V1_PRIMARIES_BT2020, |
| 752 | + }; |
| 753 | + const wlr_color_manager_v1_options color_manager_options = { |
| 754 | + color_manager_features, |
| 755 | + color_manager_render_intents, |
| 756 | + sizeof(color_manager_render_intents) / |
| 757 | + sizeof(color_manager_render_intents[0]), |
| 758 | + color_manager_transfer_functions, |
| 759 | + sizeof(color_manager_transfer_functions) / |
| 760 | + sizeof(color_manager_transfer_functions[0]), |
| 761 | + color_manager_primaries, |
| 762 | + sizeof(color_manager_primaries) / sizeof(color_manager_primaries[0]), |
| 763 | + }; |
| 764 | + wlr_color_manager_v1_create(display, 1, &color_manager_options); |
| 765 | + |
736 | 766 | // avoid using "wayland-0" as display socket |
737 | 767 | std::string socket; |
738 | 768 | for (unsigned int i = 1; i <= 32; i++) { |
|
0 commit comments