Compare commits

...

3 Commits

Author SHA1 Message Date
Sergio
ada61baa88
Merge 701e852b9e into 4cfcb3643b 2024-11-04 23:00:17 +01:00
Alexander Orzechowski
4cfcb3643b container: Properly constrain title bar padding
Important for centered titles
2024-11-04 19:02:16 +01:00
Sergio Gómez
701e852b9e fifo-v1: implement protocol
Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
2024-10-06 13:56:05 -05:00
3 changed files with 8 additions and 2 deletions

View File

@ -89,6 +89,8 @@ struct sway_server {
struct wlr_gamma_control_manager_v1 *gamma_control_manager_v1;
struct wl_listener gamma_control_set_gamma;
struct wlr_fifo_manager_v1 *fifo_manager_v1;
struct {
struct sway_session_lock *lock;
struct wlr_session_lock_manager_v1 *manager;

View File

@ -18,6 +18,7 @@
#include <wlr/types/wlr_drm.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_ext_foreign_toplevel_list_v1.h>
#include <wlr/types/wlr_fifo_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_fractional_scale_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
@ -407,6 +408,9 @@ bool server_init(struct sway_server *server) {
wl_list_init(&server->pending_launcher_ctxs);
server->fifo_manager_v1 = wlr_fifo_manager_v1_create(server->wl_display, 1);
wlr_scene_set_fifo_manager_v1(root->root_scene, server->fifo_manager_v1);
// Avoid using "wayland-0" as display socket
char name_candidate[16];
for (unsigned int i = 1; i <= 32; ++i) {

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);