[perl-Gtk3] Gtk3::Gdk::Window::new: numerify the attr mask on older gtk+



commit 8d05f791e0f8b862e1ae803928c1c39b1514fefc
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Fri Jan 11 15:12:12 2013 +0100

    Gtk3::Gdk::Window::new: numerify the attr mask on older gtk+
    
    Before gtk+ 3.6, the attr mask parameter lacked proper annotations.

 lib/Gtk3.pm |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index 7d9cba5..25f94dd 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -973,6 +973,11 @@ sub Gtk3::Gdk::Window::new {
     if (exists $attr->{wmclass_name} && exists $attr->{wmclass_class}) { $attr_mask |= 'GDK_WA_WMCLASS' };
     if (exists $attr->{override_redirect}) { $attr_mask |= 'GDK_WA_NOREDIR' };
     if (exists $attr->{type_hint}) { $attr_mask |= 'GDK_WA_TYPE_HINT' };
+    if (!Gtk3::CHECK_VERSION (3, 6, 0)) {
+      # Before 3.6, the attribute mask parameter lacked proper annotations, hence
+      # we numerify it here.  FIXME: This breaks encapsulation.
+      $attr_mask = $$attr_mask;
+    }
   }
   return Glib::Object::Introspection->invoke (
     $_GDK_BASENAME, 'Window', 'new',



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]