Rationalize the flow of configuration updates. #5947
Replies: 1 comment
-
I want to think about this further, but I still believe this is a GTK apprt issue and not a core issue. The App The What I think the issue is: I think GTK assuming a surface config update warrants a window update is a mistake and there's some config dependency binding there that isn't correct. The behavior that I believe is correct: the window should apply app-level settings for things like window-decoration, SSD, etc. For title, colors, and so on, it should use the settings of the focused surface.
In conclusion, I think the core flow of config updates are "rational" (as the title requests). The GTK flow of config updates are irrational. |
Beta Was this translation helpful? Give feedback.
-
Right now when a configuration reload is triggered, the core App sends a
change_config
message to every apprt Surface.ghostty/src/App.zig
Lines 145 to 148 in 3f715c2
On GTK, Windows will have their
updateConfig
methods called multiple times (once for every surface contained in the window):ghostty/src/apprt/gtk/App.zig
Lines 907 to 912 in 3f715c2
This has not been a problem so far, but with trying to do more in the GTK apprt with the DerivedConfig model it could cause problems with extra allocs/deallocs, extra copying, and extra work by GTK as it processes the repeated changes.
The flow of configuration reloads should be rationalized so that duplicate work is not being done.
Beta Was this translation helpful? Give feedback.
All reactions