Chris Marchesi 1832401e0e gtk: make sure WM_CLASS is being set on X11
This ensures that WM_CLASS is being set on X11, looks like this was
missed in #816 (not 100% sure if it always needs to be set in GDK or if
it's a side effect of us not using g_application_run).

This also adds the "x11-instance-name" config attribute to control the
instance name, which defaults to "ghostty" (or "ghostty-debug" on debug
builds).
2023-11-30 20:26:12 -08:00

17 lines
528 B
Zig

const c = @cImport({
@cInclude("gtk/gtk.h");
if (@import("build_options").libadwaita) @cInclude("libadwaita-1/adwaita.h");
// Add in X11-specific GDK backend which we use for specific things (e.g.
// X11 window class).
@cInclude("gdk/x11/gdkx.h");
});
pub usingnamespace c;
/// Compatibility with gobject < 2.74
pub usingnamespace if (@hasDecl(c, "G_CONNECT_DEFAULT")) struct {} else struct {
pub const G_CONNECT_DEFAULT = 0;
pub const G_APPLICATION_DEFAULT_FLAGS = c.G_APPLICATION_FLAGS_NONE;
};