Skip to content

x.multiwindow/gg: complete native event coverage part2#27711

Open
GGRei wants to merge 1 commit into
vlang:masterfrom
GGRei:business/x-multiwindow-events-part2-20260708
Open

x.multiwindow/gg: complete native event coverage part2#27711
GGRei wants to merge 1 commit into
vlang:masterfrom
GGRei:business/x-multiwindow-events-part2-20260708

Conversation

@GGRei

@GGRei GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR completes the second part of the x.multiwindow and gg multi-window work.

It extends the opt-in gg multi-window path so native window and input events are routed across the supported backends, while keeping the existing single-window gg path isolated.

Normal import gg does not pull x.multiwindow. The new API still requires -d gg_multiwindow.

What changed

  • Added native event routing for window lifecycle, resize, close, mouse, keyboard, text, focus, file drop, and touch events.
  • Added cursor shape support and interactive move/resize hooks where the backend supports them.
  • Extended the gg multi-window facade so users can work from gg without importing x.multiwindow directly.
  • Extended AppKit, Win32, X11, and Wayland backend plumbing.
  • Added Wayland helper sources for cursor shape and xdg decoration negotiation.
  • Updated examples/gg/multiwindow.v to demonstrate multiple windows, per-window routing, cursor and resize behavior, and backend capability reporting.
  • Updated the gg and x.multiwindow documentation.
  • Strengthened CI coverage for Linux, macOS, and Windows.

Usage

  • ./v -d gg_multiwindow run examples/gg/multiwindow.v
  • ./v -d gg_multiwindow -d x_multiwindow_x11 run examples/gg/multiwindow.v
  • ./v -d gg_multiwindow -d sokol_wayland run examples/gg/multiwindow.v
  • ./v -d gg_multiwindow -d sokol_metal run examples/gg/multiwindow.v
  • ./v -d gg_multiwindow -d sokol_d3d11 run examples/gg/multiwindow.v

Compatibility

Without -d gg_multiwindow, the multi-window API returns a clear opt-in error and does not load native multi-window backend dependencies.

The existing single-window gg path remains unchanged.

Validation

  • ./v -d gg_multiwindow test vlib/x/multiwindow vlib/gg/multiwindow_api_d_gg_multiwindow_test.v vlib/gg/frame_pacing_test.v vlib/gg/draw_fns_api_test.v vlib/gg/draw_rect_empty_test.v
  • ./v -d gg_multiwindow test vlib/gg/legacy_import_multiwindow_isolation_test.v
  • ./v -d gg_multiwindow -d sokol_wayland -o /tmp/gg_multiwindow_wayland examples/gg/multiwindow.v
  • ./v -d gg_multiwindow -d x_multiwindow_x11 -o /tmp/gg_multiwindow_x11 examples/gg/multiwindow.v

Manual local Wayland testing was also done for move, resize, cursor hover, and decoration behavior.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d791f16297

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vlib/x/multiwindow/types.v Outdated
Comment thread vlib/x/multiwindow/x11_backend.c.v
Comment thread vlib/x/multiwindow/x11_backend.c.v
Comment thread vlib/x/multiwindow/wayland_backend_helpers.h Outdated
Comment thread vlib/x/multiwindow/x11_backend.c.v Outdated
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch 2 times, most recently from 77ead18 to 2d22796 Compare July 9, 2026 11:37
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d22796945

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vlib/x/multiwindow/wayland_backend.c.v
Comment thread vlib/x/multiwindow/wayland_backend.c.v
Comment thread vlib/x/multiwindow/wayland_backend.c.v Outdated
Comment thread vlib/x/multiwindow/x11_backend.c.v
Comment thread vlib/x/multiwindow/x11_backend.c.v Outdated
Comment thread vlib/x/multiwindow/wayland_backend.c.v Outdated
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch from 2d22796 to 8ad669a Compare July 9, 2026 12:32
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8ad669adcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vlib/x/multiwindow/win32_backend.c.v Outdated
Comment thread vlib/x/multiwindow/win32_backend.c.v Outdated
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch from 8ad669a to 67082ce Compare July 9, 2026 13:06
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67082ce163

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vlib/x/multiwindow/wayland_backend.c.v
Comment thread vlib/x/multiwindow/appkit_backend.m Outdated
Comment thread vlib/x/multiwindow/x11_backend.c.v Outdated
Comment thread vlib/gg/multiwindow_d_gg_multiwindow.v
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch from 67082ce to 1e65373 Compare July 9, 2026 14:16
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e653737df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/gg/multiwindow.v
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch from 1e65373 to fb92130 Compare July 9, 2026 21:16
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb92130e5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/linux_ci.yml Outdated
@GGRei GGRei force-pushed the business/x-multiwindow-events-part2-20260708 branch from fb92130 to a891553 Compare July 9, 2026 21:50
@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: a891553f15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GGRei

GGRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant