Make window rules frame perfect
This moves window initialization earlier in the manage sequence. Previously, it was on the Window's first manage() call, but this is after the layout has already been calculated, which matters both because of tags and whether the window starts floating or not. Now, initialization is handled in a separate function that gets called in Output.calculatePrimaryStackLayout() instead.
This commit is contained in:
parent
6b8350e7b6
commit
c4da4ef30a
3 changed files with 30 additions and 20 deletions
|
|
@ -617,6 +617,9 @@ fn calculatePrimaryStackLayout(output: *Output) void {
|
|||
var active_count: u31 = 0;
|
||||
var it = output.windows.iterator(.forward);
|
||||
while (it.next()) |window| {
|
||||
// Initialize new windows before checking tags/float so that
|
||||
// window rules are reflected in the first frame's layout.
|
||||
window.initialize();
|
||||
if (output.tags & window.tags != 0x0000) {
|
||||
// Floating windows should be shown but not included in this layout generation
|
||||
const will_float = window.pending_manage.floating orelse window.floating;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue