From b7d967b6bc5a0a6d823411b6d5bc625ab7c5cde0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 1 Apr 2021 18:19:59 +0530 Subject: [PATCH] Dont offset title from left edge --- glfw/wl_client_side_decorations.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/glfw/wl_client_side_decorations.c b/glfw/wl_client_side_decorations.c index 96df5108e..6bae27b60 100644 --- a/glfw/wl_client_side_decorations.c +++ b/glfw/wl_client_side_decorations.c @@ -55,7 +55,7 @@ render_title_bar(_GLFWwindow *window, bool to_front_buffer) { uint8_t *output = to_front_buffer ? decs.top.buffer.data.front : decs.top.buffer.data.back; if (window->wl.title && window->wl.title[0] && _glfw.callbacks.draw_text) { uint32_t fg_color = is_focused ? 0xff444444 : 0xff888888; - if (_glfw.callbacks.draw_text((GLFWwindow*)window, window->wl.title, fg_color, bg_color, output, decs.top.buffer.width, decs.top.buffer.height, 10, 0)) return; + if (_glfw.callbacks.draw_text((GLFWwindow*)window, window->wl.title, fg_color, bg_color, output, decs.top.buffer.width, decs.top.buffer.height, 0, 0)) return; } for (uint32_t *px = (uint32_t*)output, *end = (uint32_t*)(output + decs.top.buffer.size_in_bytes); px < end; px++) { *px = bg_color; @@ -119,8 +119,10 @@ create_shm_buffers(_GLFWwindow* window) { void free_csd_surfaces(_GLFWwindow *window) { #define d(which) {\ - if (decs.which.subsurface) wl_subsurface_destroy(decs.which.subsurface); decs.which.subsurface = NULL; \ - if (decs.which.surface) wl_surface_destroy(decs.which.surface); decs.which.surface = NULL; \ + if (decs.which.subsurface) wl_subsurface_destroy(decs.which.subsurface); \ + decs.which.subsurface = NULL; \ + if (decs.which.surface) wl_surface_destroy(decs.which.surface); \ + decs.which.surface = NULL; \ } d(left); d(top); d(right); d(bottom); #undef d