-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows briefly appear before size/position rules (e.g., ResizeTo, SnapToEdge) take effect #1718
Comments
This can be solved by applying window rules before the client maps a surface. I confirmed the following patch solves the flickering issue for xdg-shell clients, but I'm not sure if it's okay to apply normal actions against views that have not been mapped. diff --git a/src/xdg.c b/src/xdg.c
index 4e6d6dad..ce06259a 100644
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -795,6 +795,8 @@ xdg_surface_new(struct wl_listener *listener, void *data)
CONNECT_SIGNAL(xdg_surface, xdg_toplevel_view, new_popup);
wl_list_insert(&server->views, &view->link);
+
+ window_rules_apply(view, LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP);
}
void Another approach would be disabling the view node until the client applies the geometry requested by window rules, but the problem is wlroots automatically sends |
The window rules are set up to have different events even though only E.g. something like this: <windowRule identifier="foot" event="onCreate">
<action name="SnapToEdge" direction="up" />
</windowRule> |
Windows appear for a split second in their default size/position before
ResizeTo
orSnapToEdge
rule is applied. It would be preferable for window to be drawn with the matching rules already applied than to draw the window first and then apply the rules.I'm a dummy when it comes to windowing. If what I'm requesting is impossible or more trouble than it's worth, please feel free to close this issue.
The text was updated successfully, but these errors were encountered: