Skip to content

Commit 0edc781

Browse files
committed
border cannot be shown if the window is too small
1 parent 245a65e commit 0edc781

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xpra/client/gtk3/window_base.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,14 @@ def add_border_rectangles(rectangles: Sequence[tuple[int, int, int, int]],
314314
rects = list(rectangle(*rect) for rect in rectangles)
315315
# add border rectangles:
316316
bsize = border_size
317-
for rect in (
317+
for x, y, w, h in (
318318
(0, 0, ww, bsize), # top
319319
(0, wh - bsize, ww, bsize), # bottom
320320
(ww - bsize, bsize, bsize, wh-bsize*2), # right
321321
(0, bsize, bsize, wh-bsize*2), # left
322322
):
323-
add_rectangle(rects, rectangle(*rect))
323+
if w > 0 and h > 0:
324+
add_rectangle(rects, rectangle(x, y, w, h))
324325
# convert rectangles back to tuples:
325326
return tuple((rect.x, rect.y, rect.width, rect.height) for rect in rects)
326327

0 commit comments

Comments
 (0)