1
1
Fork 0
mirror of https://github.com/swaywm/sway synced 2024-05-09 15:56:14 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Simon Ser 7a6c9c3bc8
Merge 0840906430 into 646019cad9 2024-04-25 16:58:09 +02:00
Kenny Levinsen 646019cad9 desktop/output: Fix check if config should be stored
We want to check if a config_head existed for the current
matched_output_config, so we should check cfg->output. sway_output is a
temporary variable from a previous wl_list_for_each, and does not
contain anything useful to us.

Fixes: https://github.com/swaywm/sway/issues/8128
2024-04-23 13:31:30 +02:00
Simon Ser 0840906430 Add ext-screencopy-v1 and ext-image-source-v1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4545
2024-04-08 18:26:46 +02:00
4 changed files with 10 additions and 1 deletions

View File

@ -105,6 +105,7 @@ struct sway_server {
struct wlr_content_type_manager_v1 *content_type_manager_v1;
struct wlr_data_control_manager_v1 *data_control_manager_v1;
struct wlr_screencopy_manager_v1 *screencopy_manager_v1;
struct wlr_ext_screencopy_manager_v1 *ext_screencopy_manager_v1;
struct wlr_export_dmabuf_manager_v1 *export_dmabuf_manager_v1;
struct wlr_security_context_manager_v1 *security_context_manager_v1;

View File

@ -14,6 +14,9 @@ protocols = [
wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
wl_protocol_dir / 'staging/content-type/content-type-v1.xml',
wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml',
wl_protocol_dir / 'staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml',
wl_protocol_dir / 'staging/ext-image-source/ext-image-source-v1.xml',
wl_protocol_dir / 'staging/ext-screencopy/ext-screencopy-v1.xml',
'wlr-layer-shell-unstable-v1.xml',
'idle.xml',
'wlr-output-power-management-unstable-v1.xml',

View File

@ -619,7 +619,7 @@ static void output_manager_apply(struct sway_server *server,
if (!test_only && ok) {
struct wlr_output_configuration_head_v1 *config_head;
wl_list_for_each(config_head, &config->heads, link) {
if (config_head->state.output == sway_output->wlr_output) {
if (config_head->state.output == cfg->output->wlr_output) {
store_config = true;
break;
}

View File

@ -18,6 +18,8 @@
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_ext_foreign_toplevel_list_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_ext_image_source_v1.h>
#include <wlr/types/wlr_ext_screencopy_v1.h>
#include <wlr/types/wlr_fractional_scale_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_idle_notify_v1.h>
@ -105,6 +107,7 @@ static bool is_privileged(const struct wl_global *global) {
global == server.foreign_toplevel_manager->global ||
global == server.data_control_manager_v1->global ||
global == server.screencopy_manager_v1->global ||
global == server.ext_screencopy_manager_v1->global ||
global == server.export_dmabuf_manager_v1->global ||
global == server.security_context_manager_v1->global ||
global == server.gamma_control_manager_v1->global ||
@ -362,6 +365,8 @@ bool server_init(struct sway_server *server) {
server->export_dmabuf_manager_v1 = wlr_export_dmabuf_manager_v1_create(server->wl_display);
server->screencopy_manager_v1 = wlr_screencopy_manager_v1_create(server->wl_display);
server->ext_screencopy_manager_v1 = wlr_ext_screencopy_manager_v1_create(server->wl_display, 1);
wlr_ext_output_image_source_manager_v1_create(server->wl_display, 1);
server->data_control_manager_v1 = wlr_data_control_manager_v1_create(server->wl_display);
server->security_context_manager_v1 = wlr_security_context_manager_v1_create(server->wl_display);
wlr_viewporter_create(server->wl_display);