Skip to content

gtk: apply initial appearance settings before presenting #5966

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

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

Conversation

pluiedev
Copy link
Member

Fixes #5934 (only on the GTK side), #5960

@pluiedev pluiedev requested a review from a team as a code owner February 24, 2025 15:38
@pluiedev pluiedev force-pushed the push-rrywsxrqksul branch 2 times, most recently from 52bc223 to 1d64af7 Compare February 24, 2025 16:48
@gtjoseph
Copy link
Contributor

Doesn't compile for me...

zig build -Doptimize=ReleaseFast \
	-Demit-terminfo -Demit-termcap -freference-trace=20
install
└─ install ghostty
   └─ zig build-exe ghostty ReleaseFast native
      └─ run glib-compile-resources (ghostty_resources.c)
         └─ run generate_gresource_xml
            └─ run gtk_blueprint_compiler (menu-surface-context_menu.ui) failure
error: FileNotFound
/usr/lib/zig/std/process/Child.zig:423:5: 0x103e8b8 in waitPosix (gtk_blueprint_compiler)
    return self.term.?;
    ^

@pluiedev
Copy link
Member Author

You need to install blueprint-compiler and libxml2 (for xmllint) - it's a new dependency for 1.2

@jcollie
Copy link
Member

jcollie commented Feb 24, 2025

Doesn't compile for me...

You need to install blueprint-compiler. It's a new build requirement.

@gtjoseph
Copy link
Contributor

Still doesn't compile. The test run fails in the same place.

@gtjoseph
Copy link
Contributor

I hacked around the compile issue with the alloc.dupe in DerivedConfig.init() but the window still draws with the default size before using the configured size.

@pluiedev
Copy link
Member Author

I could try to move it even earlier into the initialization process, but then I don't know if it'd help either. Might be just GTK being GTK.

@gtjoseph
Copy link
Contributor

How about my idea in the discussion of starting the window minimized then unminimizing it after all setup is done?

@tristan957
Copy link
Member

How about my idea in the discussion of starting the window minimized then unminimizing it after all setup is done?

Can't you just hide the widget (window) and show it after everything is done?

@gtjoseph
Copy link
Contributor

Even after fixing the build issue with .title, the window is still being drawn at the default size before resizing to the configured size.

@pluiedev
Copy link
Member Author

This PR was an attempt to fix your issue, but it's not just for your issue. You're free to use your own fix.

@mitchellh
Copy link
Contributor

Fixes #5934 (only on the GTK side), #5960

GitHub is going to auto-close #5934 when this merges so just be aware to reopen it and just relabel for macOS. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GTK: title config should be respected and set immediately on new windows, tabs
5 participants