diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-01-01 05:11:41 +0800 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-01-01 05:11:41 +0800 |
commit | 94f96fa878fd55060f10cfd1f4fa61ea2b10888b (patch) | |
tree | 9e8268468e2cdcd78f522c5404f2dfbc4a8a98f9 /x11-wm | |
parent | 7285ecaeb41ceb40ab4d0a1359ebdd0718c1525b (diff) | |
download | freebsd-ports-gnome-94f96fa878fd55060f10cfd1f4fa61ea2b10888b.tar.gz freebsd-ports-gnome-94f96fa878fd55060f10cfd1f4fa61ea2b10888b.tar.zst freebsd-ports-gnome-94f96fa878fd55060f10cfd1f4fa61ea2b10888b.zip |
x11-toolkits/wlroots: update to 0.9.0
Changes: https://github.com/swaywm/wlroots/releases/tag/0.9.0
Reported by: GitHub (watch releases)
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/cage/Makefile | 2 | ||||
-rw-r--r-- | x11-wm/cage/files/patch-wlroots-0.9 | 20 | ||||
-rw-r--r-- | x11-wm/sway/Makefile | 2 | ||||
-rw-r--r-- | x11-wm/sway/files/patch-wlroots-0.9 | 199 | ||||
-rw-r--r-- | x11-wm/wayfire/Makefile | 4 | ||||
-rw-r--r-- | x11-wm/wayfire/distinfo | 2 |
6 files changed, 227 insertions, 2 deletions
diff --git a/x11-wm/cage/Makefile b/x11-wm/cage/Makefile index cd5d6459e6fc..5172192d402e 100644 --- a/x11-wm/cage/Makefile +++ b/x11-wm/cage/Makefile @@ -3,7 +3,7 @@ PORTNAME= cage DISTVERSIONPREFIX= v DISTVERSION= 0.1.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-wm MAINTAINER= jbeich@FreeBSD.org diff --git a/x11-wm/cage/files/patch-wlroots-0.9 b/x11-wm/cage/files/patch-wlroots-0.9 new file mode 100644 index 000000000000..03d072626a4f --- /dev/null +++ b/x11-wm/cage/files/patch-wlroots-0.9 @@ -0,0 +1,20 @@ +https://github.com/Hjdskes/cage/commit/33bb3c818c59 + +--- cage.c.orig 2019-06-03 17:55:52 UTC ++++ cage.c +@@ -374,15 +374,6 @@ end: + wl_event_source_remove(sigint_source); + wl_event_source_remove(sigterm_source); + seat_destroy(server.seat); +- wlr_server_decoration_manager_destroy(server_decoration_manager); +- wlr_xdg_decoration_manager_v1_destroy(xdg_decoration_manager); +- wlr_xdg_shell_destroy(xdg_shell); +- wlr_idle_inhibit_v1_destroy(server.idle_inhibit_v1); +- if (server.idle) { +- wlr_idle_destroy(server.idle); +- } +- wlr_data_device_manager_destroy(data_device_mgr); +- wlr_compositor_destroy(compositor); + wlr_output_layout_destroy(server.output_layout); + /* This function is not null-safe, but we only ever get here + with a proper wl_display. */ diff --git a/x11-wm/sway/Makefile b/x11-wm/sway/Makefile index 2ee04ba62a50..e1317aff3b5c 100644 --- a/x11-wm/sway/Makefile +++ b/x11-wm/sway/Makefile @@ -2,7 +2,7 @@ PORTNAME= sway DISTVERSION= 1.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-wm MAINTAINER= jbeich@FreeBSD.org diff --git a/x11-wm/sway/files/patch-wlroots-0.9 b/x11-wm/sway/files/patch-wlroots-0.9 new file mode 100644 index 000000000000..85656942d5dc --- /dev/null +++ b/x11-wm/sway/files/patch-wlroots-0.9 @@ -0,0 +1,199 @@ +https://github.com/swaywm/sway/commit/d19f4f7bf866 +https://github.com/swaywm/sway/commit/1d3cbe9f2782 +https://github.com/swaywm/sway/commit/6e0565e9de42 + +--- sway/config/output.c.orig 2019-08-27 04:46:22 UTC ++++ sway/config/output.c +@@ -201,12 +201,13 @@ struct output_config *store_output_config(struct outpu + return oc; + } + +-static bool set_mode(struct wlr_output *output, int width, int height, ++static void set_mode(struct wlr_output *output, int width, int height, + float refresh_rate) { + int mhz = (int)(refresh_rate * 1000); + if (wl_list_empty(&output->modes)) { + sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name); +- return wlr_output_set_custom_mode(output, width, height, mhz); ++ wlr_output_set_custom_mode(output, width, height, mhz); ++ return; + } + + struct wlr_output_mode *mode, *best = NULL; +@@ -226,7 +227,7 @@ static bool set_mode(struct wlr_output *output, int wi + } else { + sway_log(SWAY_DEBUG, "Assigning configured mode to %s", output->name); + } +- return wlr_output_set_mode(output, best); ++ wlr_output_set_mode(output, best); + } + + bool apply_output_config(struct output_config *oc, struct sway_output *output) { +@@ -243,11 +244,12 @@ bool apply_output_config(struct output_config *oc, str + wlr_output_layout_remove(root->output_layout, wlr_output); + } + wlr_output_enable(wlr_output, false); +- return true; ++ return wlr_output_commit(wlr_output); + } else if (!output->enabled) { + // Output is not enabled. Enable it, output_enable will call us again. + if (!oc || oc->dpms_state != DPMS_OFF) { + wlr_output_enable(wlr_output, true); ++ wlr_output_commit(wlr_output); + } + output_enable(output, oc); + return true; +@@ -258,27 +260,15 @@ bool apply_output_config(struct output_config *oc, str + wlr_output_enable(wlr_output, true); + } + +- bool modeset_success; ++ struct wlr_output_mode *preferred_mode = ++ wlr_output_preferred_mode(wlr_output); + if (oc && oc->width > 0 && oc->height > 0) { + sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width, + oc->height, oc->refresh_rate); +- modeset_success = +- set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); +- } else if (!wl_list_empty(&wlr_output->modes)) { +- struct wlr_output_mode *mode = +- wl_container_of(wlr_output->modes.prev, mode, link); +- modeset_success = wlr_output_set_mode(wlr_output, mode); +- } else { +- // Output doesn't support modes +- modeset_success = true; ++ set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); ++ } else if (preferred_mode != NULL) { ++ wlr_output_set_mode(wlr_output, preferred_mode); + } +- if (!modeset_success) { +- // Failed to modeset, maybe the output is missing a CRTC. Leave the +- // output disabled for now and try again when the output gets the mode +- // we asked for. +- sway_log(SWAY_ERROR, "Failed to modeset output %s", wlr_output->name); +- return false; +- } + + if (oc && oc->scale > 0) { + sway_log(SWAY_DEBUG, "Set %s scale to %f", oc->name, oc->scale); +@@ -297,6 +287,14 @@ bool apply_output_config(struct output_config *oc, str + wlr_output_set_transform(wlr_output, oc->transform); + } + ++ if (!wlr_output_commit(wlr_output)) { ++ // Failed to modeset, maybe the output is missing a CRTC. Leave the ++ // output disabled for now and try again when the output gets the mode ++ // we asked for. ++ sway_log(SWAY_ERROR, "Failed to modeset output %s", wlr_output->name); ++ return false; ++ } ++ + // Find position for it + if (oc && (oc->x != -1 || oc->y != -1)) { + sway_log(SWAY_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); +@@ -316,6 +314,7 @@ bool apply_output_config(struct output_config *oc, str + if (oc && oc->dpms_state == DPMS_OFF) { + sway_log(SWAY_DEBUG, "Turning off screen"); + wlr_output_enable(wlr_output, false); ++ wlr_output_commit(wlr_output); + } + + return true; +@@ -324,12 +323,12 @@ bool apply_output_config(struct output_config *oc, str + static void default_output_config(struct output_config *oc, + struct wlr_output *wlr_output) { + oc->enabled = 1; +- if (!wl_list_empty(&wlr_output->modes)) { +- struct wlr_output_mode *mode = +- wl_container_of(wlr_output->modes.prev, mode, link); +- oc->width = mode->width; +- oc->height = mode->height; +- oc->refresh_rate = mode->refresh; ++ struct wlr_output_mode *preferred_mode = ++ wlr_output_preferred_mode(wlr_output); ++ if (preferred_mode != NULL) { ++ oc->width = preferred_mode->width; ++ oc->height = preferred_mode->height; ++ oc->refresh_rate = preferred_mode->refresh; + } + oc->x = oc->y = -1; + oc->scale = 1; + + +--- sway/desktop/layer_shell.c.orig 2019-08-27 04:46:22 UTC ++++ sway/desktop/layer_shell.c +@@ -486,7 +486,9 @@ void handle_layer_shell_surface(struct wl_listener *li + struct wlr_layer_surface_v1 *layer_surface = data; + sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d " + "size %dx%d margin %d,%d,%d,%d", +- layer_surface->namespace, layer_surface->layer, layer_surface->layer, ++ layer_surface->namespace, ++ layer_surface->client_pending.layer, ++ layer_surface->client_pending.layer, + layer_surface->client_pending.desired_width, + layer_surface->client_pending.desired_height, + layer_surface->client_pending.margin.top, +@@ -543,7 +545,8 @@ void handle_layer_shell_surface(struct wl_listener *li + sway_layer->output_destroy.notify = handle_output_destroy; + wl_signal_add(&output->events.destroy, &sway_layer->output_destroy); + +- wl_list_insert(&output->layers[layer_surface->layer], &sway_layer->link); ++ wl_list_insert(&output->layers[layer_surface->client_pending.layer], ++ &sway_layer->link); + + // Temporarily set the layer's current state to client_pending + // So that we can easily arrange it +--- sway/desktop/output.c.orig 2019-08-27 04:46:22 UTC ++++ sway/desktop/output.c +@@ -375,7 +375,7 @@ bool output_has_opaque_overlay_layer_surface(struct sw + struct wlr_layer_surface_v1 *wlr_layer_surface_v1; + wl_list_for_each(wlr_layer_surface_v1, &server.layer_shell->surfaces, link) { + if (wlr_layer_surface_v1->output != output->wlr_output || +- wlr_layer_surface_v1->layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) { ++ wlr_layer_surface_v1->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) { + continue; + } + struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface; +@@ -653,31 +653,12 @@ static void handle_scale(struct wl_listener *listener, + update_output_manager_config(output->server); + } + +-static void send_presented_iterator(struct sway_output *output, +- struct wlr_surface *surface, struct wlr_box *box, float rotation, +- void *data) { +- struct wlr_presentation_event *event = data; +- wlr_presentation_send_surface_presented(server.presentation, +- surface, event); +-} +- + static void handle_present(struct wl_listener *listener, void *data) { + struct sway_output *output = wl_container_of(listener, output, present); +- struct wlr_output_event_present *output_event = data; + + if (!output->enabled) { + return; + } +- +- struct wlr_presentation_event event = { +- .output = output->wlr_output, +- .tv_sec = (uint64_t)output_event->when->tv_sec, +- .tv_nsec = (uint32_t)output_event->when->tv_nsec, +- .refresh = (uint32_t)output_event->refresh, +- .seq = (uint64_t)output_event->seq, +- .flags = output_event->flags, +- }; +- output_for_each_surface(output, send_presented_iterator, &event); + } + + void handle_new_output(struct wl_listener *listener, void *data) { +--- sway/input/seat.c.orig 2019-08-27 04:46:22 UTC ++++ sway/input/seat.c +@@ -1089,7 +1089,7 @@ void seat_set_focus_layer(struct sway_seat *seat, + return; + } + seat_set_focus_surface(seat, layer->surface, true); +- if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { ++ if (layer->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { + seat->focused_layer = layer; + } + } diff --git a/x11-wm/wayfire/Makefile b/x11-wm/wayfire/Makefile index 3a7d8fd47bc5..97d1e932ceb0 100644 --- a/x11-wm/wayfire/Makefile +++ b/x11-wm/wayfire/Makefile @@ -2,8 +2,12 @@ PORTNAME= wayfire DISTVERSION= 0.3.0 +PORTREVISION= 1 CATEGORIES= x11-wm +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES= 8d8581a3e791.patch:-p1 + MAINTAINER= jbeich@FreeBSD.org COMMENT= 3D wayland compositor diff --git a/x11-wm/wayfire/distinfo b/x11-wm/wayfire/distinfo index 75ee2ed420bb..04ffcc1f7ad5 100644 --- a/x11-wm/wayfire/distinfo +++ b/x11-wm/wayfire/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1570482658 SHA256 (WayfireWM-wayfire-0.3.0_GH0.tar.gz) = c686bf5abb7f0db829196785bba4136c85d7b52d701212e21636dad75e1da0aa SIZE (WayfireWM-wayfire-0.3.0_GH0.tar.gz) = 235019 +SHA256 (8d8581a3e791.patch) = 484f9292848d1c59abce2e25486d329296aa8508522cd5d133a7bbcd048be228 +SIZE (8d8581a3e791.patch) = 2058 |