aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorsghctoma <sghctoma@gmail.com>2018-09-02 18:32:31 +0200
committersghctoma <sghctoma@gmail.com>2018-09-02 18:32:31 +0200
commit3b2b8c18446bb98ec0e5eea46fb1212b7bf64445 (patch)
tree1efb3ccee04a7589a1c963b3cace215ca8236c56 /rootston
parent2bd6fbf20ebb055d4871ffb8eedefa7d7aa60ee8 (diff)
parent95d05acda511e8559ab87a3d8956ee942ca1999e (diff)
Merge remote-tracking branch 'upstream/master' into fix-freebsd-direct-session
Diffstat (limited to 'rootston')
-rw-r--r--rootston/desktop.c4
-rw-r--r--rootston/output.c24
-rw-r--r--rootston/xdg_shell.c2
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");