mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-01 09:31:25 +00:00
gtk: add setMonitor binding and kde-output-order-v1 protocol
Add the missing setMonitor() function to the gtk4-layer-shell Zig bindings and provide the gdk module so it can reference gdk.Monitor. Register the kde-output-order-v1 Wayland protocol from plasma-wayland-protocols and generate its scanner binding. This protocol reports the compositor's monitor priority ordering and is needed to correctly identify the primary monitor for quick-terminal-screen support on Linux. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -636,12 +636,16 @@ fn addGtkNg(
|
||||
scanner.addCustomProtocol(
|
||||
plasma_wayland_protocols_dep.path("src/protocols/slide.xml"),
|
||||
);
|
||||
scanner.addCustomProtocol(
|
||||
plasma_wayland_protocols_dep.path("src/protocols/kde-output-order-v1.xml"),
|
||||
);
|
||||
scanner.addSystemProtocol("staging/xdg-activation/xdg-activation-v1.xml");
|
||||
|
||||
scanner.generate("wl_compositor", 1);
|
||||
scanner.generate("org_kde_kwin_blur_manager", 1);
|
||||
scanner.generate("org_kde_kwin_server_decoration_manager", 1);
|
||||
scanner.generate("org_kde_kwin_slide_manager", 1);
|
||||
scanner.generate("kde_output_order_v1", 1);
|
||||
scanner.generate("xdg_activation_v1", 1);
|
||||
|
||||
step.root_module.addImport("wayland", b.createModule(.{
|
||||
@@ -661,6 +665,10 @@ fn addGtkNg(
|
||||
"gtk",
|
||||
gobject.module("gtk4"),
|
||||
);
|
||||
if (gobject_) |gobject| layer_shell_module.addImport(
|
||||
"gdk",
|
||||
gobject.module("gdk4"),
|
||||
);
|
||||
step.root_module.addImport(
|
||||
"gtk4-layer-shell",
|
||||
layer_shell_module,
|
||||
|
||||
Reference in New Issue
Block a user