Hello,
While running on X, wxGTK based apps properly show only the close botton on GNOME, switching to wayland makes them show minimize and maximize buttons also. At first I thought that it was a Gentoo issue, but I have just tested with Filezilla on a Fedora 42 live cd, and it's the same. It affects to all the wxGTK apps I have tried (openbabel, amule, filezilla).
Thanks a lot for your help
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Err, minimize/maximize buttons are shown by default. Why do you think they should not be shown?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Since Gnome3 times (I don't remember the exact release, but it was many years ago), gnome-shell only relies on the "close" button by default. I think only on Ubuntu are they reactivating the other buttons by toggling /org/gnome/desktop/wm/preferences/button-layout dconf setting, but in most of the other distributions (using upstream GNOME), only the close button is shown.
That is the reason some people teach others about how to configure it:
https://gitlab.gnome.org/Teams/Design/whiteboards/-/issues/87
https://fostips.com/enable-minimize-maximize-fedora-gnome-40/
That is honored by GTK and QT apps... also works for wxGTK ones running on X11... but it seems that on wayland, they go back to adding those buttons.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Looking into into src/gtk/toplevel.cpp, it seems that the honoring of button-layout setting is being skipped for "client side decorations" setups (-> wayland), but I don't know why :/
#if GTK_CHECK_VERSION(3,12,0)
if (m_gdkDecor && wx_is_at_least_gtk3(12))
{
char layout[sizeof("icon,menu:minimize,maximize,close")];
snprintf(layout, sizeof(layout), "icon%s:%s%s%s",
m_gdkDecor & GDK_DECOR_MENU ? ",menu" : "",
m_gdkDecor & GDK_DECOR_MINIMIZE ? "minimize," : "",
m_gdkDecor & GDK_DECOR_MAXIMIZE ? "maximize," : "",
m_gdkFunc & GDK_FUNC_CLOSE ? "close" : "");
gtk_header_bar_set_decoration_layout(GTK_HEADER_BAR(titlebar), layout);
}
#endif // 3.12
// Don't set WM decorations when GTK is using Client Side Decorations
m_gdkDecor = 0;
}
}
#endif // 3.10
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
GTK applications now use the header bar which is different from CSD, so I don't find it that shocking that wx applications show the buttons that GTK ones do not — wx ones don't have the menu button in the title bar, so they have more space for them.
But I guess it would be better to make the title bar less useful but more similar to the native apps... This would be simple to do, too, we just need to ignore GDK_DECOR_MINIMIZE and GDK_DECOR_MAXIMIZE in the code above, i.e. the following
diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 170da13769..0dc0e362af 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -414,6 +414,8 @@ void wxTopLevelWindowGTK::GTKHandleRealized() #if GTK_CHECK_VERSION(3,12,0) if (m_gdkDecor && wx_is_at_least_gtk3(12)) { + m_gdkDecor &= ~(GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE); +
char layout[sizeof("icon,menu:minimize,maximize,close")];
snprintf(layout, sizeof(layout), "icon%s:%s%s%s",
m_gdkDecor & GDK_DECOR_MENU ? ",menu" : "","fixes" the problem. @paulcor Should we do this (not in this exact form, of course)?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #25562 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks for fixing this, Paul! I think this can be closed, and I'll backport this to 3.2 too.
@pacho2 Please let us know if you still see any problems after the fix above.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I applied it to 3.2.8.1 and it fixes the issue :D Thanks a lot
Regarding a future 3.2.x release, do you know when it would be released? (to know if we try to apply the patch downstream on Gentoo right now or we can simply wait a bit for the next release including it)
Best regards
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
We don't have any fixed date for 3.2.9 yet, normally I'd say September-October, but it could be sooner if any really bad bugs are discovered or later if life happens...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()