/*
 * regression__gdkRgba_field_access.js
 */


const gi = require('../');
const Gtk = gi.require('Gtk');
const Pango = gi.require('Pango');
const common = require('./__common__.js')

gi.startLoop()
Gtk.init()


// common.skip()

const window = new Gtk.Window({ type : Gtk.WindowType.TOPLEVEL })
window.setDefaultSize(200, 200)
window.setResizable(true)

window.on('show', () => {
  setTimeout(run, 500)
  Gtk.main()
})
window.on('destroy', () => Gtk.mainQuit())
window.on('delete-event', () => false)

window.showAll()

function run() {
  const color = window.getStyleContext().getBackgroundColor(Gtk.StateFlags.NORMAL)
  console.log(color.red)
  console.log(color.toString())
  window.close()
}

@@ -677,21 +677,22 @@
 )%0A  
-window.close(
+process.exit(0
 )%0A%7D%0A

fix gdkRgba timeout