My Problem
I'm working with Anjuta/gtkmm/C++ and want to design a program that looks similar to other gnome 3 programs.
This includes that big draggable Headerbar with custom buttons on it and other visual effects like the bigger background shadow behind the window.
Black Bar Issue
So far I discovered the GtkHeaderBar
Widget. I also discovered that you can use main_win->set_titlebar(*header_bar);
to make it draggable. Furthermore I ticked the "Client side window decorations" check box in the glade plugin (inside Anjuta).
However now it looks like in the image below. How do I get rid of that black bar?
Compatibility with other Desktops
Another question is how to maintain compatibility with other DEs? My bet would be to have two different glade/xml files (or one part of it in two external files). One contains the code that generates the gnome-3-like window and one that generates a normal one. When loading the program it is decided which file should be loaded based on the fact whether it is running under gnome 3 or any other desktop environment. But what is the best way to determine if the DE is gnome 3?
Update
When I untick "Client side window decorations" and "Decorated" the black bar is gone. But the shadows and the rounded corners are also gone.
Is the way I'm doing this even the right one? How should it be done?