From my own investigations so far I guess the best starting point is panel-toplevel.c in the sources of gnome-panel-2.26.0 -> gnome-panel.
From my own investigations so far I guess the best starting point is panel-toplevel.c in the sources of gnome-panel-2.26.0 -> gnome-panel.