Compare commits

...

3 Commits

Author SHA1 Message Date
Simon Ser
d74afec9a5
Merge 1737b72557 into 4cfcb3643b 2024-11-04 10:32:41 -08:00
Alexander Orzechowski
4cfcb3643b container: Properly constrain title bar padding
Important for centered titles
2024-11-04 19:02:16 +01:00
Simon Ser
1737b72557 Drop wl_drm again
In [1] we re-introduced a debug flag to enable wl_drm. Time has
passed and Xwayland + VA-API + amdvlk now all support
linux-dmabuf-v1.

[1]: https://github.com/swaywm/sway/pull/7916
2024-07-13 13:13:08 +02:00
4 changed files with 2 additions and 8 deletions

View File

@ -148,7 +148,6 @@ struct sway_debug {
bool noatomic; // Ignore atomic layout updates
bool txn_timings; // Log verbose messages about transactions
bool txn_wait; // Always wait for the timeout before applying
bool legacy_wl_drm; // Enable the legacy wl_drm interface
};
extern struct sway_debug debug;

View File

@ -161,8 +161,6 @@ void enable_debug_flag(const char *flag) {
debug.txn_timings = true;
} else if (strncmp(flag, "txn-timeout=", 12) == 0) {
server.txn_timeout_ms = atoi(&flag[12]);
} else if (strcmp(flag, "legacy-wl-drm") == 0) {
debug.legacy_wl_drm = true;
} else {
sway_log(SWAY_ERROR, "Unknown debug flag: %s", flag);
}

View File

@ -247,9 +247,6 @@ bool server_init(struct sway_server *server) {
if (wlr_renderer_get_texture_formats(server->renderer, WLR_BUFFER_CAP_DMABUF) != NULL) {
server->linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer(
server->wl_display, 4, server->renderer);
if (debug.legacy_wl_drm) {
wlr_drm_create(server->wl_display, server->renderer);
}
}
if (wlr_renderer_get_drm_fd(server->renderer) >= 0 &&
server->renderer->features.timeline &&

View File

@ -349,7 +349,7 @@ void container_arrange_title_bar(struct sway_container *con) {
h_padding = width - config->titlebar_h_padding - marks_buffer_width;
}
h_padding = MAX(h_padding, 0);
h_padding = MAX(h_padding, config->titlebar_h_padding);
int alloc_width = MIN((int)node->width,
width - h_padding - config->titlebar_h_padding);
@ -375,7 +375,7 @@ void container_arrange_title_bar(struct sway_container *con) {
h_padding = config->titlebar_h_padding;
}
h_padding = MAX(h_padding, 0);
h_padding = MAX(h_padding, config->titlebar_h_padding);
int alloc_width = MIN((int) node->width,
width - h_padding - config->titlebar_h_padding);