methods. Related cleanups.
Otherwise X emits a BadMatch and gtk kills the process (!). Fix #8220
Fix #7837