apprt/gtk-ng: respect window-inherit-working-directory=false

Fixes #8244
pull/8247/head
Mitchell Hashimoto 2025-08-15 09:18:26 -07:00
parent 5b4baee9fa
commit 997e013d7e
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 12 additions and 4 deletions

View File

@ -523,10 +523,18 @@ pub const Surface = extern struct {
priv.font_size_request = font_size_ptr; priv.font_size_request = font_size_ptr;
self.as(gobject.Object).notifyByPspec(properties.@"font-size-request".impl.param_spec); self.as(gobject.Object).notifyByPspec(properties.@"font-size-request".impl.param_spec);
// Setup our pwd // Remainder needs a config. If there is no config we just assume
if (parent.rt_surface.surface.getPwd()) |pwd| { // we aren't inheriting any of these values.
priv.pwd = glib.ext.dupeZ(u8, pwd); if (priv.config) |config_obj| {
self.as(gobject.Object).notifyByPspec(properties.pwd.impl.param_spec); const config = config_obj.get();
// Setup our pwd if configured to inherit
if (config.@"window-inherit-working-directory") {
if (parent.rt_surface.surface.getPwd()) |pwd| {
priv.pwd = glib.ext.dupeZ(u8, pwd);
self.as(gobject.Object).notifyByPspec(properties.pwd.impl.param_spec);
}
}
} }
} }