gtk(wayland): explicitly set layer name
Even though gtk4-layer-shell's documentation claims that "nobody quite knows what it's for", some compositors (like Niri) can define custom rules based on the layer name and it's beneficial in those cases to define a distinct name just for our quick terminals.pull/7477/head
parent
dee7c835de
commit
6959fa8438
|
|
@ -50,3 +50,7 @@ pub fn setMargin(window: *gtk.Window, edge: ShellEdge, margin_size: c_int) void
|
||||||
pub fn setKeyboardMode(window: *gtk.Window, mode: KeyboardMode) void {
|
pub fn setKeyboardMode(window: *gtk.Window, mode: KeyboardMode) void {
|
||||||
c.gtk_layer_set_keyboard_mode(@ptrCast(window), @intFromEnum(mode));
|
c.gtk_layer_set_keyboard_mode(@ptrCast(window), @intFromEnum(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn setNamespace(window: *gtk.Window, name: [:0]const u8) void {
|
||||||
|
c.gtk_layer_set_namespace(@ptrCast(window), name.ptr);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ pub const App = struct {
|
||||||
|
|
||||||
layer_shell.initForWindow(window);
|
layer_shell.initForWindow(window);
|
||||||
layer_shell.setLayer(window, .top);
|
layer_shell.setLayer(window, .top);
|
||||||
|
layer_shell.setNamespace(window, "ghostty-quick-terminal");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn registryListener(
|
fn registryListener(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue