Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gdk(2)Event hierarchy broken?? #222

Closed
mtasaka opened this issue Feb 11, 2014 · 3 comments
Closed

Gdk(2)Event hierarchy broken?? #222

mtasaka opened this issue Feb 11, 2014 · 3 comments

Comments

@mtasaka
Copy link
Member

mtasaka commented Feb 11, 2014

With using alexandria 0.6.9 (with many patches on Fedora) on Fedora 21 , with ruby-gnome 2.1.0 suite, when I click some button alexandra crashes with

/usr/share/ruby/vendor_ruby/alexandria/ui/multi_drag_treeview.rb:108:in `button_press_event': undefined method `window' for #<Gdk::EventButton:0x94c10cc ptr=0xa0004c0 own=true>
     from /usr/share/ruby/vendor_ruby/alexandria/ui/multi_drag_treeview.rb:66:in `block in enable_model_drag_source'
     from /usr/share/ruby/vendor_ruby/alexandria/ui/gtk_thread_help.rb:78:in `call'
     from /usr/share/ruby/vendor_ruby/alexandria/ui/gtk_thread_help.rb:78:in `main'
     from /usr/share/ruby/vendor_ruby/alexandria/ui/gtk_thread_help.rb:78:in `main_with_queue'
     from /usr/share/ruby/vendor_ruby/alexandria/ui.rb:45:in `start_gtk'
     from /usr/share/ruby/vendor_ruby/alexandria/ui.rb:50:in `main'
     from /usr/share/ruby/vendor_ruby/alexandria.rb:40:in `main'
     from /bin/alexandria:38:in `<main>'

This issue does not appear on Fedora 20, which uses ruby-gnome2 2.0.2 suite.

https://developer.gnome.org/gdk2/stable/gdk2-Event-Structures.html#GdkEventAny says that any event pointer can safely be cast to a pointer to a GdkEventAny, which includes "window" member, so I think this is a regression. Also, this old wiki http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gdk%3A%3AEventButton says that Gdk::EventButton inherits Gdk::EventAny , which has "window" method.

Looks like this commit 753593e is the culprit, however I have not checked this in detail.

@kou kou closed this as completed in f2441d4 Feb 11, 2014
@kou
Copy link
Member

kou commented Feb 11, 2014

Thanks for your report!
I've fixed it. It seems that gdk3 gem also has the same problem. I'll fix it too.

kou added a commit that referenced this issue Feb 11, 2014
@mtasaka
Copy link
Member Author

mtasaka commented Feb 11, 2014

Okay, now alexandria does not crash, thank you.

@kou
Copy link
Member

kou commented Feb 11, 2014

Thanks for confirming it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants