Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk: unify Wayland and X11 platforms, implement background blur for KDE X11 #4723

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pluiedev
Copy link
Contributor

@pluiedev pluiedev commented Jan 6, 2025

Part of #4626. Please let me know if the architecture looks alright — I'm fairly convinced that I'm being unorthodox here.

src/apprt/gtk/Surface.zig Show resolved Hide resolved
src/apprt/gtk/key.zig Outdated Show resolved Hide resolved
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

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

It's not as icky as I expected honestly. The thing that definitely cannot be right is our init approach (I commented in more detail). And I think we should bike shed "Platform".

@@ -36,8 +36,7 @@ const c = @import("c.zig").c;
const version = @import("version.zig");
const inspector = @import("inspector.zig");
const key = @import("key.zig");
const x11 = @import("x11.zig");
const wayland = @import("wayland.zig");
const platform = @import("platform.zig");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll just put this right at the beginning since it's everywhere: I'm not sure if "platform" is the right noun for this. Platform is a catch-all of a pluggable thing (similar to widget or plugin or extension). But I feel like in this case there's probably a better noun to describe what we're actually abstracting.

For example, is it:

  • Windowing protocol
  • Display server
  • etc.

(Making those one word is harder...)

But this is pretty core to things so I'd like to make sure we get this right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like "protocol". Calling it "backend" like GTK/GDK does feels okay though that might be confused for app runtimes

src/apprt/gtk/App.zig Outdated Show resolved Hide resolved
src/apprt/gtk/App.zig Outdated Show resolved Hide resolved
src/apprt/gtk/key.zig Outdated Show resolved Hide resolved
src/apprt/gtk/platform.zig Outdated Show resolved Hide resolved
gdk_display: *c.GdkDisplay,
derived_config: DerivedConfig,

inner: union(enum) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Bikeshed: name this whatever we decide on for "platform"

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.

3 participants