]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: set LAB_MIN_VIEW_WIDTH equal to total width of buttons
authortokyo4j <hrak1529@gmail.com>
Fri, 26 Apr 2024 11:08:08 +0000 (20:08 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 28 Apr 2024 08:20:24 +0000 (10:20 +0200)
This fixes pixman error due to a negative width passed to
`wlr_scene_rect_set_size()` in `ssd_titlebar_update()`.

include/view.h

index 182a28b897ead941dfde116beaa00427cba89c39..b688f1041dd74b7e2663b9e4a510ccb0bd08a060 100644 (file)
@@ -3,14 +3,15 @@
 #define LABWC_VIEW_H
 
 #include "config.h"
+#include "ssd.h"
 #include <stdbool.h>
 #include <stdint.h>
 #include <wayland-util.h>
 #include <wlr/util/box.h>
 #include <xkbcommon/xkbcommon.h>
 
-#define LAB_MIN_VIEW_WIDTH  100
-#define LAB_MIN_VIEW_HEIGHT  60
+#define LAB_MIN_VIEW_WIDTH (SSD_BUTTON_WIDTH * SSD_BUTTON_COUNT)
+#define LAB_MIN_VIEW_HEIGHT 60
 
 /*
  * In labwc, a view is a container for surfaces which can be moved around by