diff options
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 4 | ||||
-rw-r--r-- | rootston/output.c | 24 | ||||
-rw-r--r-- | rootston/xdg_shell.c | 2 |
3 files changed, 12 insertions, 18 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 658611e3..efb7581a 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -14,7 +14,6 @@ #include <wlr/types/wlr_idle.h> #include <wlr/types/wlr_input_inhibitor.h> #include <wlr/types/wlr_layer_shell.h> -#include <wlr/types/wlr_linux_dmabuf_v1.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_primary_selection.h> #include <wlr/types/wlr_server_decoration.h> @@ -893,9 +892,6 @@ struct roots_desktop *desktop_create(struct roots_server *server, wl_signal_add(&desktop->input_inhibit->events.deactivate, &desktop->input_inhibit_deactivate); - desktop->linux_dmabuf = wlr_linux_dmabuf_v1_create(server->wl_display, - server->renderer); - desktop->virtual_keyboard = wlr_virtual_keyboard_manager_v1_create( server->wl_display); wl_signal_add(&desktop->virtual_keyboard->events.new_virtual_keyboard, diff --git a/rootston/output.c b/rootston/output.c index d8edf1c2..8677f491 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -822,12 +822,6 @@ void handle_new_output(struct wl_listener *listener, void *data) { wlr_output->model, wlr_output->serial, wlr_output->phys_width, wlr_output->phys_height); - if (!wl_list_empty(&wlr_output->modes)) { - struct wlr_output_mode *mode = - wl_container_of((&wlr_output->modes)->prev, mode, link); - wlr_output_set_mode(wlr_output, mode); - } - struct roots_output *output = calloc(1, sizeof(struct roots_output)); clock_gettime(CLOCK_MONOTONIC, &output->last_frame); output->desktop = desktop; @@ -856,22 +850,28 @@ void handle_new_output(struct wl_listener *listener, void *data) { struct roots_output_config *output_config = roots_config_get_output(config, wlr_output); + + if ((!output_config || output_config->enable) && !wl_list_empty(&wlr_output->modes)) { + struct wlr_output_mode *mode = + wl_container_of(wlr_output->modes.prev, mode, link); + wlr_output_set_mode(wlr_output, mode); + } + if (output_config) { if (output_config->enable) { - struct roots_output_mode_config *mode_config; - if (wlr_output_is_drm(wlr_output)) { + struct roots_output_mode_config *mode_config; wl_list_for_each(mode_config, &output_config->modes, link) { wlr_drm_connector_add_mode(wlr_output, &mode_config->info); } - } else { - if (!wl_list_empty(&output_config->modes)) { - wlr_log(WLR_ERROR, "Can only add modes for DRM backend"); - } + } else if (!wl_list_empty(&output_config->modes)) { + wlr_log(WLR_ERROR, "Can only add modes for DRM backend"); } + if (output_config->mode.width) { set_mode(wlr_output, output_config); } + wlr_output_set_scale(wlr_output, output_config->scale); wlr_output_set_transform(wlr_output, output_config->transform); wlr_output_layout_add(desktop->layout, wlr_output, output_config->x, diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c index fed9afcd..2cf2081e 100644 --- a/rootston/xdg_shell.c +++ b/rootston/xdg_shell.c @@ -507,8 +507,6 @@ static void decoration_handle_surface_commit(struct wl_listener *listener, } void handle_xdg_toplevel_decoration(struct wl_listener *listener, void *data) { - struct roots_desktop *desktop = - wl_container_of(listener, desktop, xdg_toplevel_decoration); struct wlr_xdg_toplevel_decoration_v1 *wlr_decoration = data; wlr_log(WLR_DEBUG, "new xdg toplevel decoration"); |