GNOME Bugzilla – Bug 720233
Make GtkHeaderBar support all kinds of CSD content, according to the theme
Last modified: 2013-12-13 06:06:00 UTC
This is something Matthias and I talked about today. Figured I'd write the patches and get it out of the way...
Created attachment 263963 [details] [review] headerbar: Remove unused private API Don't remove gtkheaderbarprivate.h, even though it's empty, since we'll add more to it soon.
Created attachment 263964 [details] [review] headerbar: Support all kinds of CSD decorations Move the gtkwindow.c CSD code into GtkHeaderBar, and make it triggerable by the show-close-button property, and remove shows-fallback-app-menu.
Review of attachment 263963 [details] [review]: sure
Review of attachment 263964 [details] [review]: Without looking in detail, I think I agree with most of the changes, except for the removal of the show-fallback-app-menu property - it needs to remain opt-in for application-provided headerbars. I don't mind if we turn it on by default for default csd titlebars.
or maybe that is now covered by the other show- property ? I'll have do an actual review...
show-close-button now means "show WM decorations". So, menu/icon/minimize/maximize/close. And whatever else we add in the future.
Comment on attachment 263963 [details] [review] headerbar: Remove unused private API Attachment 263963 [details] pushed as 37baeed - headerbar: Remove unused private API
I've revamped testtitlebar to let us test all this, and it exposed a few issues with your patch: 1. show-close-button seems to be ignored ?! I always get window decorations, regardless of the value of that property 2. changing the layout style property does not cause the headerbar to be updated - we're missing some signal handler for style changes 3. setting the layout to icon:close without having a window icon leaves a dangling separator 4. unsetting gtk-shell-shows-app-menu gives me double fallback: both the headerbar and the applicationwindow provide their fallback. My code was careful to prefer the headerbar fallback over the appwindow fallback, and never do both
5. The maximize button doesn't change its icon anymore
Fixed 1 and 5. 2 seemed to be broken already... gtk_window_style_updated doesn't seem to be called when typing into the entry... maybe some code somewhere is broken? Can't test 3 and 4.
I've fixed 3 and 4 now.