From: Detlef R. <det...@gm...> - 2014-07-22 17:40:32
|
Hi, Am 22.07.2014 18:39, schrieb Masafumi Yokoyama: > Hi, > > 2014-07-22 2:29 GMT+09:00 Detlef Reichl <det...@gm...>: >> "classic" gtk3 (non gir) crashes on closing the program, if you have >> accessed the clipboard. >> >> Here is a small example. Start it, click the button, close the window => >> crash. > > I got same crash in Linux. (not crash in Windows, but `clip` is nil.) > > >> #!/usr/bin/env ruby >> >> require 'gtk3' >> >> win = Gtk::Window.new >> win.signal_connect(:delete_event) {Gtk.main_quit} >> button = Gtk::Button.new :label => 'foobla' >> win.add button >> >> button.signal_connect(:clicked) do >> clip = button.get_clipboard Gdk::Atom.new(69).class.to_s > > The following code is works. Is this no good? > > clip = button.get_clipboard Gdk::Selection::CLIPBOARD > works like a charm :-) Thank you, detlef |