gtk: better method for setting GDK env vars

pull/4662/head
Jeffrey C. Ollie 2025-01-08 08:34:47 -06:00
parent 06a57842af
commit cd638588c4
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 6 additions and 4 deletions

View File

@ -187,8 +187,9 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
}
}
try writer.writeByte(0);
log.warn("setting GDK_DEBUG={s}", .{fmt.getWritten()});
_ = internal_os.setenv("GDK_DEBUG", buf[0 .. fmt.pos - 1 :0]);
const value = fmt.getWritten();
log.warn("setting GDK_DEBUG={s}", .{value[0 .. value.len - 1]});
_ = internal_os.setenv("GDK_DEBUG", value[0 .. value.len - 1 :0]);
}
{
@ -204,8 +205,9 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
}
}
try writer.writeByte(0);
log.warn("setting GDK_DISABLE={s}", .{fmt.getWritten()});
_ = internal_os.setenv("GDK_DISABLE", buf[0 .. fmt.pos - 1 :0]);
const value = fmt.getWritten();
log.warn("setting GDK_DISABLE={s}", .{value[0 .. value.len - 1]});
_ = internal_os.setenv("GDK_DISABLE", value[0 .. value.len - 1 :0]);
}
if (version.runtimeAtLeast(4, 14, 0)) {