Can I use native titlebar in Windows OS

I made an application using gtkmm and I compiled it on windows using MSYSv2. I know you can style the CSD to make it look like Windows. but there are several versions of windows with their own unique theme. Can we just let the Windows’ window manager to draw its native titlebar for us?

PS: I don’t care about the style of widgets I just want a native titlebar in Windows.
Regards.

Yes, run the application with the environment variable GTK_CSD=0. To do that from the MSYS2 terminal emulator:

GTK_CSD=0 app-name

Or you can hardcode that in your application by setting the environment variable from your main function:

int main() {
  g_setenv ("GTK_CSD", "0", FALSE);
  /* ... */
}

I already did that. It does work but I can’t resize the window. also there is no resize and minimize button.
video

Right. Could you open an issue in https://gitlab.gnome.org/GNOME/gtk/-/issues? I can work on a fix for that

2 Likes

Thank you. here is bug report

1 Like

@lb90 Is there any plan to fix this?

There is a plan to fix all issues; whether or not there are enough resources to do so is another matter entirely.

Help is very much welcome.

1 Like

Yes, I plan to work on that very soon