File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ 2024-07-12: [BUGFIX] Fix bug where conditional border could resize window
1
2
2024-07-07: [FEATURE] Add `RoundedCorners` border decoration (Wayland only)
2
3
2024-07-07: [FEATURE] Add `ConditionalBorderWidth` to set border width depending on window conditions
3
4
2024-06-13: [FEATURE] Add new `CustomBorder` to draw window borders with user-defined functions
Original file line number Diff line number Diff line change @@ -227,15 +227,18 @@ def new_place(
227
227
respect_hints = False ,
228
228
):
229
229
if isinstance (borderwidth , ConditionalBorderWidth ):
230
+ old = getattr (self , "_old_bw" , borderwidth .default )
230
231
newborder = borderwidth .get_border_for_window (self )
231
- if newborder != borderwidth . default :
232
- width += borderwidth . default * 2
232
+ if newborder != old :
233
+ width += old * 2
233
234
width -= newborder * 2
234
- height += borderwidth . default * 2
235
+ height += old * 2
235
236
height -= newborder * 2
236
237
else :
237
238
newborder = borderwidth
238
239
240
+ self ._old_bw = newborder
241
+
239
242
self ._place (
240
243
x ,
241
244
y ,
You can’t perform that action at this time.
0 commit comments