This only supports GTK at the moment, but it might be adapted to other toolkits. Fixes: #1422768, #1436553 Approved by: MC Return, Christopher Townsend